1 | import webpack from './helpers/compiler';
|
2 |
|
3 | describe('Loader', () => {
|
4 | test('Defaults', async () => {
|
5 | const config = {
|
6 | loader: {
|
7 | test: /\.js$/,
|
8 | options: {},
|
9 | },
|
10 | };
|
11 |
|
12 | const stats = await webpack('fixture.js', config);
|
13 | const { source } = stats.toJson().modules[1];
|
14 |
|
15 | expect(source).toMatchSnapshot();
|
16 | });
|
17 | });
|