Skip to content

Commit 862b858

Browse files
committed
combine 2 afterEach blocks
1 parent 4eb9517 commit 862b858

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

__tests__/testResultProcessor.test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,15 @@ describe('jest-junit', () => {
3535
});
3636

3737
afterEach(() => {
38+
jest.clearAllMocks();
39+
3840
for (let key in process.env) {
3941
if (key.startsWith('JEST_JUNIT')) {
4042
delete process.env[key];
4143
}
4244
}
4345
});
4446

45-
afterEach(() => {
46-
jest.clearAllMocks();
47-
});
48-
4947
it('should generate valid xml with default name', () => {
5048
const noFailingTestsReport = require('../__mocks__/no-failing-tests.json');
5149
testResultProcessor(noFailingTestsReport);

0 commit comments

Comments
 (0)