File tree Expand file tree Collapse file tree 2 files changed +31
-26
lines changed
configCases/records/issue-2991 Expand file tree Collapse file tree 2 files changed +31
-26
lines changed Original file line number Diff line number Diff line change 1+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+ exports [` ConfigTestCases records issue-2991 exported tests should write relative paths to records 1` ] = `
4+ "{
5+ \\" modules\\ " : {
6+ \\" byIdentifier\\ " : {
7+ \\"external \\\\\\"path\\\\\\" \\ " : 0 ,
8+ \\"external \\\\\\"fs\\\\\\" \\ " : 1 ,
9+ \\" ignored pkgs/somepackage/foo\\ " : 2 ,
10+ \\" test.js\\ " : 3
11+ },
12+ \\" usedIds\\ " : {
13+ \\" 0\\ " : 0 ,
14+ \\" 1\\ " : 1 ,
15+ \\" 2\\ " : 2 ,
16+ \\" 3\\ " : 3
17+ }
18+ },
19+ \\" chunks\\ " : {
20+ \\" byName\\ " : {
21+ \\" main\\ " : 0
22+ },
23+ \\" bySource\\ " : {},
24+ \\" usedIds\\ " : [
25+ 0
26+ ]
27+ }
28+ } "
29+ ` ;
Original file line number Diff line number Diff line change 11try {
22 require ( "pkgs/somepackage/foo" ) ;
3- } catch ( e ) { }
3+ } catch ( e ) { }
44
55it ( "should write relative paths to records" , function ( ) {
66 var fs = require ( "fs" ) ;
77 var path = require ( "path" ) ;
88 var content = fs . readFileSync ( path . join ( __dirname , "records.json" ) , "utf-8" ) ;
9- expect ( content ) . toEqual ( `{
10- "modules": {
11- "byIdentifier": {
12- "external \\"path\\"": 0,
13- "external \\"fs\\"": 1,
14- "ignored pkgs/somepackage/foo": 2,
15- "test.js": 3
16- },
17- "usedIds": {
18- "0": 0,
19- "1": 1,
20- "2": 2,
21- "3": 3
22- }
23- },
24- "chunks": {
25- "byName": {
26- "main": 0
27- },
28- "bySource": {},
29- "usedIds": [
30- 0
31- ]
32- }
33- }` ) ;
9+ expect ( content ) . toMatchSnapshot ( ) ;
3410} ) ;
You can’t perform that action at this time.
0 commit comments