[英]Unit Testing using ezyme
can anybody please explain me the Difference between the two packages enzyme
and jasmine-enzyme
...有人能解释一下
enzyme
和jasmine-enzyme
这两个包之间的区别吗?
import Enzyme from 'enzyme';
import jasmineEnzyme from 'jasmine-enzyme';
I want to know how differently they work.我想知道它们的工作方式有何不同。 I couldn't found any promising answer in my research
我在我的研究中找不到任何有希望的答案
Thanks in advance提前致谢
Enzyme is a JavaScript Testing utility for React. Enzyme 是一个用于 React 的 JavaScript 测试实用程序。 But it doesn't have inbuilt assertions functions.
但它没有内置的断言功能。 It relies on external testing libraries such as Mocha, Chai, Jasmine for assert functions.
它依赖于外部测试库,例如 Mocha、Chai、Jasmine 来实现断言功能。
jasmine-enzyme
is an assertion library for enzyme
. jasmine-enzyme
是一个针对enzyme
的断言库。 It uses jasmine
like syntax for assertions.它使用类似
jasmine
语法进行断言。 Similarly there are other options such as chai-enzyme
, should-enzyme
, expect-enzyme
.同样,还有其他选项,例如
chai-enzyme
、 should-enzyme
、 expect-enzyme
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.