Commit aa2ebad
authored
feat(hydrate-mocks): add create-hydrated-mock functionality
* refactor(hydrate-mocks): remove duplicated code
* refactor(hydrate-mocks): revert changes
* feat(hydrate-mocks): red - add create-hydrated-mock type and transformation
* feat(hydrate-mocks): green - add support for basic createHydratedMock
* feat(hydrate-mocks): green - add support for union types
* feat(hydrate-mocks): green - make sure undefined union types will result in undefined
* feat(hydrate-mocks): green - refactor tests
* feat(hydrate-mocks): green - remove unnecessary check
* feat(hydrate-mocks): refactor - rename test file
* feat(hydrate-mocks): refactor - rename test description
* feat(hydrate-mocks): red - make sure createHydratedMock doesn't is independent from createMock
* feat(hydrate-mocks): red - remove unnecessary check in the test
* feat(hydrate-mocks): green - always returns a new mock when is hydrated
* feat(hydrate-mocks): red - add test when creatingMock with createMock after a mock has been created with createHydratedMock
* feat(hydrate-mocks): green - duplicate all the cache (declaration, factory and file registration) to support hydrated mocks
* feat(hydrate-mocks): refactor - extract modulesNameIdentifierPerFile
* feat(hydrate-mocks): green - add hydrated initial generic support
* feat(hydrate-mocks): red - add hydrated tests for generic with extends
* feat(hydrate-mocks): green - use the correct mock for generic extensions
* feat(hydrate-mocks): green - run createHydratedMock on ci
* feat(hydrate-mocks): green - add support for circular generic extensions
* feat(hydrate-mocks): green - add support for register mock
* feat(hydrate-mocks): green - add test for type of enum
* feat(hydrate-mocks): green - add test to make sure createMock and createHydratedMocks are independent
* feat(hydrate-mocks): green - add support for intersections
* feat(hydrate-mocks): refactor - create a function to handle type of declaration based on scope
* feat(hydrate-mocks): refactor - create clone static method on Scope so it will be easier to carry hydrated when creating a new scope
* feat(hydrate-mocks): refactor - remove duplicated code in register mock
* feat(hydrate-mocks): doc - add createHydratedMock documentation1 parent 34fa458 commit aa2ebad
File tree
20 files changed
+667
-137
lines changed- src
- transformer
- descriptor
- mock
- typeParameter
- typeQuery
- typeReference
- union
- genericDeclaration
- mockDefiner
- modules
- mockFactoryCall
- mock
- scope
- test/createHydratedMock
- ui
- src/views
20 files changed
+667
-137
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
13 | 25 | | |
14 | 26 | | |
15 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
135 | 140 | | |
136 | | - | |
137 | | - | |
138 | | - | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| |||
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
44 | 65 | | |
45 | 66 | | |
46 | 67 | | |
| |||
0 commit comments