|
3 | 3 | // This module is browser compatible. |
4 | 4 |
|
5 | 5 | /** |
6 | | - * This module provides jest compatible expect assertion functionality. |
| 6 | + * This module provides Jest compatible expect assertion functionality. |
7 | 7 | * |
8 | | - * Currently this module supports the following matchers: |
9 | | - * - `toBe` |
10 | | - * - `toEqual` |
11 | | - * - `toStrictEqual` |
12 | | - * - `toMatch` |
13 | | - * - `toMatchObject` |
14 | | - * - `toBeDefined` |
15 | | - * - `toBeUndefined` |
16 | | - * - `toBeNull` |
17 | | - * - `toBeNaN` |
18 | | - * - `toBeTruthy` |
19 | | - * - `toBeFalsy` |
20 | | - * - `toContain` |
21 | | - * - `toContainEqual` |
22 | | - * - `toHaveLength` |
23 | | - * - `toBeGreaterThan` |
24 | | - * - `toBeGreaterThanOrEqual` |
25 | | - * - `toBeLessThan` |
26 | | - * - `toBeLessThanOrEqual` |
27 | | - * - `toBeCloseTo` |
28 | | - * - `toBeInstanceOf` |
29 | | - * - `toThrow` |
30 | | - * - `toHaveProperty` |
31 | | - * - `toHaveLength` |
| 8 | + * Currently this module supports the following functions: |
| 9 | + * - Common matchers: |
| 10 | + * - `toBe` |
| 11 | + * - `toEqual` |
| 12 | + * - `toStrictEqual` |
| 13 | + * - `toMatch` |
| 14 | + * - `toMatchObject` |
| 15 | + * - `toBeDefined` |
| 16 | + * - `toBeUndefined` |
| 17 | + * - `toBeNull` |
| 18 | + * - `toBeNaN` |
| 19 | + * - `toBeTruthy` |
| 20 | + * - `toBeFalsy` |
| 21 | + * - `toContain` |
| 22 | + * - `toContainEqual` |
| 23 | + * - `toHaveLength` |
| 24 | + * - `toBeGreaterThan` |
| 25 | + * - `toBeGreaterThanOrEqual` |
| 26 | + * - `toBeLessThan` |
| 27 | + * - `toBeLessThanOrEqual` |
| 28 | + * - `toBeCloseTo` |
| 29 | + * - `toBeInstanceOf` |
| 30 | + * - `toThrow` |
| 31 | + * - `toHaveProperty` |
| 32 | + * - `toHaveLength` |
| 33 | + * - Mock related matchers: |
| 34 | + * - `toHaveBeenCalled` |
| 35 | + * - `toHaveBeenCalledTimes` |
| 36 | + * - `toHaveBeenCalledWith` |
| 37 | + * - `toHaveBeenLastCalledWith` |
| 38 | + * - `toHaveBeenNthCalledWith` |
| 39 | + * - `toHaveReturned` |
| 40 | + * - `toHaveReturnedTimes` |
| 41 | + * - `toHaveReturnedWith` |
| 42 | + * - `toHaveLastReturnedWith` |
| 43 | + * - `toHaveNthReturnedWith` |
| 44 | + * - Asymmetric matchers: |
| 45 | + * - `expect.anything` |
| 46 | + * - `expect.any` |
| 47 | + * - `expect.arrayContaining` |
| 48 | + * - `expect.not.arrayContaining` |
| 49 | + * - `expect.closeTo` |
| 50 | + * - `expect.stringContaining` |
| 51 | + * - `expect.not.stringContaining` |
| 52 | + * - `expect.stringMatching` |
| 53 | + * - `expect.not.stringMatching` |
| 54 | + * - Utilities: |
| 55 | + * - `expect.addEqualityTester` |
| 56 | + * - `expect.extend` |
32 | 57 | * |
33 | | - * Also this module supports the following mock related matchers: |
34 | | - * - `toHaveBeenCalled` |
35 | | - * - `toHaveBeenCalledTimes` |
36 | | - * - `toHaveBeenCalledWith` |
37 | | - * - `toHaveBeenLastCalledWith` |
38 | | - * - `toHaveBeenNthCalledWith` |
39 | | - * - `toHaveReturned` |
40 | | - * - `toHaveReturnedTimes` |
41 | | - * - `toHaveReturnedWith` |
42 | | - * - `toHaveLastReturnedWith` |
43 | | - * - `toHaveNthReturnedWith` |
44 | | - * |
45 | | - * The following matchers are not supported yet: |
46 | | - * - `toMatchSnapShot` |
47 | | - * - `toMatchInlineSnapShot` |
48 | | - * - `toThrowErrorMatchingSnapShot` |
49 | | - * - `toThrowErrorMatchingInlineSnapShot` |
50 | | - * |
51 | | - * The following asymmetric matchers are not supported yet: |
52 | | - * - `expect.anything` |
53 | | - * - `expect.any` |
54 | | - * - `expect.arrayContaining` |
55 | | - * - `expect.not.arrayContaining` |
56 | | - * - `expect.closedTo` |
57 | | - * - `expect.objectContaining` |
58 | | - * - `expect.not.objectContaining` |
59 | | - * - `expect.stringContaining` |
60 | | - * - `expect.not.stringContaining` |
61 | | - * - `expect.stringMatching` |
62 | | - * - `expect.not.stringMatching` |
63 | | - * |
64 | | - * The following uitlities are not supported yet: |
65 | | - * - `expect.assertions` |
66 | | - * - `expect.hasAssertions` |
67 | | - * - `expect.addEqualityTester` |
68 | | - * - `expect.addSnapshotSerializer` |
69 | | - * - `expect.extend` |
| 58 | + * Only these functions are still not available: |
| 59 | + * - Matchers: |
| 60 | + * - `toMatchSnapShot` |
| 61 | + * - `toMatchInlineSnapShot` |
| 62 | + * - `toThrowErrorMatchingSnapShot` |
| 63 | + * - `toThrowErrorMatchingInlineSnapShot` |
| 64 | + * - Asymmetric matchers: |
| 65 | + * - `expect.objectContaining` |
| 66 | + * - `expect.not.objectContaining` |
| 67 | + * - Utilities: |
| 68 | + * - `expect.assertions` |
| 69 | + * - `expect.hasAssertions` |
| 70 | + * - `expect.addSnapshotSerializer` |
70 | 71 | * |
71 | 72 | * This module is largely inspired by {@link https://github.com/allain/expect | x/expect} module by Allain Lalonde. |
72 | 73 | * |
|
0 commit comments