-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
Changes from 1 commit
0b98038
e11f3d5
78e6c8f
98de7b4
e6aa3f6
f5e23e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import path from 'path'; | ||
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(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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... There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
done(); | ||
}); | ||
}); | ||
}); |
There was a problem hiding this comment.
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