[英]Unconditionally fail unit test
Is there a shorthand in jasmine equivalent to: 是否有茉莉花的简写相当于:
expect(true).toBe(false)
So the unit test can fail whenever it reaches this? 那么单元测试到达时会失败吗?
I throw errors. 我抛出错误。 I usually do this when I have created new test functions that are not implemented yet.
我通常在创建尚未实现的新测试函数时执行此操作。
it('should test something when I have implemented it', function() {
throw new Error('Not implemented yet');
});
This lets you use any explanation you want. 这使您可以使用任何想要的解释。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.