无法创建Jasmine并发Grunt任务

Unable to Create Jasmine Concurrent Grunt Task

本文关键字:Grunt 任务 并发 Jasmine 创建      更新时间:2024-02-14

我已经设置了一组tak,但在配置测试任务时遇到了问题。我已经启动并运行了Jasmine节点,我可以从命令行运行测试,但我似乎无法完成繁重的任务。

GruntFile.js:

module.exports = function(grunt) {
    'use strict';
    require('time-grunt')(grunt);
    require('load-grunt-config')(grunt, {
        jitGrunt: true
    });
};

aliases.yaml:(缩短为仅显示测试任务)

test:
    - 'concurrent:test'

test.js

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

文件夹结构:

  • 咕哝
    • concurrent.js
    • test.js
    • 等等
  • GruntFile.js
  • 测试
    • 短信
      • text接收器-spec.js

任务加载了,但它只是坐在那里,什么也没发生。没有进一步的信息,甚至没有错误。这让我觉得只是找不到我的测试文件?但我尝试过直接链接到一个文件,得到了同样的结果。

结果:

ben_cripps$grunt测试

运行"并发:测试"(并发)任务

但这就是

我假设您使用的是grunt contrib jasmine。根据他们的文档,src属性是这样使用的(就像其他地方一样,带有通配符):

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

但你是这样使用它的:

src: '.'