test: clear mocks

This commit is contained in:
Riccardo
2024-07-03 16:17:35 +02:00
parent 0dc9f625aa
commit 40ea89f273
2 changed files with 8 additions and 0 deletions

View File

@@ -5,6 +5,10 @@ jest.mock('../utils/addition', () => ({
addition: jest.fn((value: number) => value + 1)
}));
afterEach(() => {
jest.restoreAllMocks();
});
describe('server', () => {
it('returns input value increased by one', async () => {
const value = 1;

View File

@@ -9,6 +9,10 @@ jest.mock('../database/database', () => ({
}))
}));
afterEach(() => {
jest.restoreAllMocks();
});
describe('call', () => {
it('returns the input value increased by one', async () => {
const response = await addition(3);