Skip to content

Commit 2f66d11

Browse files
author
Kent C. Dodds
committed
test: simplify tests a bit
1 parent 11f6218 commit 2f66d11

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/__tests__/index.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,14 @@ expect.addSnapshotSerializer({
1515

1616
cases(
1717
'format',
18-
({
19-
snapshotLog = false,
20-
throws = false,
21-
setup = () => () => {},
22-
signal = false,
23-
args = [],
24-
}) => {
18+
({snapshotLog = false, throws = false, signal = false, args = []}) => {
2519
// beforeEach
2620
const {sync: crossSpawnSyncMock} = require('cross-spawn')
2721
const originalExit = process.exit
2822
const originalArgv = process.argv
2923
const originalLog = console.log
3024
process.exit = jest.fn()
3125
console.log = jest.fn()
32-
const teardown = setup()
33-
3426
try {
3527
// tests
3628
process.argv = ['node', '../', ...args]
@@ -58,7 +50,6 @@ cases(
5850
throw error
5951
}
6052
} finally {
61-
teardown()
6253
// afterEach
6354
process.exit = originalExit
6455
process.argv = originalArgv

0 commit comments

Comments
 (0)