Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Remove unnecessary specificity from webpack config test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaridmargolin committed Mar 20, 2017
1 parent d71fee5 commit 9826301
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions packages/neutrino/test/api_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,32 +124,9 @@ test('command emits events around execution', async (t) => {
test('creates a Webpack config', t => {
const api = new Neutrino();

api.use(api => {
api.config.module
.rule('compile')
.test(/\.js$/)
.include
.add('src')
.end()
.use('babel')
.loader('babel-loader')
.options({ alpha: 'a', beta: 'b' });
});
api.use(api => api.config.module
.rule('compile')
.test(/\.js$/));

t.deepEqual(api.getWebpackConfig(), {
module: {
rules: [
{
test: /\.js$/,
include: ['src'],
use: [
{
loader: 'babel-loader',
options: { alpha: 'a', beta: 'b' }
}
]
}
]
}
});
t.notDeepEqual(api.getWebpackConfig(), {});
});

0 comments on commit 9826301

Please sign in to comment.