gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 02:17:22 27 4
gpt4 key购买 nike

我有一个与 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', function() {
//test to be skipped
})
})

我想在报告中看到该测试已被跳过,并在测试所需的所有东西都准备就绪时再回来进行测试。

我怎样才能做到这一点?

最佳答案

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

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

或者
it('should be presented with a dialog to enter the pin');

关于jasmine - 在 Karma-Runner 中使用 Karma-Jasmine 提供程序时将 Jasmine 测试标记为已跳过?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17724498/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com