Skip to content

Commit e1de032

Browse files
committed
chore: update
1 parent 592b94d commit e1de032

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/integration/externals/index.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)