Skip to content

Commit d5c716f

Browse files
committed
chore: update
1 parent c61122f commit d5c716f

File tree

4 files changed

+16
-26
lines changed

4 files changed

+16
-26
lines changed

tests/integration/redirect/asset.test.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,13 @@ beforeAll(async () => {
1212
test('0. default', async () => {
1313
const { content: indexJs } = queryContent(contents.esm0!, /index\.js/);
1414
const { content: indexCjs } = queryContent(contents.cjs0!, /index\.cjs/);
15-
expect(indexJs).toMatchInlineSnapshot(`
16-
"import logo from "./assets/logo.js";
17-
"
18-
`);
15+
expect(indexJs).toContain('import logo from "./assets/logo.js";');
1916
expect(indexCjs).toContain('require("./assets/logo.cjs")');
2017
});
2118

2219
test('1. redirect.asset = false', async () => {
2320
const { content: indexJs } = queryContent(contents.esm1!, /index\.js/);
2421
const { content: indexCjs } = queryContent(contents.cjs1!, /index\.cjs/);
25-
expect(indexJs).toMatchInlineSnapshot(`
26-
"import logo from "./assets/logo.svg";
27-
"
28-
`);
22+
expect(indexJs).toContain('import logo from "./assets/logo.svg";');
2923
expect(indexCjs).toContain('require("./assets/logo.svg")');
3024
});
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import svg from './assets/logo.svg';
22

3-
svg;
3+
console.log('svg: ', svg);

tests/integration/redirect/style.test.ts

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ test('0. default', async () => {
3232
contents.cjs0!,
3333
/cjs\/module\/index\.cjs/,
3434
);
35-
expect(cssModuleIndexJs).toMatchInlineSnapshot(`
36-
"import index_module from "./index.module.js";
37-
"
38-
`);
35+
expect(cssModuleIndexJs).toContain(
36+
'import index_module from "./index.module.js";',
37+
);
3938
expect(cssModuleIndexCjs).toContain(
4039
'const external_index_module_cjs_namespaceObject = require("./index.module.cjs");',
4140
);
@@ -64,10 +63,9 @@ test('1. style.path: false', () => {
6463
contents.cjs1!,
6564
/cjs\/module\/index\.cjs/,
6665
);
67-
expect(cssModuleIndexJs).toMatchInlineSnapshot(`
68-
"import index_module from "@/module/index.module.js";
69-
"
70-
`);
66+
expect(cssModuleIndexJs).toContain(
67+
'import index_module from "@/module/index.module.js";',
68+
);
7169
expect(cssModuleIndexCjs).toContain(
7270
'const index_module_cjs_namespaceObject = require("@/module/index.module.cjs");',
7371
);
@@ -96,10 +94,9 @@ test('2. style.extension: false', async () => {
9694
contents.cjs2!,
9795
/cjs\/module\/index\.cjs/,
9896
);
99-
expect(cssModuleIndexJs).toMatchInlineSnapshot(`
100-
"import index_module from "./index.module.less";
101-
"
102-
`);
97+
expect(cssModuleIndexJs).toContain(
98+
'import index_module from "./index.module.less";',
99+
);
103100
expect(cssModuleIndexCjs).toContain(
104101
'const external_index_module_less_namespaceObject = require("./index.module.less");',
105102
);
@@ -128,10 +125,9 @@ test('3. style.path: false, style.extension: false', async () => {
128125
contents.cjs3!,
129126
/cjs\/module\/index\.cjs/,
130127
);
131-
expect(cssModuleIndexJs).toMatchInlineSnapshot(`
132-
"import index_module from "@/module/index.module.less";
133-
"
134-
`);
128+
expect(cssModuleIndexJs).toContain(
129+
'import index_module from "@/module/index.module.less";',
130+
);
135131
expect(cssModuleIndexCjs).toContain(
136132
'const index_module_cjs_namespaceObject = require("@/module/index.module.cjs");',
137133
);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// @ts-ignore env.d.ts
22
import styles from '@/module/index.module.less';
33

4-
styles;
4+
console.log('styles: ', styles);

0 commit comments

Comments
 (0)