Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Commit

Permalink
make jasmine test framework work
Browse files Browse the repository at this point in the history
Previously jasmine framework cannot work without more manual configs. For coffeescript the compiled javascripts are sitting in .tmp folder. Unfortunately unlike mocha, jasmine does not read a index.html to load scripts.
  • Loading branch information
stevemao committed Apr 28, 2015
1 parent fcd61b9 commit 6e8ae7a
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions app/templates/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = function (grunt) {
},<% } else { %>
js: {
files: ['<%%= config.app %>/scripts/{,*/}*.js'],
tasks: ['jshint'],
tasks: ['jshint']
},
jstest: {
files: ['test/spec/{,*/}*.js'],
Expand Down Expand Up @@ -92,8 +92,9 @@ module.exports = function (grunt) {
open: false,
logLevel: 'silent',
host: 'localhost',
server: {
baseDir: ['.tmp', './test', config.app],
server: {<% if (testFramework === 'mocha') { %>
baseDir: ['.tmp', './test', config.app],<% } else if (testFramework === 'jasmine') { %>
baseDir: ['./'],<% } %>
routes: {
'/bower_components': './bower_components'
}
Expand Down Expand Up @@ -150,8 +151,14 @@ module.exports = function (grunt) {
// Jasmine testing framework configuration options
jasmine: {
all: {
src: '{<%= config.app %>,.tmp}/scripts/{,*/}*.js',
options: {
specs: 'test/spec/{,*/}*.js'
vendor: [
// Your bower_components scripts
],
specs: '{test,.tmp}/spec/{,*/}*.js',
helpers: '{test,.tmp}/helpers/{,*/}*.js',
host: 'http://<%%= browserSync.test.options.host %>:<%%= browserSync.test.options.port %>'
}
}
},<% } %><% if (coffee) { %>
Expand Down

0 comments on commit 6e8ae7a

Please sign in to comment.