栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

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

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

如何从命令行在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


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/448737.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号