Skip to content

Commit

Permalink
test: synchronize databese with server
Browse files Browse the repository at this point in the history
Co-Authored-By: Natalia Rodrigues <Natytotherodrigues@gmail.com>
  • Loading branch information
GabrielSMonteiro and Natyrodrigues committed Sep 19, 2024
1 parent d74bc86 commit 141b17a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/app/__tests__/watermelon.service.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,19 @@ describe('syncDatabaseWithServer', () => {
beforeEach(() => {
jest.clearAllMocks();
});

it('should successfully synchronize database with server', async () => {
const mockChanges = { some: 'changes' };
const mockTimestamp = new Date().toISOString();
const mockResponse = {
ok: true,
json: jest.fn().mockResolvedValue({
data: {
changes: mockChanges,
timestamp: mockTimestamp
},
message: 'Success'
})
};
});
});

0 comments on commit 141b17a

Please sign in to comment.