UNPKG

366 BJavaScriptView Raw
1import webpack from './helpers/compiler';
2
3describe('Errors', () => {
4 test('Validation Error', async () => {
5 const config = {
6 loader: {
7 test: /\.js$/,
8 options: { name: 'fail' },
9 },
10 };
11
12 const stats = await webpack('fixture.js', config);
13 const { errors } = stats.toJson();
14
15 expect(errors).toMatchSnapshot();
16 });
17});