Skip to content

Commit ccbc162

Browse files
committed
chore: update
1 parent 92dc4ec commit ccbc162

File tree

4 files changed

+16
-74
lines changed

4 files changed

+16
-74
lines changed

tests/integration/redirect/js-not-resolve/src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@ import lodash from 'lodash';
44
import prettier from 'prettier';
55
import bar from './bar.js';
66
import foo from './foo';
7+
import foo_node from './foo.node';
8+
import foo_node_js from './foo.node.js';
79

8-
export default lodash.toUpper(foo + bar + typeof prettier.version);
10+
export default lodash.toUpper(
11+
foo + foo_node + foo_node_js + bar + typeof prettier.version,
12+
);

tests/integration/redirect/js.test.ts

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,6 @@ test('redirect.js default', async () => {
1818
contents.cjs0!,
1919
/cjs\/index\.cjs/,
2020
);
21-
const { content: notResolvedContent } = queryContent(
22-
contents.esm0!,
23-
/esm\/not-resolved\.js/,
24-
);
25-
26-
expect(notResolvedContent).toMatchInlineSnapshot(`
27-
"export * from "not_resolved";
28-
export * from "./foo.node";
29-
export * from "./foo.node.js";
30-
export * from "./not_resolved_file";
31-
"
32-
`);
3321

3422
expect(indexContent).toMatchInlineSnapshot(`
3523
"import lodash from "lodash";
@@ -63,19 +51,6 @@ test('redirect.js.path false', async () => {
6351
/esm\/index\.js/,
6452
);
6553

66-
const { content: notResolvedContent } = queryContent(
67-
contents.esm1!,
68-
/esm\/not-resolved\.js/,
69-
);
70-
71-
expect(notResolvedContent).toMatchInlineSnapshot(`
72-
"export * from "not_resolved";
73-
export * from "./foo.node";
74-
export * from "./foo.node.js";
75-
export * from "./not_resolved_file";
76-
"
77-
`);
78-
7954
expect(indexContent).toMatchInlineSnapshot(`
8055
"import lodash from "lodash";
8156
import lodash_merge from "lodash.merge";
@@ -108,19 +83,6 @@ test('redirect.js.path with user override externals', async () => {
10883
/cjs\/index\.cjs/,
10984
);
11085

111-
const { content: notResolvedContent } = queryContent(
112-
contents.esm2!,
113-
/esm\/not-resolved\.js/,
114-
);
115-
116-
expect(notResolvedContent).toMatchInlineSnapshot(`
117-
"export * from "not_resolved";
118-
export * from "./foo.node";
119-
export * from "./foo.node.js";
120-
export * from "./not_resolved_file";
121-
"
122-
`);
123-
12486
expect(indexContent).toMatchInlineSnapshot(`
12587
"import lodash from "lodash";
12688
import lodash_merge from "lodash.merge";
@@ -161,19 +123,6 @@ test('redirect.js.path with user override alias', async () => {
161123
/cjs\/index\.cjs/,
162124
);
163125

164-
const { content: notResolvedContent } = queryContent(
165-
contents.esm3!,
166-
/esm\/not-resolved\.js/,
167-
);
168-
169-
expect(notResolvedContent).toMatchInlineSnapshot(`
170-
"export * from "not_resolved";
171-
export * from "./foo.node";
172-
export * from "./foo.node.js";
173-
export * from "./not_resolved_file";
174-
"
175-
`);
176-
177126
expect(indexContent).toMatchInlineSnapshot(`
178127
"import lodash from "lodash";
179128
import lodash_merge from "lodash.merge";
@@ -209,18 +158,6 @@ test('redirect.js.extension: false', async () => {
209158
contents.esm4!,
210159
/esm\/index\.js/,
211160
);
212-
const { content: notResolvedContent } = queryContent(
213-
contents.esm4!,
214-
/esm\/not-resolved\.js/,
215-
);
216-
217-
expect(notResolvedContent).toMatchInlineSnapshot(`
218-
"export * from "not_resolved";
219-
export * from "./foo.node";
220-
export * from "./foo.node.js";
221-
export * from "./not_resolved_file";
222-
"
223-
`);
224161

225162
expect(indexContent).toMatchInlineSnapshot(`
226163
"import lodash from "lodash";

tests/integration/redirect/js/src/not-resolved.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/integration/redirect/jsNotResolved.test.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ test('redirect.js default', async () => {
1616
"import lodash from "lodash";
1717
import prettier from "prettier";
1818
import bar from "./bar.js";
19-
import foo from "./foo.js";
20-
const src = lodash.toUpper(foo + bar + typeof prettier.version);
19+
import foo from "./foo";
20+
import foo_0 from "./foo.node";
21+
import foo_node from "./foo.node.js";
22+
const src = lodash.toUpper(foo + foo_0 + foo_node + bar + typeof prettier.version);
2123
export { src as default };
2224
"
2325
`);
@@ -37,8 +39,10 @@ test('redirect.js.path false', async () => {
3739
"import lodash from "lodash";
3840
import prettier from "prettier";
3941
import bar from "./bar.js";
40-
import foo from "./foo.js";
41-
const src = lodash.toUpper(foo + bar + typeof prettier.version);
42+
import foo from "./foo";
43+
import foo_0 from "./foo.node";
44+
import foo_node from "./foo.node.js";
45+
const src = lodash.toUpper(foo + foo_0 + foo_node + bar + typeof prettier.version);
4246
export { src as default };
4347
"
4448
`);
@@ -59,7 +63,9 @@ test('redirect.js.extension: false', async () => {
5963
import prettier from "prettier";
6064
import bar from "./bar.js";
6165
import foo from "./foo";
62-
const src = lodash.toUpper(foo + bar + typeof prettier.version);
66+
import foo_0 from "./foo.node";
67+
import foo_node from "./foo.node.js";
68+
const src = lodash.toUpper(foo + foo_0 + foo_node + bar + typeof prettier.version);
6369
export { src as default };
6470
"
6571
`);

0 commit comments

Comments
 (0)