Skip to content

Commit aa1d807

Browse files
authored
test: add glob import test case (#19516)
1 parent 276c1d3 commit aa1d807

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/vite/src/node/__tests__/plugins/importGlob/__snapshots__/fixture.spec.ts.snap

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export const excludeSelf = /* #__PURE__ */ Object.assign({"./sibling.ts": () =>
6969
7070
7171
});
72+
export const excludeSelfRaw = /* #__PURE__ */ Object.assign({"./sibling.ts": () => import("./sibling.ts?raw")});
7273
export const customQueryString = /* #__PURE__ */ Object.assign({"./sibling.ts": () => import("./sibling.ts?custom")});
7374
export const customQueryObject = /* #__PURE__ */ Object.assign({"./sibling.ts": () => import("./sibling.ts?foo=bar&raw=true")
7475
@@ -164,6 +165,7 @@ export const excludeSelf = /* #__PURE__ */ Object.assign({"./sibling.ts": () =>
164165
165166
166167
});
168+
export const excludeSelfRaw = /* #__PURE__ */ Object.assign({"./sibling.ts": () => import("./sibling.ts?raw")});
167169
export const customQueryString = /* #__PURE__ */ Object.assign({"./sibling.ts": () => import("./sibling.ts?custom&lang.ts")});
168170
export const customQueryObject = /* #__PURE__ */ Object.assign({"./sibling.ts": () => import("./sibling.ts?foo=bar&raw=true&lang.ts")
169171

packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export const excludeSelf = import.meta.glob(
8080
* for test: annotation contain ")"
8181
* */
8282
)
83+
export const excludeSelfRaw = import.meta.glob('./*.ts', { query: '?raw' })
8384

8485
export const customQueryString = import.meta.glob('./*.ts', { query: 'custom' })
8586

0 commit comments

Comments
 (0)