diff --git a/test/preprocess/index.js b/test/preprocess/index.js index 4f59e4fe6b..d01963a26f 100644 --- a/test/preprocess/index.js +++ b/test/preprocess/index.js @@ -46,15 +46,12 @@ describe.only('preprocess', () => { (solo ? it.only : skip ? it.skip : it)(dir, () => { const config = tryRequire(`./samples/${dir}/_config.js`) || {}; const input = fs.existsSync(`test/preprocess/samples/${dir}/input.pug`) ? - fs.readFileSync(`test/preprocess/samples/${dir}/input.pug`, - 'utf-8').replace(/\s+$/, '') : - fs.readFileSync(`test/preprocess/samples/${dir}/input.html`, - 'utf-8').replace(/\s+$/, ''); + read(`test/preprocess/samples/${dir}/input.pug`) : + read(`test/preprocess/samples/${dir}/input.html`); return svelte.preprocess(input, config) .then(processed => processed.toString()) .then(processed => { - const expectedWarnings = (config.warnings || []).map( normalizeWarning); const domWarnings = [];