Skip to content

Commit cf57bf4

Browse files
committed
Add Jasmine structure for tests
1 parent 1184558 commit cf57bf4

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Gruntfile.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ module.exports = function(grunt) {
2424
}
2525
},
2626

27+
jasmine: {
28+
src: 'src/jquery.github.js',
29+
options: {
30+
specs: 'spec/*spec.js'
31+
}
32+
},
33+
2734
// Lint definitions
2835
jshint: {
2936
files: ['src/jquery.github.js'],
@@ -48,16 +55,17 @@ module.exports = function(grunt) {
4855
watch: {
4956
files: ['**/*'],
5057
tasks: ['jshint', 'concat', 'uglify'],
51-
},
58+
}
5259

5360
});
5461

5562
grunt.loadNpmTasks('grunt-contrib-concat');
63+
grunt.loadNpmTasks('grunt-contrib-jasmine');
5664
grunt.loadNpmTasks('grunt-contrib-jshint');
5765
grunt.loadNpmTasks('grunt-contrib-uglify');
5866
grunt.loadNpmTasks('grunt-contrib-watch');
5967

6068
grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
61-
grunt.registerTask('travis', ['jshint']);
69+
grunt.registerTask('test', ['jshint', 'jasmine']);
6270

6371
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
"devDependencies": {
99
"grunt": "~0.4.1",
1010
"grunt-cli": "~0.1.7",
11+
"grunt-contrib-jasmine": "~0.5.1",
1112
"grunt-contrib-jshint": "~0.4.3",
1213
"grunt-contrib-concat": "~0.3.0",
1314
"grunt-contrib-uglify": "~0.2.0",
1415
"grunt-contrib-watch": "~0.4.2"
1516
},
1617
"scripts": {
17-
"test": "grunt travis --verbose"
18+
"test": "grunt test --verbose"
1819
}
1920
}

0 commit comments

Comments
 (0)