在Karma Runner中使用Karma Jasmine提供者时,将Jasmine测试标记为跳过?

在Karma Runner中使用Karma Jasmine提供者时,将Jasmine测试标记为跳过?,jasmine,karma-runner,karma-jasmine,Jasmine,Karma Runner,Karma Jasmine,我有一个茉莉花测试,我正在运行与因果报应: 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', functi

我有一个茉莉花测试,我正在运行与因果报应:

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
    })
})    
我想在报告中看到,这个测试已经被跳过,当测试所需的所有东西都准备好时,再回来测试

如何实现这一点?

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

it('should be presented with a dialog to enter the pin', function() {
   pending();
})


我也有同样的问题。跳过一个测试很容易(只需将“It”改为“xit”),但我还没有找到一种方法,让我在运行karma时在报告中反映跳过了一个测试的事实。我已经找到了一个解决方法。如果您仍然感兴趣,请在此处留下评论,以吸引开发人员的关注
it('should be presented with a dialog to enter the pin');