Skip to content

Commit f199cfe

Browse files
test(tooling): load the parse-xml stand-in's tree from JSON rather than built source
1 parent ab4c991 commit f199cfe

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎test/unitCases/tooling/compare-xml.unittest.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,13 @@ describe("the XML tool comparison — agreeing with @rgrove/parse-xml", () => {
243243
// so the stand-in is a file that entry points at.
244244
directory = fs.mkdtempSync(path.join(os.tmpdir(), "compare-xml-"));
245245
const entry = path.join(directory, "parse-xml.js");
246+
fs.writeFileSync(
247+
path.join(directory, "parsed.json"),
248+
JSON.stringify(parsed)
249+
);
246250
fs.writeFileSync(
247251
entry,
248-
`exports.parseXml = () => (${JSON.stringify(parsed)});\n`
252+
'exports.parseXml = () => require("./parsed.json");\n'
249253
);
250254
const main = path.relative(
251255
path.join(CACHE, "node_modules", "@rgrove/parse-xml"),

0 commit comments

Comments
 (0)