File tree Expand file tree Collapse file tree
test/configCases/asset-modules/minimize-fragment-names Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2+
3+ exports [` ConfigCacheTestCases asset-modules minimize-fragment-names minimize-fragment-names should compile 1` ] = ` "export const answer=function(){ return 3 } ;"` ;
4+
5+ exports [` ConfigCacheTestCases asset-modules minimize-fragment-names minimize-fragment-names should compile 2` ] = ` "export const answer=function(){ return 3 } ;"` ;
6+
7+ exports [` ConfigCacheTestCases asset-modules minimize-fragment-names minimize-fragment-names should compile 3` ] = ` ".fragment{ color :red } "` ;
8+
9+ exports [` ConfigCacheTestCases asset-modules minimize-fragment-names minimize-fragment-names should compile 4` ] = `
10+ "<!doctype html><head ><title >Fragment</title ></head ><body ><p class =a>hi</p>
11+
12+ </body></html>"
13+ `;
Original file line number Diff line number Diff line change 1+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2+
3+ exports [` ConfigTestCases asset-modules minimize-fragment-names minimize-fragment-names should compile 1` ] = ` "export const answer=function(){ return 3 } ;"` ;
4+
5+ exports [` ConfigTestCases asset-modules minimize-fragment-names minimize-fragment-names should compile 2` ] = ` "export const answer=function(){ return 3 } ;"` ;
6+
7+ exports [` ConfigTestCases asset-modules minimize-fragment-names minimize-fragment-names should compile 3` ] = ` ".fragment{ color :red } "` ;
8+
9+ exports [` ConfigTestCases asset-modules minimize-fragment-names minimize-fragment-names should compile 4` ] = `
10+ "<!doctype html><head ><title >Fragment</title ></head ><body ><p class =a>hi</p>
11+
12+ </body></html>"
13+ `;
Original file line number Diff line number Diff line change @@ -15,18 +15,14 @@ module.exports = {
1515 // Named `bundle<index>.js#<contenthash>` by `output.filename`.
1616 expect ( read ( `bundle${ index } .js` ) ) . not . toContain ( "webpackBootstrap" ) ;
1717 // Named `<index>/script.js#frag` by `assetModuleFilename`.
18- expect ( read ( `${ index } /script.js` ) ) . toBe (
19- "export const answer=function(){return 3};"
20- ) ;
18+ expect ( read ( `${ index } /script.js` ) ) . toMatchSnapshot ( ) ;
2119 }
2220
2321 // The extension is read before the fragment, so `#a.css` claims nothing.
2422 expect ( read ( "1/data.txt" ) ) . toBe ( "not css {\n" ) ;
2523
2624 // Only the second build enables native CSS and HTML.
27- expect ( read ( "1/style.css" ) ) . toBe ( ".fragment{color:red}" ) ;
28- expect ( read ( "1/page.html" ) ) . toBe (
29- "<!doctype html><head><title>Fragment</title></head><body><p class=a>hi</p>\n\n</body></html>"
30- ) ;
25+ expect ( read ( "1/style.css" ) ) . toMatchSnapshot ( ) ;
26+ expect ( read ( "1/page.html" ) ) . toMatchSnapshot ( ) ;
3127 }
3228} ;
You can’t perform that action at this time.
0 commit comments