如何从命令行在Node.js上运行Jasmine测试

如何从命令行在Node.js上运行Jasmine测试,第1张

如何从命令行在Node.js上运行Jasmine测试

编辑

由于不再维护该软件包,因此这似乎不再是当前的最佳答案。请参阅下面的答案


你可以这样做

从您的测试目录

sudo npm install jasmine-node

这会将茉莉花安装到../node_modules/jasmine-node

然后

../node_modules/jasmine-node/bin/jasmine-node --verbose --junitreport --noColor spec

从我的演示中做到了

Player - 5 ms    should be able to play a Song - 2 ms    when song has been paused - 1 ms        should indicate that the song is currently paused - 0 ms        should be possible to resume - 0 ms    tells the current song if the user has made it a favorite - 1 ms    #resume - 0 ms        should throw an exception if song is already playing - 0 msPlayer - 5 ms    should be able to play a Song - 2 ms    when song has been paused - 1 ms        should indicate that the song is currently paused - 0 ms        should be possible to resume - 0 ms    tells the current song if the user has made it a favorite - 1 ms    #resume - 0 ms        should throw an exception if song is already playing - 0 msFinished in 0.01 seconds5 tests, 8 assertions, 0 failures, 0 skipped


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5173049.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-18
下一篇 2022-11-18

发表评论

登录后才能评论

评论列表(0条)

保存