@@ -54,22 +54,14 @@ describe('build', () => {
5454 expect ( r . diagnostics ) . toEqual ( [ ] ) ;
5555
5656 const cmpA = await c . fs . readFile ( path . join ( root , 'www' , 'build' , 'app' , 'cmp-a.es5.entry.js' ) ) ;
57- expect ( cmpA ) . toContain ( 'Built with http://stenciljs.com' ) ;
58- expect ( cmpA ) . toContain ( 'App.loadBundle("cmp-a"' ) ;
59- expect ( cmpA ) . toContain ( 'someFn(!0)' ) ;
60- expect ( cmpA ) . not . toContain ( '/** minify me plz **/' ) ;
57+ expect ( cmpA ) . toEqual ( `App.loadBundle("cmp-a",["exports","./chunk-97e00951.js"],function(e,n){window;var u=function(){function e(){n.someFn(!0)}return Object.defineProperty(e,"is",{get:function(){return"cmp-a"},enumerable:!0,configurable:!0}),e}();e.CmpA=u,Object.defineProperty(e,"__esModule",{value:!0})});` ) ;
6158
6259 const cmpB = await c . fs . readFile ( path . join ( root , 'www' , 'build' , 'app' , 'cmp-b.es5.entry.js' ) ) ;
63- expect ( cmpB ) . toContain ( 'Built with http://stenciljs.com' ) ;
64- expect ( cmpB ) . toContain ( 'App.loadBundle("cmp-b"' ) ;
65- expect ( cmpB ) . toContain ( 'someFn(!0)' ) ;
66- expect ( cmpB ) . not . toContain ( '/** minify me plz **/' ) ;
60+ expect ( cmpB ) . toEqual ( `App.loadBundle("cmp-b",["exports","./chunk-97e00951.js"],function(e,n){window;var u=function(){function e(){n.someFn(!0)}return Object.defineProperty(e,"is",{get:function(){return"cmp-b"},enumerable:!0,configurable:!0}),e}();e.CmpB=u,Object.defineProperty(e,"__esModule",{value:!0})});` ) ;
6761
6862 const chunkFileName = r . filesWritten . find ( f => f . includes ( 'chunk' ) && f . includes ( 'es5' ) ) ;
6963 const chunk = await c . fs . readFile ( chunkFileName ) ;
70- expect ( chunk ) . toContain ( 'Built with http://stenciljs.com' ) ;
71- expect ( chunk ) . toContain ( '.someFn=function(' ) ;
72- expect ( chunk ) . toContain ( 'console.log(!0)' ) ;
64+ expect ( chunk ) . toEqual ( `App.loadBundle("chunk-97e00951.js",["exports"],function(o){window,o.someFn=function(o){o?console.log(!0):console.log(!1)}});` ) ;
7365 } ) ;
7466
7567 it ( 'should minify es2017 build' , async ( ) => {
@@ -85,7 +77,7 @@ describe('build', () => {
8577 expect ( r . hasSvg ) . toBe ( false ) ;
8678
8779 const output = await c . fs . readFile ( path . join ( root , 'www' , 'build' , 'app' , 'cmp-a.entry.js' ) ) ;
88- expect ( output ) . toContain ( '/*! Built with http://stenciljs.com */\nconst{h:t}=window.App; class s {static get is(){return"cmp-a"}}export{s as CmpA};') ;
80+ expect ( output ) . toEqual ( ' class t {static get is(){return"cmp-a"}}export{t as CmpA};') ;
8981 } ) ;
9082
9183 it ( 'should build app files, app global and component' , async ( ) => {
0 commit comments