Skip to content

Commit 472feed

Browse files
committed
chore: update
1 parent 5e11132 commit 472feed

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/integration/auto-external/index.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ test('auto external should be disabled when bundle is false', async () => {
4444
const fixturePath = join(__dirname, 'bundle-false');
4545
const { js } = await buildAndGetResults({ fixturePath, type: 'all' });
4646

47-
expect(js.files.esm).not.toContain(
47+
expect(Object.values(js.contents.esm)[0]).toContain(
4848
'import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react"',
4949
);
5050

51-
expect(js.files.cjs).not.toContain(
52-
'var external_react_namespaceObject = require("react");',
51+
expect(Object.values(js.contents.cjs)[0]).toContain(
52+
'const external_react_namespaceObject = require("react");',
5353
);
5454
});
5555

@@ -62,7 +62,7 @@ test('auto external false should works', async () => {
6262
);
6363

6464
expect(js.entries.cjs).not.toContain(
65-
'var external_react_namespaceObject = require("react");',
65+
'const external_react_namespaceObject = require("react");',
6666
);
6767

6868
// dts should bundled

0 commit comments

Comments
 (0)