Skip to content

Commit

Permalink
Move mocha to npm scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Feb 3, 2021
1 parent 34a65fd commit 2fdf362
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 26 deletions.
17 changes: 2 additions & 15 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,12 @@ module.exports = function (grunt) {
dest: 'tests/outputUrl.css'
}]
}
},

// Unit tests.
simplemocha: {
test: {
src: 'tests/selectors.js'
}
}
});

// Actually load this plugin's task(s).
grunt.loadTasks('tasks');
grunt.loadNpmTasks('grunt-simple-mocha');

grunt.registerTask('test', [
'uncss',
'simplemocha'
]);

// By default, lint and run all tests.
grunt.registerTask('default', 'test');
grunt.registerTask('test', 'uncss');
grunt.registerTask('default', 'uncss');
};
9 changes: 0 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
"node": ">=10"
},
"scripts": {
"mocha": "mocha \"tests/*.js\"",
"xo": "xo",
"test": "npm run xo && grunt test"
"test": "npm run xo && grunt test && npm run mocha"
},
"dependencies": {
"chalk": "^4.1.0",
Expand All @@ -39,7 +40,7 @@
"devDependencies": {
"chai": "^4.2.0",
"grunt": "^1.1.0",
"grunt-simple-mocha": "^0.4.1",
"mocha": "^8.2.1",
"time-grunt": "^2.0.0",
"xo": "^0.37.1"
},
Expand Down

0 comments on commit 2fdf362

Please sign in to comment.