You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/parser/update.ts

20 lines
485 B

import { replaceIfUpdated } from "../tiny-glob";
// this file will replace all the expected.js files with their _actual
// equivalents. Only use it when you're sure that you haven't
// broken anything!
replaceIfUpdated((compile, check) => {
try {
check("output.json", compile({ generate: false }).ast);
} catch (e) {
if (e.name !== "ParseError") throw e;
check("error.json", {
code: e.code,
message: e.message,
start: e.start,
pos: e.pos,
});
}
}, __dirname);