From 3757a853a4a6cb2d697768ab4276e2364fc655aa Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 8 Jul 2017 00:17:04 -0400 Subject: [PATCH] fix tests --- test/validator/index.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/test/validator/index.js b/test/validator/index.js index e41e18a1da..0782997573 100644 --- a/test/validator/index.js +++ b/test/validator/index.js @@ -18,18 +18,9 @@ describe("validate", () => { const input = fs.readFileSync(filename, "utf-8").replace(/\s+$/, ""); try { - const errors = []; const warnings = []; svelte.compile(input, { - onerror(error) { - errors.push({ - message: error.message, - pos: error.pos, - loc: error.loc - }); - }, - onwarn(warning) { warnings.push({ message: warning.message, @@ -39,16 +30,11 @@ describe("validate", () => { } }); - const expectedErrors = - tryToLoadJson(`test/validator/samples/${dir}/errors.json`) || []; const expectedWarnings = tryToLoadJson(`test/validator/samples/${dir}/warnings.json`) || []; - assert.deepEqual(errors, expectedErrors); assert.deepEqual(warnings, expectedWarnings); } catch (err) { - if (err.name !== "ParseError") throw err; - try { const expected = require(`./samples/${dir}/errors.json`)[0];