From b2b3588cddd9ac92a00061c53e22eff88ed297d3 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 2 Dec 2017 23:33:32 -0500 Subject: [PATCH] use helper --- test/preprocess/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 = [];