File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -28,20 +28,20 @@ cases(
28
28
}
29
29
require ( '../' )
30
30
if ( snapshotLog ) {
31
- expect ( console . log . mock . calls ) . toMatchSnapshot ( )
31
+ expect ( console . log . mock . calls ) . toMatchSnapshot ( 'format snapshotLog' )
32
32
} else if ( signal ) {
33
33
expect ( process . exit ) . toHaveBeenCalledTimes ( 1 )
34
34
expect ( process . exit ) . toHaveBeenCalledWith ( 1 )
35
- expect ( console . log . mock . calls ) . toMatchSnapshot ( )
35
+ expect ( console . log . mock . calls ) . toMatchSnapshot ( 'format signal' )
36
36
} else {
37
37
expect ( crossSpawnSyncMock ) . toHaveBeenCalledTimes ( 1 )
38
38
const [ firstCall ] = crossSpawnSyncMock . mock . calls
39
39
const [ script , calledArgs ] = firstCall
40
- expect ( [ script , ...calledArgs ] . join ( ' ' ) ) . toMatchSnapshot ( )
40
+ expect ( [ script , ...calledArgs ] . join ( ' ' ) ) . toMatchSnapshot ( 'format script' )
41
41
}
42
42
} catch ( error ) {
43
43
if ( throws ) {
44
- expect ( error . message ) . toMatchSnapshot ( )
44
+ expect ( error . message ) . toMatchSnapshot ( 'format error' )
45
45
} else {
46
46
throw error
47
47
}
Original file line number Diff line number Diff line change 31
31
expect ( crossSpawnSyncMock ) . toHaveBeenCalledTimes ( 2 )
32
32
const [ firstCall , secondCall ] = crossSpawnSyncMock . mock . calls
33
33
const [ scriptOne , calledArgsOne ] = firstCall
34
- expect ( [ scriptOne , ...calledArgsOne ] . join ( ' ' ) ) . toMatchSnapshot ( )
34
+ expect ( [ scriptOne , ...calledArgsOne ] . join ( ' ' ) ) . toMatchSnapshot ( 'pre-commit scriptOne' )
35
35
const [ scriptTwo , calledArgsTwo ] = secondCall
36
- expect ( [ scriptTwo , ...calledArgsTwo ] . join ( ' ' ) ) . toMatchSnapshot ( )
36
+ expect ( [ scriptTwo , ...calledArgsTwo ] . join ( ' ' ) ) . toMatchSnapshot ( 'pre-commit scriptTwo' )
37
37
} catch ( error ) {
38
38
throw error
39
39
} finally {
You can’t perform that action at this time.
0 commit comments