An opinionated little grunt task for running Jasmine specs of JavaScript/CoffeeScript written to run under Node.js.
It delegates to minijasminenode and includes the following goodies without you even asking:
Check out the included example project for a minimal realistic usage.
"spec/helpers/**/*.{js,coffee}"
)."spec/**/*.{js,coffee}"
).No configuration is necessary if the defaults work for you. A simple config might be as small as this, however:
grunt.loadNpmTasks("grunt-jasmine-bundle")
grunt.initConfig({
spec: {
unit: {
options: {
minijasminenode: {
showColors: true
}
}
}
}
});
grunt-jasmine-bundle
is a multi-task, which means that, if you choose, you can set up multiple builds via configuration. Something like this ought to work:
grunt.initConfig({
spec: {
options: {
minijasminenode: {
showColors: true
}
},
unit: {
options: {
helpers: ["shared/helpers/**/*.{js,coffee}", "test/helpers/**/*.{js,coffee}"],
specs: "test/**/*.{js,coffee}"
}
},
e2e: {
options: {
helpers: ["shared/helpers/**/*.{js,coffee}", "e2e/helpers/**/*.{js,coffee}"],
specs: "e2e/**/*.{js,coffee}"
}
}
}
});