Skip to content

Commit 8cd7c05

Browse files
Fixes npm test command
1 parent 5eb6cc5 commit 8cd7c05

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

karma-base.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ module.exports = {
1313

1414
webpack: {
1515
devtool: '#inline-source-map',
16-
resolve: {
17-
extensions: ['', '.js', '.es6'],
18-
alias: {
19-
'xregexp': 'xregexp/src/xregexp',
20-
},
21-
},
2216
module: {
2317
loaders: [
2418
{
25-
test: [/\.js$/, /\.es6$/],
26-
exclude: /node_modules/,
19+
test: /\.js$/,
20+
// exclude: /node_modules/,
21+
include: [
22+
/syntaxhighlighter-.*/,
23+
/brush-.*/,
24+
`${__dirname}/src`,
25+
`${__dirname}/tests`,
26+
],
2727
loader: 'babel',
2828
},
2929
],

karma-build.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = function (config) {
77
served: true,
88
included: false,
99
},
10-
'tests/**/build.test.js',
10+
'tests/build.test.js',
1111
];
1212

1313
config.set(opts);

karma-smoke.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = function (config) {
22
const opts = require('./karma-base.js');
33

44
opts.files = [
5-
'tests/**/smoke.test.js',
5+
'tests/smoke.test.js',
66
];
77

88
config.set(opts);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "npm run test-smoke && npm run test-build && npm run test-commonjs",
1010
"test-smoke": "karma start karma-smoke.conf.js --single-run",
1111
"test-build": "gulp build --output tests/build-dest --theme tests/build-source/theme.scss --brushes tests/fixtures/test_brush_v4.js && karma start karma-build.conf.js --single-run",
12-
"test-commonjs": "mocha --opts tests/mocha.opts tests/commonjs.test.js",
12+
"test-commonjs": "babel-node --only='src/**,tests/**,syntaxhighlighter-*,brush-*' node_modules/.bin/_mocha --opts tests/mocha.opts tests/commonjs.test.js",
1313
"build": "gulp build --brushes all"
1414
},
1515
"main": "./src/index.js",

tests/mocha.opts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
--compilers js:babel-register
21
--recursive
32
--reporter spec
43
--ui bdd

0 commit comments

Comments
 (0)