Skip to content

Commit bcc82b0

Browse files
committed
chore: fix ESLint errors
1 parent ccd36a1 commit bcc82b0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/__tests__/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,20 @@ cases(
2828
}
2929
require('../')
3030
if (snapshotLog) {
31-
expect(console.log.mock.calls).toMatchSnapshot()
31+
expect(console.log.mock.calls).toMatchSnapshot('format snapshotLog')
3232
} else if (signal) {
3333
expect(process.exit).toHaveBeenCalledTimes(1)
3434
expect(process.exit).toHaveBeenCalledWith(1)
35-
expect(console.log.mock.calls).toMatchSnapshot()
35+
expect(console.log.mock.calls).toMatchSnapshot('format signal')
3636
} else {
3737
expect(crossSpawnSyncMock).toHaveBeenCalledTimes(1)
3838
const [firstCall] = crossSpawnSyncMock.mock.calls
3939
const [script, calledArgs] = firstCall
40-
expect([script, ...calledArgs].join(' ')).toMatchSnapshot()
40+
expect([script, ...calledArgs].join(' ')).toMatchSnapshot('format script')
4141
}
4242
} catch (error) {
4343
if (throws) {
44-
expect(error.message).toMatchSnapshot()
44+
expect(error.message).toMatchSnapshot('format error')
4545
} else {
4646
throw error
4747
}

src/scripts/__tests__/precommit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ cases(
3131
expect(crossSpawnSyncMock).toHaveBeenCalledTimes(2)
3232
const [firstCall, secondCall] = crossSpawnSyncMock.mock.calls
3333
const [scriptOne, calledArgsOne] = firstCall
34-
expect([scriptOne, ...calledArgsOne].join(' ')).toMatchSnapshot()
34+
expect([scriptOne, ...calledArgsOne].join(' ')).toMatchSnapshot('pre-commit scriptOne')
3535
const [scriptTwo, calledArgsTwo] = secondCall
36-
expect([scriptTwo, ...calledArgsTwo].join(' ')).toMatchSnapshot()
36+
expect([scriptTwo, ...calledArgsTwo].join(' ')).toMatchSnapshot('pre-commit scriptTwo')
3737
} catch (error) {
3838
throw error
3939
} finally {

0 commit comments

Comments
 (0)