Releases: testing-library/angular-testing-library
Releases · testing-library/angular-testing-library
v12.1.2
v12.1.1
v12.1.0
v12.0.2
v12.0.1
v12.0.0
v11.0.4
v11.0.3
v11.0.2
v11.0.0
11.0.0 (2021-12-03)
Bug Fixes
- query params with same keys are added to the collection (82e037e)
- wrapper component selector is appended with
atl-
(6ea2e7f)
chore
Features
BREAKING CHANGES
- Query params on a router link with the same key are no longer overwriting the last value.
Instead they are added to an array. - The template property is removed from the render options.
Instead, you can pass it as the first argument of `render.
BEFORE:
await render(InputOutputComponent, {
// 👇 this is deprecated
template: '<app-fixture [value]="47" (sendValue)="sendValue($event)" (clicked)="clicked()"></app-fixture>',
componentProperties: {
sendValue: sendSpy,
},
});
AFTER:
// 👇 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,
},
});
rerender
has been renamed tochange
.
Thechange
method keeps the current fixture intact and invokesngOnChanges
.
The new rerender
method destroys the current component and creates a new instance with the updated properties.
BEFORE:
const { rerender } = render(...)
rerender({...})
AFTER:
const { change } = render(...)
change({...})
- This version requires the following versions:
- Angular v13