Commit 4c81ed9
authored
feat: remove RenderDirectiveOptions (#265)
BREAKING CHANGE:
The template property is removed from the render options.
Instead, you can pass it as the first argument of `render.
BEFORE:
```ts
await render(InputOutputComponent, {
// 👇 this is deprecated
template: '<app-fixture [value]="47" (sendValue)="sendValue($event)" (clicked)="clicked()"></app-fixture>',
componentProperties: {
sendValue: sendSpy,
},
});
```
AFTER:
```ts
// 👇 Move the template in the first argument
await render('<app-fixture [value]="47" (sendValue)="sendValue($event)" (clicked)="clicked()"></app-fixture>', {
// 👇 Add the component to declarations
declarations: [InputOutputComponent],
componentProperties: {
sendValue: sendSpy,
},
});
```1 parent 224e550 commit 4c81ed9
File tree
4 files changed
+8
-73
lines changed- apps/example-app/src/app/examples
- projects/testing-library
- src/lib
- tests
4 files changed
+8
-73
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | 259 | | |
297 | 260 | | |
298 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 39 | | |
47 | 40 | | |
48 | 41 | | |
49 | 42 | | |
50 | 43 | | |
51 | 44 | | |
52 | 45 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 46 | + | |
57 | 47 | | |
58 | 48 | | |
59 | 49 | | |
| |||
86 | 76 | | |
87 | 77 | | |
88 | 78 | | |
89 | | - | |
90 | 79 | | |
91 | 80 | | |
92 | 81 | | |
| |||
106 | 95 | | |
107 | 96 | | |
108 | 97 | | |
109 | | - | |
| 98 | + | |
110 | 99 | | |
111 | 100 | | |
112 | 101 | | |
| |||
227 | 216 | | |
228 | 217 | | |
229 | 218 | | |
230 | | - | |
| 219 | + | |
231 | 220 | | |
232 | 221 | | |
233 | 222 | | |
234 | 223 | | |
235 | 224 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | 225 | | |
241 | 226 | | |
242 | 227 | | |
243 | 228 | | |
244 | 229 | | |
245 | | - | |
| 230 | + | |
246 | 231 | | |
247 | 232 | | |
248 | 233 | | |
| |||
293 | 278 | | |
294 | 279 | | |
295 | 280 | | |
296 | | - | |
297 | 281 | | |
298 | | - | |
| 282 | + | |
299 | 283 | | |
300 | 284 | | |
301 | 285 | | |
302 | 286 | | |
303 | 287 | | |
304 | | - | |
305 | | - | |
306 | 288 | | |
307 | | - | |
308 | | - | |
| 289 | + | |
309 | 290 | | |
310 | 291 | | |
311 | 292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 65 | | |
75 | 66 | | |
76 | 67 | | |
| |||
0 commit comments