Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add ignoreOrder flag #422

Merged
merged 6 commits into from Jul 15, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 44 additions & 0 deletions test/IgnoreOrder.test.js
@@ -0,0 +1,44 @@
import path from 'path';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename file ignoreOrder-option.test.js

import webpack from 'webpack';

describe('IgnoreOrder', () => {
it('should emit errors', (done) => {
const casesDirectory = path.resolve(__dirname, 'cases');
const directoryForCase = path.resolve(casesDirectory, 'ignoreOrderFalse');
// eslint-disable-next-line import/no-dynamic-require, global-require
const webpackConfig = require(path.resolve(
directoryForCase,
'webpack.config.js'
));
const compiler = webpack({
...webpackConfig,
mode: 'development',
context: directoryForCase,
cache: false,
});
compiler.run((err1, stats) => {
expect(stats.hasWarnings()).toBeTruthy();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toBe(true)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just wondering why toBeTruthy(); is "better". Seems like the exact same shit to me...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done();
});
});

it('should not emit errors', (done) => {
const casesDirectory = path.resolve(__dirname, 'cases');
const directoryForCase = path.resolve(casesDirectory, 'ignoreOrder');
// eslint-disable-next-line import/no-dynamic-require, global-require
const webpackConfig = require(path.resolve(
directoryForCase,
'webpack.config.js'
));
const compiler = webpack({
...webpackConfig,
mode: 'development',
context: directoryForCase,
cache: false,
});
compiler.run((err1, stats) => {
expect(stats.hasWarnings()).toBeFalsy();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toBe(false)

done();
});
});
});