ng-mocks 8.0.0 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +306 -0
- package/dist/lib/common/jit-reflector.js +22 -23
- package/dist/lib/common/jit-reflector.js.map +1 -1
- package/dist/lib/common/mock-of.decorator.js +3 -3
- package/dist/lib/common/mock-of.decorator.js.map +1 -1
- package/dist/lib/common/mock-of.decorator.spec.js +18 -30
- package/dist/lib/common/mock-of.decorator.spec.js.map +1 -1
- package/dist/lib/common/reflect.js +2 -2
- package/dist/lib/common/reflect.js.map +1 -1
- package/dist/lib/mock-component/mock-component.js +65 -75
- package/dist/lib/mock-component/mock-component.js.map +1 -1
- package/dist/lib/mock-component/mock-component.spec.js +91 -71
- package/dist/lib/mock-component/mock-component.spec.js.map +1 -1
- package/dist/lib/mock-component/test-components/child-component.component.js +11 -14
- package/dist/lib/mock-component/test-components/child-component.component.js.map +1 -1
- package/dist/lib/mock-component/test-components/custom-form-control.component.js +36 -35
- package/dist/lib/mock-component/test-components/custom-form-control.component.js.map +1 -1
- package/dist/lib/mock-component/test-components/empty-component.component.js +9 -12
- package/dist/lib/mock-component/test-components/empty-component.component.js.map +1 -1
- package/dist/lib/mock-component/test-components/simple-component.component.js +38 -59
- package/dist/lib/mock-component/test-components/simple-component.component.js.map +1 -1
- package/dist/lib/mock-component/test-components/template-outlet.component.js +30 -28
- package/dist/lib/mock-component/test-components/template-outlet.component.js.map +1 -1
- package/dist/lib/mock-declaration/mock-declaration.js +7 -11
- package/dist/lib/mock-declaration/mock-declaration.js.map +1 -1
- package/dist/lib/mock-directive/mock-directive.js +37 -55
- package/dist/lib/mock-directive/mock-directive.js.map +1 -1
- package/dist/lib/mock-directive/mock-directive.spec.js +85 -81
- package/dist/lib/mock-directive/mock-directive.spec.js.map +1 -1
- package/dist/lib/mock-helper/mock-helper.js +13 -13
- package/dist/lib/mock-helper/mock-helper.js.map +1 -1
- package/dist/lib/mock-helper/mock-helper.spec.js +56 -54
- package/dist/lib/mock-helper/mock-helper.spec.js.map +1 -1
- package/dist/lib/mock-module/mock-module.js +40 -44
- package/dist/lib/mock-module/mock-module.js.map +1 -1
- package/dist/lib/mock-module/mock-module.spec.js +60 -60
- package/dist/lib/mock-module/mock-module.spec.js.map +1 -1
- package/dist/lib/mock-module/test-fixtures.js +128 -170
- package/dist/lib/mock-module/test-fixtures.js.map +1 -1
- package/dist/lib/mock-pipe/index.d.ts +1 -1
- package/dist/lib/mock-pipe/index.js +4 -2
- package/dist/lib/mock-pipe/index.js.map +1 -1
- package/dist/lib/mock-pipe/mock-pipe.js +15 -27
- package/dist/lib/mock-pipe/mock-pipe.js.map +1 -1
- package/dist/lib/mock-pipe/mock-pipe.spec.js +38 -38
- package/dist/lib/mock-pipe/mock-pipe.spec.js.map +1 -1
- package/dist/lib/mock-render/mock-render.fixtures.js +18 -19
- package/dist/lib/mock-render/mock-render.fixtures.js.map +1 -1
- package/dist/lib/mock-render/mock-render.js +20 -21
- package/dist/lib/mock-render/mock-render.js.map +1 -1
- package/dist/lib/mock-render/mock-render.spec.js +17 -13
- package/dist/lib/mock-render/mock-render.spec.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,312 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
<a name="8.1.0"></a>
|
|
6
|
+
# 8.1.0 (2019-07-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* es2015 class declaration method mocking ([1286b10](https://github.com/ike18t/ng-mocks/commit/1286b10))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
<a name="8.0.0"></a>
|
|
16
|
+
# 8.0.0 (2019-06-03)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* angular 8 ([29a5203](https://github.com/ike18t/ng-mocks/commit/29a5203))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
<a name="7.8.0"></a>
|
|
26
|
+
# 7.8.0 (2019-05-14)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* **51:** Add mocked entry components to mocked modules ([a321b14](https://github.com/ike18t/ng-mocks/commit/a321b14))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
<a name="7.7.2"></a>
|
|
36
|
+
## 7.7.2 (2019-04-26)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<a name="7.7.1"></a>
|
|
41
|
+
## 7.7.1 (2019-04-23)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* **49:** stop caching mocked pipes ([058d66e](https://github.com/ike18t/ng-mocks/commit/058d66e))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
<a name="7.7.0"></a>
|
|
51
|
+
# 7.7.0 (2019-03-15)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<a name="7.6.0"></a>
|
|
56
|
+
# 7.6.0 (2019-02-26)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
<a name="7.5.0"></a>
|
|
61
|
+
# 7.5.0 (2019-01-29)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
<a name="7.4.0"></a>
|
|
66
|
+
# 7.4.0 (2018-12-22)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
<a name="7.3.0"></a>
|
|
71
|
+
# 7.3.0 (2018-12-18)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
<a name="7.2.0"></a>
|
|
76
|
+
# 7.2.0 (2018-12-07)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
<a name="7.1.3"></a>
|
|
81
|
+
## 7.1.3 (2018-12-02)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
<a name="7.1.2"></a>
|
|
86
|
+
## 7.1.2 (2018-11-26)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
<a name="7.1.1"></a>
|
|
91
|
+
## 7.1.1 (2018-11-06)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<a name="7.1.0"></a>
|
|
96
|
+
# 7.1.0 (2018-11-01)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
### Bug Fixes
|
|
100
|
+
|
|
101
|
+
* trim innerText that was getting a new line from a div ([f883ad0](https://github.com/ike18t/ng-mocks/commit/f883ad0))
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
<a name="7.0.1"></a>
|
|
106
|
+
## 7.0.1 (2018-10-26)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### Bug Fixes
|
|
110
|
+
|
|
111
|
+
* package-lock out of sync ([6fe7d36](https://github.com/ike18t/ng-mocks/commit/6fe7d36))
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
<a name="7.0.0"></a>
|
|
116
|
+
# 7.0.0 (2018-10-26)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
<a name="6.3.0"></a>
|
|
121
|
+
# 6.3.0 (2018-10-17)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
### Features
|
|
125
|
+
|
|
126
|
+
* **MockDirective:** added the ability to use ViewChild/ViewChildren etc with MockDirective ([8853e87](https://github.com/ike18t/ng-mocks/commit/8853e87))
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
<a name="6.2.3"></a>
|
|
131
|
+
## 6.2.3 (2018-10-02)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
### Bug Fixes
|
|
135
|
+
|
|
136
|
+
* **MockPlural:** removing generic type from MockComponents, Directives, and Pipes ([919a06c](https://github.com/ike18t/ng-mocks/commit/919a06c))
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
<a name="6.2.2"></a>
|
|
141
|
+
## 6.2.2 (2018-10-02)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
### Bug Fixes
|
|
145
|
+
|
|
146
|
+
* **MockModule:** Never mock CommonModule ([119dd80](https://github.com/ike18t/ng-mocks/commit/119dd80))
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
<a name="6.2.1"></a>
|
|
151
|
+
## 6.2.1 (2018-08-28)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
<a name="6.2.0"></a>
|
|
156
|
+
# 6.2.0 (2018-08-28)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
### Features
|
|
160
|
+
|
|
161
|
+
* add a MockedComponent type ([fe547af](https://github.com/ike18t/ng-mocks/commit/fe547af))
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
<a name="6.1.0"></a>
|
|
166
|
+
# 6.1.0 (2018-06-04)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
### Features
|
|
170
|
+
|
|
171
|
+
* support structural directives ([050e70c](https://github.com/ike18t/ng-mocks/commit/050e70c))
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
<a name="6.0.1"></a>
|
|
176
|
+
## 6.0.1 (2018-05-15)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
### Bug Fixes
|
|
180
|
+
|
|
181
|
+
* package json peer dep version range ([8ad3834](https://github.com/ike18t/ng-mocks/commit/8ad3834))
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
<a name="6.0.0"></a>
|
|
186
|
+
# 6.0.0 (2018-05-14)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
### Features
|
|
190
|
+
|
|
191
|
+
* support angular 6 and test 5 & 6 in travis ([5bc9331](https://github.com/ike18t/ng-mocks/commit/5bc9331))
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
<a name="5.3.0"></a>
|
|
196
|
+
# 5.3.0 (2018-04-05)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
### Features
|
|
200
|
+
|
|
201
|
+
* MockOf - Include mocked class names in mock class names ([8b149f5](https://github.com/ike18t/ng-mocks/commit/8b149f5))
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
<a name="5.2.0"></a>
|
|
206
|
+
# 5.2.0 (2018-03-30)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
### Features
|
|
210
|
+
|
|
211
|
+
* Use Angular annotation resolvers ([4050d10](https://github.com/ike18t/ng-mocks/commit/4050d10))
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
<a name="5.1.0"></a>
|
|
216
|
+
# 5.1.0 (2018-03-25)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
### Bug Fixes
|
|
220
|
+
|
|
221
|
+
* Add a null check for decorator args ([1058044](https://github.com/ike18t/ng-mocks/commit/1058044))
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
### Features
|
|
225
|
+
|
|
226
|
+
* Support Angular propDecorators inputs and outputs ([add374d](https://github.com/ike18t/ng-mocks/commit/add374d))
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
<a name="5.0.0"></a>
|
|
231
|
+
# 5.0.0 (2018-03-25)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
### Bug Fixes
|
|
235
|
+
|
|
236
|
+
* Fix bad return value from mock-directive ([4659a32](https://github.com/ike18t/ng-mocks/commit/4659a32))
|
|
237
|
+
* multiple decorators on an input ([13874b9](https://github.com/ike18t/ng-mocks/commit/13874b9))
|
|
238
|
+
* Outdated package-lock ([7623e98](https://github.com/ike18t/ng-mocks/commit/7623e98))
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
### Features
|
|
242
|
+
|
|
243
|
+
* add functions to mass mock ([fee5a03](https://github.com/ike18t/ng-mocks/commit/fee5a03))
|
|
244
|
+
* Cleanup exports and export MockDeclaration from MockModule ([9fe2bb1](https://github.com/ike18t/ng-mocks/commit/9fe2bb1))
|
|
245
|
+
* mock directives now have event emitter bound outputs ([bac1ca5](https://github.com/ike18t/ng-mocks/commit/bac1ca5))
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
<a name="5.0.0-rc5"></a>
|
|
250
|
+
# 5.0.0-rc5 (2018-03-07)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
### Bug Fixes
|
|
254
|
+
|
|
255
|
+
* package json typings location ([5f6fde0](https://github.com/ike18t/ng-mocks/commit/5f6fde0))
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
<a name="5.0.0-rc4"></a>
|
|
260
|
+
# 5.0.0-rc4 (2018-03-07)
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
<a name="5.0.0-rc3"></a>
|
|
265
|
+
# 5.0.0-rc3 (2018-03-07)
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
### Bug Fixes
|
|
269
|
+
|
|
270
|
+
* integrate mock-pipe ([d747517](https://github.com/ike18t/ng-mocks/commit/d747517))
|
|
271
|
+
* mock_direcive integration ([7f02f7b](https://github.com/ike18t/ng-mocks/commit/7f02f7b))
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
### Features
|
|
275
|
+
|
|
276
|
+
* merge in mock-module ([05eaebe](https://github.com/ike18t/ng-mocks/commit/05eaebe))
|
|
277
|
+
* support inputs and outputs from extended components ([fc46838](https://github.com/ike18t/ng-mocks/commit/fc46838))
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
<a name="5.0.0-rc1"></a>
|
|
282
|
+
# 5.0.0-rc1 (2018-02-10)
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
### Bug Fixes
|
|
286
|
+
|
|
287
|
+
* add reflect-metadata back to devDeps ([385c9c4](https://github.com/ike18t/ng-mocks/commit/385c9c4))
|
|
288
|
+
* Add support for directives with a different kind of meta ([0bd38cc](https://github.com/ike18t/ng-mocks/commit/0bd38cc))
|
|
289
|
+
* add testbed test that exposed now fixed issue ([610cbdc](https://github.com/ike18t/ng-mocks/commit/610cbdc))
|
|
290
|
+
* forgot how to use js reduce ([de518d4](https://github.com/ike18t/ng-mocks/commit/de518d4))
|
|
291
|
+
* instantiate event emitters in component constructor ([fb4b97d](https://github.com/ike18t/ng-mocks/commit/fb4b97d))
|
|
292
|
+
* module exports is now all declarations ([fbb0e73](https://github.com/ike18t/ng-mocks/commit/fbb0e73))
|
|
293
|
+
* output binding ([59f476d](https://github.com/ike18t/ng-mocks/commit/59f476d))
|
|
294
|
+
* works with component w/o inputs or outputs ([b3d38e7](https://github.com/ike18t/ng-mocks/commit/b3d38e7))
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
### Features
|
|
298
|
+
|
|
299
|
+
* add exportAs and alias support ([14a1474](https://github.com/ike18t/ng-mocks/commit/14a1474))
|
|
300
|
+
* add support for exportAs and input aliases ([9b42a21](https://github.com/ike18t/ng-mocks/commit/9b42a21))
|
|
301
|
+
* Adding angular 2 compatibility and moving to peerDependency ([#3](https://github.com/ike18t/ng-mocks/issues/3)) ([4bd93db](https://github.com/ike18t/ng-mocks/commit/4bd93db))
|
|
302
|
+
* component mock implements control value accessor to support ngModel binding ([67ea7c4](https://github.com/ike18t/ng-mocks/commit/67ea7c4))
|
|
303
|
+
* initial implementation ([893f83b](https://github.com/ike18t/ng-mocks/commit/893f83b))
|
|
304
|
+
* memoize function by arg ([031e3a6](https://github.com/ike18t/ng-mocks/commit/031e3a6))
|
|
305
|
+
* memoize function by arg ([cac00b3](https://github.com/ike18t/ng-mocks/commit/cac00b3))
|
|
306
|
+
* mock module providers ([49b2272](https://github.com/ike18t/ng-mocks/commit/49b2272))
|
|
307
|
+
* Upgrade to angular 5 and pull in testbed for tests ([7df64a8](https://github.com/ike18t/ng-mocks/commit/7df64a8))
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
5
311
|
<a name="8.0.0"></a>
|
|
6
312
|
# 8.0.0 (2019-06-03)
|
|
7
313
|
|
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
this.shallowAnnotations =
|
|
3
|
+
const core_1 = require("@angular/core");
|
|
4
|
+
class JitReflector {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.shallowAnnotations = (typeOrFunc) => { throw new Error('Not supported in JIT mode'); };
|
|
7
7
|
this._reflectionCapabilities = new core_1.ɵReflectionCapabilities();
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
annotations(typeOrFunc) {
|
|
10
10
|
return this._reflectionCapabilities.annotations(typeOrFunc);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return
|
|
14
|
-
}
|
|
15
|
-
|
|
11
|
+
}
|
|
12
|
+
componentModuleUrl(type, cmpMetadata) {
|
|
13
|
+
return `./${core_1.ɵstringify(type)}`;
|
|
14
|
+
}
|
|
15
|
+
guards(type) {
|
|
16
16
|
return {};
|
|
17
|
-
}
|
|
18
|
-
|
|
17
|
+
}
|
|
18
|
+
hasLifecycleHook(type, lcProperty) {
|
|
19
19
|
return this._reflectionCapabilities.hasLifecycleHook(type, lcProperty);
|
|
20
|
-
}
|
|
21
|
-
|
|
20
|
+
}
|
|
21
|
+
parameters(typeOrFunc) {
|
|
22
22
|
return this._reflectionCapabilities.parameters(typeOrFunc);
|
|
23
|
-
}
|
|
24
|
-
|
|
23
|
+
}
|
|
24
|
+
propMetadata(typeOrFunc) {
|
|
25
25
|
return this._reflectionCapabilities.propMetadata(typeOrFunc);
|
|
26
|
-
}
|
|
27
|
-
|
|
26
|
+
}
|
|
27
|
+
resolveExternalReference(ref) {
|
|
28
28
|
return ref.runtime;
|
|
29
|
-
}
|
|
30
|
-
|
|
29
|
+
}
|
|
30
|
+
tryAnnotations(typeOrFunc) {
|
|
31
31
|
return this.annotations(typeOrFunc);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
}());
|
|
32
|
+
}
|
|
33
|
+
}
|
|
35
34
|
exports.JitReflector = JitReflector;
|
|
36
35
|
//# sourceMappingURL=jit-reflector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jit-reflector.js","sourceRoot":"","sources":["../../../lib/common/jit-reflector.ts"],"names":[],"mappings":";;AACA,
|
|
1
|
+
{"version":3,"file":"jit-reflector.js","sourceRoot":"","sources":["../../../lib/common/jit-reflector.ts"],"names":[],"mappings":";;AACA,wCAAsH;AAEtH,MAAa,YAAY;IAGvB;QAiCA,uBAAkB,GAAG,CAAC,UAAe,EAAS,EAAE,GAAG,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC;QAhCjG,IAAI,CAAC,uBAAuB,GAAG,IAAI,8BAAsB,EAAE,CAAC;IAC9D,CAAC;IAED,WAAW,CAAC,UAAe;QACzB,OAAO,IAAI,CAAC,uBAAuB,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC;IAED,kBAAkB,CAAC,IAAS,EAAE,WAAsB;QAClD,OAAO,KAAK,iBAAS,CAAC,IAAI,CAAC,EAAE,CAAC;IAChC,CAAC;IAGD,MAAM,CAAC,IAAS;QACd,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,gBAAgB,CAAC,IAAS,EAAE,UAAkB;QAC5C,OAAO,IAAI,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACzE,CAAC;IAED,UAAU,CAAC,UAAe;QACxB,OAAO,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC7D,CAAC;IAED,YAAY,CAAC,UAAe;QAC1B,OAAO,IAAI,CAAC,uBAAuB,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IAC/D,CAAC;IAED,wBAAwB,CAAC,GAAsB;QAC7C,OAAO,GAAG,CAAC,OAAO,CAAC;IACrB,CAAC;IAID,cAAc,CAAC,UAAe;QAC5B,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;CACF;AAzCD,oCAyCC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MockOf =
|
|
3
|
+
exports.MockOf = (mockClass) => (constructor) => {
|
|
4
4
|
Object.defineProperties(constructor, {
|
|
5
5
|
mockOf: { value: mockClass },
|
|
6
|
-
name: { value:
|
|
6
|
+
name: { value: `MockOf${mockClass.name}` },
|
|
7
7
|
});
|
|
8
|
-
};
|
|
8
|
+
};
|
|
9
9
|
//# sourceMappingURL=mock-of.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-of.decorator.js","sourceRoot":"","sources":["../../../lib/common/mock-of.decorator.ts"],"names":[],"mappings":";;AASa,QAAA,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"mock-of.decorator.js","sourceRoot":"","sources":["../../../lib/common/mock-of.decorator.ts"],"names":[],"mappings":";;AASa,QAAA,MAAM,GAAG,CAAC,SAAoB,EAAE,EAAE,CAAC,CAAC,WAAsB,EAAE,EAAE;IACzE,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE;QACnC,MAAM,EAAE,EAAC,KAAK,EAAE,SAAS,EAAC;QAC1B,IAAI,EAAE,EAAC,KAAK,EAAE,SAAS,SAAS,CAAC,IAAI,EAAE,EAAC;KACzC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -6,38 +6,26 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
|
|
10
|
-
describe('DebuggableMock',
|
|
11
|
-
it('prefixes the class name with MockOf',
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
Mock = __decorate([
|
|
21
|
-
mock_of_decorator_1.MockOf(Foo)
|
|
22
|
-
], Mock);
|
|
23
|
-
return Mock;
|
|
24
|
-
}());
|
|
9
|
+
const mock_of_decorator_1 = require("./mock-of.decorator");
|
|
10
|
+
describe('DebuggableMock', () => {
|
|
11
|
+
it('prefixes the class name with MockOf', () => {
|
|
12
|
+
class Foo {
|
|
13
|
+
}
|
|
14
|
+
let Mock = class Mock {
|
|
15
|
+
};
|
|
16
|
+
Mock = __decorate([
|
|
17
|
+
mock_of_decorator_1.MockOf(Foo)
|
|
18
|
+
], Mock);
|
|
25
19
|
expect(Mock.name).toBe('MockOfFoo');
|
|
26
20
|
});
|
|
27
|
-
it('adds a mockOf property that is the class being mocked',
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
Mock = __decorate([
|
|
37
|
-
mock_of_decorator_1.MockOf(Bar)
|
|
38
|
-
], Mock);
|
|
39
|
-
return Mock;
|
|
40
|
-
}());
|
|
21
|
+
it('adds a mockOf property that is the class being mocked', () => {
|
|
22
|
+
class Bar {
|
|
23
|
+
}
|
|
24
|
+
let Mock = class Mock {
|
|
25
|
+
};
|
|
26
|
+
Mock = __decorate([
|
|
27
|
+
mock_of_decorator_1.MockOf(Bar)
|
|
28
|
+
], Mock);
|
|
41
29
|
expect(Mock.mockOf).toBe(Bar);
|
|
42
30
|
});
|
|
43
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-of.decorator.spec.js","sourceRoot":"","sources":["../../../lib/common/mock-of.decorator.spec.ts"],"names":[],"mappings":";;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"mock-of.decorator.spec.js","sourceRoot":"","sources":["../../../lib/common/mock-of.decorator.spec.ts"],"names":[],"mappings":";;;;;;;;AACA,2DAA6C;AAE7C,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC7C,MAAM,GAAG;SAAG;QAEZ,IAAM,IAAI,GAAV,MAAM,IAAI;SAAG,CAAA;QAAP,IAAI;YADT,0BAAM,CAAC,GAAG,CAAC;WACN,IAAI,CAAG;QAEb,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;QAC/D,MAAM,GAAG;SAAG;QAEZ,IAAM,IAAI,GAAV,MAAM,IAAI;SAAG,CAAA;QAAP,IAAI;YADT,0BAAM,CAAC,GAAG,CAAC;WACN,IAAI,CAAG;QAEb,MAAM,CAAE,IAAY,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const testing_1 = require("@angular/compiler/testing");
|
|
4
|
+
const jit_reflector_1 = require("./jit-reflector");
|
|
5
5
|
exports.jitReflector = new jit_reflector_1.JitReflector();
|
|
6
6
|
exports.directiveResolver = new testing_1.MockDirectiveResolver(exports.jitReflector);
|
|
7
7
|
exports.pipeResolver = new testing_1.MockPipeResolver(exports.jitReflector);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reflect.js","sourceRoot":"","sources":["../../../lib/common/reflect.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"reflect.js","sourceRoot":"","sources":["../../../lib/common/reflect.ts"],"names":[],"mappings":";;AAAA,uDAA0G;AAE1G,mDAA+C;AAElC,QAAA,YAAY,GAAG,IAAI,4BAAY,EAAE,CAAC;AAClC,QAAA,iBAAiB,GAAG,IAAI,+BAAqB,CAAC,oBAAY,CAAC,CAAC;AAC5D,QAAA,YAAY,GAAG,IAAI,0BAAgB,CAAC,oBAAY,CAAC,CAAC;AAClD,QAAA,gBAAgB,GAAG,IAAI,8BAAoB,CAAC,oBAAY,CAAC,CAAC"}
|