Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove RenderDirectiveOptions #265

Merged
merged 2 commits into from
Nov 26, 2021

Conversation

timdeschryver
Copy link
Member

BREAKING CHANGE:

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,
  },
});

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,
  },
});
```
@timdeschryver timdeschryver merged commit 4c81ed9 into beta Nov 26, 2021
@timdeschryver timdeschryver deleted the remove-RenderDirectiveOptions branch November 26, 2021 20:52
@github-actions
Copy link

🎉 This PR is included in version 11.0.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

timdeschryver added a commit that referenced this pull request Dec 3, 2021
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,
  },
});
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant