File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
tests/integration/externals Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ test('should get warn when use require in ESM', async () => {
4040 const fixturePath = join ( __dirname , 'module-import-warn' ) ;
4141 const { entries } = await buildAndGetResults ( { fixturePath } ) ;
4242 const logStrings = logs . map ( ( log ) => stripAnsi ( log ) ) ;
43+ const issuer = join ( fixturePath , 'src/index.ts' ) ;
4344
4445 for ( const external of [
4546 'import * as __WEBPACK_EXTERNAL_MODULE_bar__ from "bar";' ,
@@ -51,15 +52,15 @@ test('should get warn when use require in ESM', async () => {
5152 for ( const external of [ 'foo' , 'bar' , 'qux' ] ) {
5253 expect (
5354 logStrings . some ( ( l ) =>
54- l . includes ( stripAnsi ( composeModuleImportWarn ( external ) ) ) ,
55+ l . includes ( stripAnsi ( composeModuleImportWarn ( external , issuer ) ) ) ,
5556 ) ,
5657 ) . toBe ( true ) ;
5758 }
5859
5960 for ( const external of [ './baz' , 'quxx' ] ) {
6061 expect (
6162 logStrings . some ( ( l ) =>
62- l . includes ( stripAnsi ( composeModuleImportWarn ( external ) ) ) ,
63+ l . includes ( stripAnsi ( composeModuleImportWarn ( external , issuer ) ) ) ,
6364 ) ,
6465 ) . toBe ( false ) ;
6566 }
You can’t perform that action at this time.
0 commit comments