File tree Expand file tree Collapse file tree 5 files changed +1301
-1478
lines changed
file_name_plugin/__tests__/__snapshots__
test_name_plugin/__tests__/__snapshots__ Expand file tree Collapse file tree 5 files changed +1301
-1478
lines changed Original file line number Diff line number Diff line change 26
26
"dependencies" : {
27
27
"ansi-escapes" : " ^3.0.0" ,
28
28
"chalk" : " ^2.4.1" ,
29
- "jest-watcher" : " ^23.1 .0" ,
29
+ "jest-watcher" : " ^24.3 .0" ,
30
30
"slash" : " ^2.0.0" ,
31
31
"string-length" : " ^2.0.0" ,
32
32
"strip-ansi" : " ^5.0.0"
38
38
"@babel/preset-flow" : " ^7.0.0" ,
39
39
"babel-core" : " ^7.0.0-bridge.0" ,
40
40
"babel-eslint" : " ^10.0.1" ,
41
- "babel-jest" : " ^23.4.2 " ,
41
+ "babel-jest" : " ^24.3.0 " ,
42
42
"eslint" : " ^5.12.1" ,
43
43
"eslint-config-airbnb-base" : " ^13.1.0" ,
44
- "eslint-config-prettier" : " ^3.6 .0" ,
44
+ "eslint-config-prettier" : " ^4.1 .0" ,
45
45
"eslint-plugin-flowtype" : " ^3.2.1" ,
46
46
"eslint-plugin-import" : " ^2.9.0" ,
47
47
"eslint-plugin-jest" : " ^22.1.3" ,
48
48
"eslint-plugin-prettier" : " ^3.0.1" ,
49
- "flow-bin" : " ^0.91 .0" ,
50
- "jest" : " ^23.2 .0" ,
49
+ "flow-bin" : " ^0.94 .0" ,
50
+ "jest" : " ^24.3 .0" ,
51
51
"prettier" : " ^1.13.7"
52
52
},
53
53
"jest" : {
56
56
" <rootDir>/testname"
57
57
],
58
58
"snapshotSerializers" : [
59
- " <rootDir>/node_modules/pretty-format/build/plugins/convert_ansi "
59
+ " <rootDir>/node_modules/pretty-format/build/plugins/ConvertAnsi "
60
60
],
61
61
"testPathIgnorePatterns" : [
62
62
" <rootDir>/build/.*" ,
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ exports[`file matching is case insensitive 1`] = `
105
105
106
106
exports [` shows the correct initial state 1` ] = `
107
107
[MOCK - cursorHide]
108
- [MOCK - clearScreen ]
108
+ [MOCK - clear ]
109
109
110
110
Pattern Mode Usage
111
111
› Press Esc to exit pattern mode.
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ exports[`can use arrows to select a specific test 1`] = `
83
83
84
84
exports [` shows the correct initial state 1` ] = `
85
85
[MOCK - cursorHide]
86
- [MOCK - clearScreen ]
86
+ [MOCK - clear ]
87
87
88
88
Pattern Mode Usage
89
89
› Press Esc to exit pattern mode.
@@ -106,7 +106,7 @@ Pattern Mode Usage
106
106
107
107
exports [` shows the correct message when there are no cached tests 1` ] = `
108
108
[MOCK - cursorHide]
109
- [MOCK - clearScreen ]
109
+ [MOCK - clear ]
110
110
111
111
Pattern Mode Usage
112
112
› Press Esc to exit pattern mode.
Original file line number Diff line number Diff line change @@ -6,6 +6,24 @@ expect.addSnapshotSerializer({
6
6
print : val => stripAnsi ( val ) ,
7
7
} ) ;
8
8
9
+ /**
10
+ * See https://github.com/facebook/jest/pull/7523 for more details
11
+ */
12
+ const CLEAR = '\x1B[2J\x1B[3J\x1B[H' ;
13
+ expect . addSnapshotSerializer ( {
14
+ test : val => val . includes ( CLEAR ) ,
15
+ print : val => stripAnsi ( val . replace ( CLEAR , '[MOCK - clear]' ) ) ,
16
+ } ) ;
17
+
18
+ /**
19
+ * See https://github.com/facebook/jest/pull/7523 for more details
20
+ */
21
+ const WINDOWS_CLEAR = '\x1B[2J\x1B[0f' ;
22
+ expect . addSnapshotSerializer ( {
23
+ test : val => val . includes ( WINDOWS_CLEAR ) ,
24
+ print : val => stripAnsi ( val . replace ( WINDOWS_CLEAR , '[MOCK - clear]' ) ) ,
25
+ } ) ;
26
+
9
27
jest . mock ( 'ansi-escapes' , ( ) => ( {
10
28
clearScreen : '[MOCK - clearScreen]' ,
11
29
cursorDown : ( count = 1 ) => `[MOCK - cursorDown(${ count } )]` ,
You can’t perform that action at this time.
0 commit comments