我如何关注jasmine.js中的一个规范? [英] How do I focus on one spec in jasmine.js?
问题描述
我从一个相当大的架构变化中得到了一堆失败的规范。我想通过用'焦点'标记每一个来逐个修复它们。
I have a bunch of failing specs from a rather large architectural change. I'd like to work on fixing them one by one by tagging each one with 'focus'.
jasmine.js有这样的功能吗?我发誓我曾经读过它,但我没有在文档中看到它。
Does jasmine.js have a feature like this? I swore I read at one point that it does but I don't see it in the docs.
推荐答案
你可以运行一个单一规格使用规范的网址
You can run a single spec by using the url for the spec
describe("MySpec", function() {
it('function 1', function() {
//...
})
it('function 2', function() {
//...
}
})
现在你可以运行了整个规范由这个网址 http:// localhost:8888?spec = MySpec
以及第一次测试 http:// localhost:8888? spec = MySpec + function + 1
Now you can run just the whole spec by this url http://localhost:8888?spec=MySpec
and a the first test with http://localhost:8888?spec=MySpec+function+1
这篇关于我如何关注jasmine.js中的一个规范?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!