我如何关注jasmine.js中的一个规范? [英] How do I focus on one spec in jasmine.js?

查看:86
本文介绍了我如何关注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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆