首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Karma-Runner中使用Karma-Jasmine提供程序时,将Jasmine测试标记为已跳过?

在Karma-Runner中使用Karma-Jasmine提供程序时,将Jasmine测试标记为已跳过?
EN

Stack Overflow用户
提问于 2013-07-18 21:13:23
回答 1查看 4K关注 0票数 11

我和Karma一起做了这个茉莉花测试:

代码语言:javascript
复制
describe('When a logged in user chooses Rent and Payment PIN is enabled', function() {
    beforeEach(function(){

    });

    afterEach(function() {

    });

    it('should be presented with a dialog to enter the pin', function() {
       //test to be skipped
    })
})    

我希望在报告中看到此测试已被跳过,并在测试所需的所有材料准备就绪后再回来测试。

我如何才能做到这一点呢?

EN

回答 1

Stack Overflow用户

发布于 2014-02-12 06:15:07

您可以尝试在规范中使用pending函数。根据文档,挂起的规范不会运行,但名称仍会显示在结果中。对于2.0,它还说空的方法体应该有效。尝试:

代码语言:javascript
复制
it('should be presented with a dialog to enter the pin', function() {
   pending();
})

代码语言:javascript
复制
it('should be presented with a dialog to enter the pin');
票数 8
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17724498

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档