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