0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

return promise, so that test results are correct

This commit is contained in:
Rich Harris 2017-12-02 23:20:43 -05:00
parent 16599690a5
commit 69b74d96bc

View File

@ -31,7 +31,7 @@ function checkCodeIsValid(code) {
}
}
describe('preprocess', () => {
describe.only('preprocess', () => {
fs.readdirSync('test/preprocess/samples').forEach(dir => {
if (dir[0] === '.') return;
@ -51,9 +51,9 @@ describe('preprocess', () => {
fs.readFileSync(`test/preprocess/samples/${dir}/input.html`,
'utf-8').replace(/\s+$/, '');
svelte.preprocess(input, config).
then(processed => processed.toString()).
then(processed => {
return svelte.preprocess(input, config)
.then(processed => processed.toString())
.then(processed => {
const expectedWarnings = (config.warnings || []).map(
normalizeWarning);
@ -153,8 +153,6 @@ describe('preprocess', () => {
throw err;
}
}
}).catch(error => {
throw error;
});
});
});