Skip to content

Commit d06a0b3

Browse files
committed
Fix eslint-loader test cases
1 parent 27b641e commit d06a0b3

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

test/loaders/eslint.js

+16-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ describe('loaders/eslint', () => {
2828
config.enableEslintLoader();
2929
const actualOptions = eslintLoader.getOptions(config);
3030

31-
expect(Object.keys(actualOptions)).to.have.lengthOf(4);
31+
expect(actualOptions).to.deep.equal({
32+
cache: true,
33+
parser: 'babel-eslint',
34+
emitWarning: true
35+
});
3236
});
3337

3438
it('getOptions() with extra options', () => {
@@ -39,8 +43,12 @@ describe('loaders/eslint', () => {
3943

4044
const actualOptions = eslintLoader.getOptions(config);
4145

42-
expect(Object.keys(actualOptions)).to.have.lengthOf(5);
43-
expect(actualOptions.extends).to.equal('airbnb');
46+
expect(actualOptions).to.deep.equal({
47+
cache: true,
48+
parser: 'babel-eslint',
49+
emitWarning: true,
50+
extends: 'airbnb'
51+
});
4452
});
4553

4654
it('getOptions() with an overridden option', () => {
@@ -51,8 +59,11 @@ describe('loaders/eslint', () => {
5159

5260
const actualOptions = eslintLoader.getOptions(config);
5361

54-
expect(Object.keys(actualOptions)).to.have.lengthOf(4);
55-
expect(actualOptions.emitWarning).to.equal(false);
62+
expect(actualOptions).to.deep.equal({
63+
cache: true,
64+
parser: 'babel-eslint',
65+
emitWarning: false
66+
});
5667
});
5768

5869
it('getOptions() with a callback that returns an object', () => {

0 commit comments

Comments
 (0)