test: more timeout for webpack compile test

This commit is contained in:
endiliey 2018-08-11 14:23:11 +08:00
parent 0f28b6f311
commit a4f0ed7c94

View File

@ -16,31 +16,33 @@ function compile(config) {
}
describe('webpack', () => {
const timeOut = 10000; // 10 seconds
test('dev simple', async () => {
console.log = jest.fn();
const props = await loadSetup('simple');
const config = createDevConfig(props).toConfig();
return expect(compile(config)).resolves.toBe('Compiled successfully');
});
}, timeOut);
test('dev custom', async () => {
console.log = jest.fn();
const props = await loadSetup('custom');
const config = createDevConfig(props).toConfig();
return expect(compile(config)).resolves.toBe('Compiled successfully');
});
}, timeOut);
test('prod simple', async () => {
console.log = jest.fn();
const props = await loadSetup('simple');
const config = createProdConfig(props).toConfig();
return expect(compile(config)).resolves.toBe('Compiled successfully');
});
}, timeOut);
test('prod custom', async () => {
console.log = jest.fn();
const props = await loadSetup('custom');
const config = createProdConfig(props).toConfig();
return expect(compile(config)).resolves.toBe('Compiled successfully');
});
}, timeOut);
});