1.0.54 • Published 7 years ago

jctest1718192021 v1.0.54

Weekly downloads
2
License
ISC
Repository
-
Last release
7 years ago

jest单元测试:分为两种,dom测试和断言测试 (1)dom测试 说明:会根据测试用例的场景,生成组件最终生成的真实dom结构。如果修改组件后,执行dom测试,会提示dom结构发生改变,方便我们校验。 使用: 在组件目录下,新建test文件夹,用于存放测试用例以及测试结果。 测试用例的文件要以XXX.test.js命名 dom测试的结果会在snapshots文件夹下生成 具体的jest的语法可以在网上搜索下相关资料,并参考ant的测试用例使用

(2)断言测试 说明:会根据自定义的断言进行测试,有任意一个断言失败则不通过,并在控制台提示错误 其他说明同上

(3)具体操作 控制台执行:npm test --rootDir /components/input 其中/components/input为需要执行测试组件的目录

1.0.54

7 years ago

1.0.53

7 years ago

1.0.52

7 years ago

1.0.51

7 years ago

1.0.50

7 years ago

1.0.49

7 years ago

1.0.48

7 years ago

1.0.47

7 years ago

1.0.46

7 years ago

1.0.45

7 years ago

1.0.44

7 years ago

1.0.43

7 years ago

1.0.42

7 years ago

1.0.41

7 years ago

1.0.40

7 years ago

1.0.39

7 years ago

1.0.38

7 years ago

1.0.37

7 years ago

1.0.36

7 years ago

1.0.35

7 years ago

1.0.34

7 years ago

1.0.33

7 years ago

1.0.32

7 years ago

1.0.31

7 years ago

1.0.30

7 years ago

1.0.29

7 years ago

1.0.28

7 years ago

1.0.27

7 years ago

1.0.26

7 years ago

1.0.24

7 years ago

1.0.23

7 years ago

1.0.22

7 years ago

1.0.21

7 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago