简体   繁体   English

茉莉花节点看不到测试

[英]jasmine-node does not see tests

I'm using jasmine-node and am calling it with我正在使用 jasmine-node 并调用它

node.exe path/to/jasmine_node --verbose path/to/my_file.js

This works in the sense that Jasmine-node gets invoked and complains if the path is wrong, but doesn't seem to find any tests.这在 Jasmine-node 被调用并抱怨路径错误的意义上起作用,但似乎没有找到任何测试。 Here is the output I'm getting:这是我得到的输出:

"C:\Program Files\nodejs\node.exe" C:\Dropbox\Projects\Demos\web\node_modules\jasmine-node\bin\jasmine-node --verbose --captureExceptions foo\bar.js
undefined

Finished in 0.002 seconds
0 tests, 0 assertions, 0 failures, 0 skipped

The contents of bar.js definitely contain a test. bar.js的内容肯定包含一个测试。

Try to run尝试运行

npx humile foo\\bar.js . npx humile foo\\bar.js

If it doesn't see any specs too, check the output of如果它也没有看到任何规格,请检查输出

npx humile foo\\bar.js --show-specs

If the output of the command is absolute path to the file, then something is wrong with your spec, not with test runner.如果命令的输出是文件的绝对路径,则说明您的规范有问题,而不是测试运行程序有问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM