Skip to content

v11.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 03 Dec 16:04
· 139 commits to main since this release

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 to change.
    The change method keeps the current fixture intact and invokes ngOnChanges.

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