Add grunt test
task for QUnit tests.
props kadamwhite. see #25096. git-svn-id: https://develop.svn.wordpress.org/trunk@25178 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3749745c3d
commit
381affa4e4
11
Gruntfile.js
11
Gruntfile.js
@ -53,6 +53,9 @@ module.exports = function(grunt) {
|
||||
]
|
||||
}
|
||||
},
|
||||
qunit: {
|
||||
files: ['tests/qunit/**/*.html']
|
||||
},
|
||||
uglify: {
|
||||
core: {
|
||||
expand: true,
|
||||
@ -104,6 +107,10 @@ module.exports = function(grunt) {
|
||||
spawn: false,
|
||||
interval: 2000
|
||||
}
|
||||
},
|
||||
test: {
|
||||
files: ['tests/qunit/**'],
|
||||
tasks: ['qunit']
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -112,6 +119,7 @@ module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||
grunt.loadNpmTasks('grunt-contrib-qunit');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
|
||||
@ -119,6 +127,9 @@ module.exports = function(grunt) {
|
||||
grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core',
|
||||
'uglify:core', 'uglify:tinymce']);
|
||||
|
||||
// Testing task.
|
||||
grunt.registerTask('test', ['qunit']);
|
||||
|
||||
// Default task.
|
||||
grunt.registerTask('default', ['build']);
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
"grunt-contrib-clean": "~0.5.0",
|
||||
"grunt-contrib-copy": "~0.4.1",
|
||||
"grunt-contrib-cssmin": "~0.6.1",
|
||||
"grunt-contrib-qunit": "~0.2.2",
|
||||
"grunt-contrib-uglify": "~0.2.2",
|
||||
"grunt-contrib-watch": "~0.5.1"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user