0

I have set up a bunch of taks that all work but I am having trouble configuring my tests task. I have Jasmine-node up and running and I am able to run my tests from the command line, but I can't seem to get the grunt task working.

GruntFile.js:

module.exports = function(grunt) {
    'use strict';

    require('time-grunt')(grunt);

    require('load-grunt-config')(grunt, {
        jitGrunt: true
    });

};

aliases.yaml: (shortened to show only the test task)

test:
    - 'concurrent:test'

test.js

module.exports = {
    jasmine: {
        all: {
            src: '.',
            options: {
                specs: ['../tests/sms/textReceiver-spec.js']
            }
        }
    }
};

Folder Structure:

  • grunt
    • concurrent.js
    • test.js
    • etc
  • GruntFile.js
  • tests
    • sms
      • textReceiver-spec.js

The task loads but it just sits there, and nothing happens. No further information, not even an error. It makes me think it's just not finding my test files? But I've tried linking to a file directly, with the same result.

Result:

ben_cripps$ grunt test

Running "concurrent:test" (concurrent) task

but that's it

4

1 回答 1

0

我假设您正在使用grunt-contrib-jasmine。根据他们的文档,该src属性的使用方式如下(与其他任何地方一样,带有通配符):

src: 'src/**/*.js'

但是您正在像这样使用它:

src: '.'
于 2015-02-21T06:47:04.510 回答