File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/rspack-test-tools/tests/configCases/library/modern-module-asset-entry Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1+ const assert = require ( "assert" ) ;
2+
13/** @type {import("@rspack/core").Configuration } */
24module . exports = {
35 context : __dirname ,
@@ -44,8 +46,10 @@ module.exports = {
4446 const js = list . find ( item => item . endsWith ( "js" ) ) ;
4547 const jsContent = assets [ js ] . source ( ) . toString ( ) ;
4648
47- / i m p o r t i m g _ n a m e s p a c e O b j e c t f r o m [ ' " ] \. \/ s t a t i c \/ i m g \/ i m g \. p n g [ ' " ] / . test ( jsContent ) ;
48- / e x p o r t \s { \s i m g _ n a m e s p a c e O b j e c t \s a s \s d e f a u l t \s } / . test ( jsContent ) ;
49+ const preseveImport = / i m p o r t i m g _ n a m e s p a c e O b j e c t f r o m [ ' " ] \. \/ s t a t i c \/ i m g \/ i m g \. p n g [ ' " ] / . test ( jsContent ) ;
50+ assert ( preseveImport ) ;
51+ const hasExports = / e x p o r t \s { \s i m g _ n a m e s p a c e O b j e c t \s a s \s d e f a u l t \s } / . test ( jsContent ) ;
52+ assert ( hasExports ) ;
4953 } )
5054 } ) ;
5155 }
You can’t perform that action at this time.
0 commit comments