Javascript 测试框架之 隐式声明 之 describe

阅读更多

为什么使用 javascript 测试框架时,没有显式导入 describe,却可以直接使用:?

https://www.bignerdranch.com/blog/why-do-javascript-test-frameworks-use-describe-and-beforeeach/


引用


Describe is a function in the Jasmine testing framework. It simply describes the suite of test cases enumerated by the "it" functions.

Also used in the mochajs framework.




引用


It is doing this by setting up a lot of functions that give the whole test case the appearance of being a somewhat natural language sentence. This is called DSL, but it can be quite confusing for those unfamiliar with the library.





https://stackoverflow.com/questions/12209582/the-describe-keyword-in-javascript



















-

你可能感兴趣的:(javascript,测试,框架)