@@ -29,27 +29,18 @@ test('tree shaking is disabled by the user, bar and baz should be kept', async (
2929 ` ) ;
3030} ) ;
3131
32- describe ( 'mf build' , ( ) => {
33- beforeEach ( ( ) => {
34- vi . stubEnv ( 'NODE_ENV' , 'production' ) ;
35- } ) ;
36-
37- afterEach ( ( ) => {
38- vi . unstubAllEnvs ( ) ;
39- } ) ;
40-
41- test ( 'minify is enabled by default in mf format, bar and baz should be minified' , async ( ) => {
42- const fixturePath = join ( __dirname , 'mf/default' ) ;
43- const { mfExposeEntry } = await buildAndGetResults ( { fixturePath } ) ;
44- // biome-ignore format: snapshot
45- expect ( mfExposeEntry ) . toMatchInlineSnapshot ( `""use strict";(globalThis["default_minify"]=globalThis["default_minify"]||[]).push([["249"],{163:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{foo:function(){return foo}});const foo=()=>{}}}]);"` ) ;
46- } ) ;
32+ test ( 'minify is enabled by default in mf format, bar and baz should be minified' , async ( ) => {
33+ const fixturePath = join ( __dirname , 'mf/default' ) ;
34+ const { mfExposeEntry } = await buildAndGetResults ( { fixturePath } ) ;
35+ // biome-ignore format: snapshot
36+ expect ( mfExposeEntry ) . toMatchInlineSnapshot ( `""use strict";(globalThis["default_minify"]=globalThis["default_minify"]||[]).push([["249"],{163:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{foo:function(){return foo}});const foo=()=>{}}}]);"` ) ;
37+ } ) ;
4738
48- test ( 'minify is disabled by the user, bar and baz should not be minified' , async ( ) => {
49- const fixturePath = join ( __dirname , 'mf/config' ) ;
50- const { mfExposeEntry } = await buildAndGetResults ( { fixturePath } ) ;
39+ test ( 'minify is disabled by the user, bar and baz should not be minified' , async ( ) => {
40+ const fixturePath = join ( __dirname , 'mf/config' ) ;
41+ const { mfExposeEntry } = await buildAndGetResults ( { fixturePath } ) ;
5142
52- expect ( mfExposeEntry ) . toMatchInlineSnapshot ( `""use strict";
43+ expect ( mfExposeEntry ) . toMatchInlineSnapshot ( `""use strict";
5344(globalThis['disable_minify'] = globalThis['disable_minify'] || []).push([["249"], {
5445"163": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5546__webpack_require__.r(__webpack_exports__);
@@ -66,5 +57,4 @@ const baz = ()=>{
6657}),
6758
6859}]);"` ) ;
69- } ) ;
7060} ) ;
0 commit comments