diff --git a/test/js/update.ts b/test/js/update.ts index da5681b72f..b2bf508e51 100644 --- a/test/js/update.ts +++ b/test/js/update.ts @@ -1,6 +1,6 @@ import { loadConfig, update_expected } from "../helpers"; -export function sanitize(compiled){ +export function sanitize(compiled) { return compiled.js.code.replace(/generated by Svelte v\d+\.\d+\.\d+(-\w+\.\d+)?/, 'generated by Svelte vX.Y.Z'); } diff --git a/test/parser/update.ts b/test/parser/update.ts index 5dbd1b2473..464c868f69 100644 --- a/test/parser/update.ts +++ b/test/parser/update.ts @@ -1,16 +1,16 @@ import { update_expected } from "../update"; -export function sanitize_ast(compiled){ +export function sanitize_ast(compiled) { return compiled.ast; } -export function sanitize_error(e){ +export function sanitize_error(e) { return { code: e.code, message: e.message, start: e.start, pos: e.pos - } + }; } // this file will replace all the expected.js files with their _actual