@@ -29,27 +29,18 @@ test('tree shaking is disabled by the user, bar and baz should be kept', async (
29
29
` ) ;
30
30
} ) ;
31
31
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
+ } ) ;
47
38
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 } ) ;
51
42
52
- expect ( mfExposeEntry ) . toMatchInlineSnapshot ( `""use strict";
43
+ expect ( mfExposeEntry ) . toMatchInlineSnapshot ( `""use strict";
53
44
(globalThis['disable_minify'] = globalThis['disable_minify'] || []).push([["249"], {
54
45
"163": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
55
46
__webpack_require__.r(__webpack_exports__);
@@ -66,5 +57,4 @@ const baz = ()=>{
66
57
}),
67
58
68
59
}]);"` ) ;
69
- } ) ;
70
60
} ) ;
0 commit comments