Add intern task to grunt and associated npm script

This commit is contained in:
Jonathan Budzenski 2015-09-02 14:07:20 -05:00
parent 7bf6266c26
commit 7b8374b7c8
5 changed files with 21 additions and 2 deletions

View file

@ -63,7 +63,7 @@ module.exports = function (grunt) {
init: true,
config: config,
loadGruntTasks: {
pattern: ['grunt-*', '@*/grunt-*', 'gruntify-*', '@*/gruntify-*']
pattern: ['grunt-*', '@*/grunt-*', 'gruntify-*', '@*/gruntify-*', 'intern']
}
});

View file

@ -37,6 +37,7 @@
"test:dev": "grunt test:dev",
"test:quick": "grunt test:quick",
"test:browser": "grunt test:browser",
"test:ui": "grunt test:ui",
"test:server": "grunt test:server",
"test:coverage": "grunt test:coverage",
"build": "grunt build",
@ -144,6 +145,7 @@
"gruntify-eslint": "^1.0.0",
"html-entities": "^1.1.1",
"husky": "^0.8.1",
"intern": "^3.0.1",
"istanbul-instrumenter-loader": "^0.1.3",
"karma": "^0.13.3",
"karma-chrome-launcher": "^0.2.0",

13
tasks/config/intern.js Normal file
View file

@ -0,0 +1,13 @@
var path = require('path');
module.exports = function (grunt) {
return {
options: {
runType: 'runner',
config: 'test/intern',
reporters: ['Console']
},
dev: {}
};
};

View file

@ -14,6 +14,10 @@ module.exports = function (grunt) {
'karma:dev'
]);
grunt.registerTask('test:ui', [
'intern:dev'
]);
grunt.registerTask('test', function (subTask) {
if (subTask) grunt.fail.fatal(`invalid task "test:${subTask}"`);

View file

@ -87,7 +87,7 @@ define({
// Functional test suite(s) to execute against each browser once non-functional tests are completed
// functionalSuites: ['test/functional/settingsDefaults' /* 'myPackage/tests/functional' */ ],
functionalSuites: ['test/functional/testHeaderNav' /* 'myPackage/tests/functional' */ ],
functionalSuites: ['test/functional/settingsDefaults.js' /* 'myPackage/tests/functional' */ ],
// A regular expression matching URLs to files that should not be included in code coverage analysis
excludeInstrumentation: /^(?:tests|node_modules)\//