Skip to content

Commit

Permalink
Make tests use more webpack 4 goodiness
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceK33z committed Feb 26, 2018
1 parent 9934724 commit 31d94ab
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 15 deletions.
6 changes: 3 additions & 3 deletions test/Routes.test.js
Expand Up @@ -52,7 +52,7 @@ describe('Routes', () => {
});

it('GET request to magic html', (done) => {
req.get('/bundle')
req.get('/main')
.expect(200, magicHtml.trim(), done);
});
});
Expand All @@ -68,7 +68,7 @@ describe('Routes', () => {
after(helper.close);

it('GET request with headers', (done) => {
req.get('/bundle')
req.get('/main')
.expect('X-Foo', '1')
.expect(200, done);
});
Expand All @@ -85,7 +85,7 @@ describe('Routes', () => {
after(helper.close);

it('GET request with headers as an array', (done) => {
req.get('/bundle')
req.get('/main')
.expect('X-Bar', 'key1=value1, key2=value2')
.expect(200, done);
});
Expand Down
6 changes: 2 additions & 4 deletions test/fixtures/cli/webpack.config.js
@@ -1,14 +1,12 @@
'use strict';

module.exports = {
mode: 'development',
context: __dirname,
entry: './foo.js',
output: {
filename: 'bundle.js'
},
plugins: [{
apply(compiler) {
compiler.plugin('done', (stats) => {
compiler.hooks.done.tap('webpack-dev-server', (stats) => {
let exitCode = 0;
if (stats.hasErrors()) {
exitCode = 1;
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/contentbase-config/webpack.config.js
@@ -1,10 +1,10 @@
'use strict';

module.exports = {
mode: 'development',
context: __dirname,
entry: './foo.js',
output: {
filename: 'bundle.js',
publicPath: '/'
}
};
2 changes: 1 addition & 1 deletion test/fixtures/directory-index.txt
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body><ul><li><a href="/bundle.js">bundle.js</a></li><li><a href="/bundle">bundle</a> (magic html for bundle.js) (<a href="/webpack-dev-server/bundle">webpack-dev-server</a>)</li></ul></body></html>
<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body><ul><li><a href="/main.js">main.js</a></li><li><a href="/main">main</a> (magic html for main.js) (<a href="/webpack-dev-server/main">webpack-dev-server</a>)</li></ul></body></html>
@@ -1,10 +1,10 @@
'use strict';

module.exports = {
mode: 'development',
context: __dirname,
entry: './foo.js',
output: {
filename: 'bundle.js',
path: '/'
}
};
@@ -1,10 +1,10 @@
'use strict';

module.exports = {
mode: 'development',
context: __dirname,
entry: './foo.js',
output: {
filename: 'bundle.js',
path: '/'
},
module: {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/historyapifallback-config/webpack.config.js
@@ -1,10 +1,10 @@
'use strict';

module.exports = {
mode: 'development',
context: __dirname,
entry: './foo.js',
output: {
filename: 'bundle.js',
path: '/'
},
module: {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/magic-html.txt
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body><script type="text/javascript" charset="utf-8" src="/bundle.js"></script></body></html>
<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body><script type="text/javascript" charset="utf-8" src="/main.js"></script></body></html>
2 changes: 1 addition & 1 deletion test/fixtures/proxy-config/webpack.config.js
@@ -1,10 +1,10 @@
'use strict';

module.exports = {
mode: 'development',
context: __dirname,
entry: './foo.js',
output: {
filename: 'bundle.js',
path: '/'
}
};
2 changes: 1 addition & 1 deletion test/fixtures/simple-config/webpack.config.js
@@ -1,10 +1,10 @@
'use strict';

module.exports = {
mode: 'development',
context: __dirname,
entry: './foo.js',
output: {
filename: 'bundle.js',
path: '/'
},
node: false
Expand Down

0 comments on commit 31d94ab

Please sign in to comment.