让Jasmine在服务器端运行
我正在尝试开始使用Node.JS在服务器端testingJavaScript
我正在使用grunt和grunt-jasmine-node ,但我无法运行我的testing。
它只是logging
PS C:\ Development \ NET \ Source \ jsn> grunt运行“jasmine_node”任务未定义
在0.001秒内完成0个testing,0个断言,0个失败
完成,没有错误。
这是我的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'); };
而我的文件结构是这样的:
那么,我做错了什么?
这就像stub.js
文件甚至没有加载,因为它有一个console.log
调用来testing。
或者:
- 确保JavaScripttesting规范的扩展名是
.spec.js
要么
- 用
specNameMatcher
replaceconfiguration选项matchall: true
- 我无法部署我的platypi演示程序
- 我如何使用dynamic生成的文件名数组在Grunt中运行任务?
- 用于创buildEMR集群的Lambda不会激发集群创build
- 在“module”全局variables上运行grunt-typescript时,angular-mock和node.js发生冲突
- 在Grunt uglifyjs中从控制台抑制WARN语句
- 如何解决Gruntfile.js中错误configuration的grunt-connect-proxy设置的404错误?
- 尝试安装npm软件包,并获得EN0ENT错误的一切
- 如何debugging通过Grunt构build的Connect服务器的请求?
- 分离的subprocess在node.js的脚本出口退出