Skip to content

Commit e50fd62

Browse files
test: webpack@4
1 parent d7ccc9b commit e50fd62

File tree

7 files changed

+9
-21
lines changed

7 files changed

+9
-21
lines changed
+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
const webpack = require('webpack');
22

3-
module.exports = () => {
4-
return webpack.version[0] !== '4';
5-
};
3+
module.exports = () => webpack.version[0] !== '4';
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
const webpack = require('webpack');
22

3-
module.exports = () => {
4-
return webpack.version[0] !== '4';
5-
};
3+
module.exports = () => webpack.version[0] !== '4';

test/cases/dependOn/test.filter.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
const webpack = require('webpack');
22

3-
module.exports = () => {
4-
return webpack.version[0] !== '4';
5-
};
3+
module.exports = () => webpack.version[0] !== '4';

test/helpers/compile.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export default (compiler) => {
2-
return new Promise((resolve, reject) => {
1+
export default (compiler) =>
2+
new Promise((resolve, reject) => {
33
compiler.run((error, stats) => {
44
if (error) {
55
return reject(error);
@@ -8,4 +8,3 @@ export default (compiler) => {
88
return resolve(stats);
99
});
1010
});
11-
};

test/helpers/getErrors.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
import normalizeErrors from './normalizeErrors';
22

3-
export default (stats) => {
4-
return normalizeErrors(stats.compilation.errors);
5-
};
3+
export default (stats) => normalizeErrors(stats.compilation.errors);

test/helpers/getWarnings.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
import normalizeErrors from './normalizeErrors';
22

3-
export default (stats) => {
4-
return normalizeErrors(stats.compilation.warnings);
5-
};
3+
export default (stats) => normalizeErrors(stats.compilation.warnings);

test/helpers/normalizeErrors.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ function removeCWD(str) {
1212
return str.replace(new RegExp(cwd, 'g'), '');
1313
}
1414

15-
export default (errors) => {
16-
return errors.map((error) =>
15+
export default (errors) =>
16+
errors.map((error) =>
1717
removeCWD(error.toString().split('\n').slice(0, 2).join('\n'))
1818
);
19-
};

0 commit comments

Comments
 (0)