I'm trying to get started on testing JavaScript on the server-side with Node.JS
I'm using grunt, and grunt-jasmine-node, but I can't get it to run my tests.
It just logs
PS C:\Development\NET\Source\jsn> grunt Running "jasmine_node" task undefined
Finished in 0.001 seconds 0 tests, 0 assertions, 0 failures
Done, without errors.
This is my Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jasmine_node: {
specNameMatcher: 'spec',
projectRoot: '.',
requirejs: false,
forceExit: true,
jUnit: {
report: false,
savePath : "./build/reports/jasmine/",
useDotNotation: true,
consolidate: true
}
}
});
grunt.loadNpmTasks('grunt-jasmine-node');
grunt.registerTask('default', 'jasmine_node');
};
And my file structure is this:
So, what am I doing wrong?
It's like the stub.js
file isn't ever even loaded, because it has a console.log
call in it to test that.
Either:
.spec.js
Or
specNameMatcher
with matchall: true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With