Skip to content

Commit e254542

Browse files
authored
test: add YAML and TOML tests (#876)
1 parent 2aa95c1 commit e254542

File tree

23 files changed

+313
-118
lines changed

23 files changed

+313
-118
lines changed

pnpm-lock.yaml

Lines changed: 83 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration/asset/__snapshots__/index.test.ts.snap

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,6 @@ export { draft_rslib_entry_namespaceObject as default };
1212
"
1313
`;
1414

15-
exports[`use json 1`] = `
16-
"var data_namespaceObject = {
17-
R: 1,
18-
K: [
19-
"2"
20-
]
21-
};
22-
console.log(data_namespaceObject.R);
23-
console.log(data_namespaceObject.K);
24-
"
25-
`;
26-
27-
exports[`use json 2`] = `
28-
"var data_rslib_entry_namespaceObject = JSON.parse('{"foo":1,"bar":["2"]}');
29-
var __webpack_exports__bar = data_rslib_entry_namespaceObject.bar;
30-
var __webpack_exports__foo = data_rslib_entry_namespaceObject.foo;
31-
export { __webpack_exports__bar as bar, __webpack_exports__foo as foo };
32-
"
33-
`;
34-
3515
exports[`use source.assetInclude 1`] = `
3616
"import draft_namespaceObject from "./static/assets/draft.txt";
3717
console.log(draft_namespaceObject);

tests/integration/asset/hash/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "asset-name-test",
2+
"name": "asset-hash-test",
33
"version": "1.0.0",
44
"private": true,
55
"type": "module",

0 commit comments

Comments
 (0)