Javascript 单元中茉莉花的跳跃测试
我想知道Jasmine中是否存在像JUnit中的@ignore这样的东西。 我想忽略一些测试,但不是全部 我指的是这样的东西:Javascript 单元中茉莉花的跳跃测试,javascript,jasmine,Javascript,Jasmine,我想知道Jasmine中是否存在像JUnit中的@ignore这样的东西。 我想忽略一些测试,但不是全部 我指的是这样的东西: @Ignore describe("Hello world", function() { it("says hello", function() { expect(helloWorld()).toEqual("Hello world!"); }); }); 谢谢您可以在descripe或it块前面加x,它们将被禁用。因此,实际上您正在调用xdescri
@Ignore
describe("Hello world", function() {
it("says hello", function() {
expect(helloWorld()).toEqual("Hello world!");
});
});
谢谢您可以在descripe或it块前面加x,它们将被禁用。因此,实际上您正在调用xdescripe或xit
您可以在descripe或it块的前面加上x,它们将被禁用。因此,实际上您正在调用xdescripe或xit
来自jasmine docs:
可以使用xdescripe功能禁用套件。运行时将跳过这些套件及其内部的任何规格,因此其结果将显示为挂起
来源:来自jasmine文档:
可以使用xdescripe功能禁用套件。运行时将跳过这些套件及其内部的任何规格,因此其结果将显示为挂起
来源:完美!!使用xit,这是我的输出:结果:13个规格,0个失败,1个完美!!使用xit,这是我的输出:结果:13个规格,0个失败,1个挂起
xdescribe("Hello world", function() {
it("says hello", function() {
expect(helloWorld()).toEqual("Hello world!");
});
});