[英]The different of describe(it()) and describe(test())
I have seen many examples of testing in ReactJS use it() 我已经看到了许多在ReactJS中使用它的测试示例
Example: 例:
describe('General behaviour', () => {
it('should call toggle() when clicked', () => {
// expect something
});
and I see the example of jest use test() 我看到玩笑的例子使用test()
Example: 例:
describe('matching cities to foods', () => {
test('Vienna <3 sausage', () => {
expect(isValidCityFoodPair('Vienna', 'Wiener Schnitzel')).toBe(true);
});
see more jest for react example in this link . 在此链接中,可以看到更多关于笑话的示例 。
What are the differrent of them? 它们有什么区别?
it
is just test
aliased. it
只是test
别名。
People coming from Jasmine and other testing frameworks use `it. 来自Jasmine和其他测试框架的人使用`it。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.