Skip to content

Commit 9730fa8

Browse files
committed
fixing tests
1 parent f1c0dd1 commit 9730fa8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/plugins/clean.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ describe('plugins/clean', () => {
4141
cleanPluginUtil(plugins, config);
4242
expect(plugins.length).to.equal(1);
4343
expect(plugins[0].plugin).to.be.instanceof(CleanWebpackPlugin);
44-
expect(plugins[0].plugin.options.cleanOnceBeforeBuildPatterns).to.deep.equal(['**/*']);
45-
expect(plugins[0].plugin.options.dry).to.equal(false);
44+
expect(plugins[0].plugin.cleanOnceBeforeBuildPatterns).to.deep.equal(['**/*']);
45+
expect(plugins[0].plugin.dry).to.equal(false);
4646
});
4747

4848
it('enabled with custom paths and options callback', () => {
@@ -56,8 +56,8 @@ describe('plugins/clean', () => {
5656
cleanPluginUtil(plugins, config);
5757
expect(plugins.length).to.equal(1);
5858
expect(plugins[0].plugin).to.be.instanceof(CleanWebpackPlugin);
59-
expect(plugins[0].plugin.options.cleanOnceBeforeBuildPatterns).to.deep.equal(['**/*.js', '**/*.css']);
60-
expect(plugins[0].plugin.options.dry).to.equal(true);
59+
expect(plugins[0].plugin.cleanOnceBeforeBuildPatterns).to.deep.equal(['**/*.js', '**/*.css']);
60+
expect(plugins[0].plugin.dry).to.equal(true);
6161
});
6262

6363
it('enabled with an options callback that returns an object', () => {
@@ -68,13 +68,13 @@ describe('plugins/clean', () => {
6868
options.dry = true;
6969

7070
// This should override the original config
71-
return { foo: true };
71+
return { verbose: true };
7272
});
7373

7474
cleanPluginUtil(plugins, config);
7575
expect(plugins.length).to.equal(1);
7676
expect(plugins[0].plugin).to.be.instanceof(CleanWebpackPlugin);
77-
expect(plugins[0].plugin.options.dry).to.equal(false);
78-
expect(plugins[0].plugin.options.foo).to.equal(true);
77+
expect(plugins[0].plugin.dry).to.equal(false);
78+
expect(plugins[0].plugin.verbose).to.equal(true);
7979
});
8080
});

0 commit comments

Comments
 (0)