Skip to content

Commit f67adf9

Browse files
j-u-p-iterKent C. Dodds
authored andcommitted
test: removes mockClear (#76)
Because we recreate mockFn on each before
1 parent 90c2316 commit f67adf9

File tree

6 files changed

+0
-6
lines changed

6 files changed

+0
-6
lines changed

src/scripts/__tests__/format.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ cases(
1717

1818
// tests
1919
process.argv = ['node', '../format', ...args]
20-
crossSpawnSyncMock.mockClear()
2120
require('../format')
2221
expect(crossSpawnSyncMock).toHaveBeenCalledTimes(1)
2322
const [firstCall] = crossSpawnSyncMock.mock.calls

src/scripts/__tests__/lint.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ cases(
2626
const teardown = setup()
2727

2828
process.argv = ['node', '../lint', ...args]
29-
crossSpawnSyncMock.mockClear()
3029

3130
try {
3231
// tests

src/scripts/__tests__/precommit.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ cases(
2525

2626
process.argv = ['node', '../pre-commit', ...args]
2727
utils.isOptedIn = optIn => optIn === 'pre-commit'
28-
crossSpawnSyncMock.mockClear()
2928

3029
try {
3130
// tests

src/scripts/__tests__/test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ cases(
3535
const teardown = setup()
3636

3737
process.argv = ['node', '../test', ...args]
38-
jestRunMock.mockClear()
3938

4039
try {
4140
// tests

src/scripts/__tests__/travis-after-success.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ cases(
3131
console.log = jest.fn()
3232

3333
// tests
34-
crossSpawnSyncMock.mockClear()
3534
if (version) {
3635
utils.pkg.version = version
3736
}

src/scripts/__tests__/validate.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ cases(
1515

1616
try {
1717
// tests
18-
crossSpawnSyncMock.mockClear()
1918
require('../validate')
2019
expect(crossSpawnSyncMock).toHaveBeenCalledTimes(1)
2120
const [firstCall] = crossSpawnSyncMock.mock.calls

0 commit comments

Comments
 (0)