Skip to content

Conversation

@timdeschryver
Copy link
Member

@timdeschryver timdeschryver commented May 1, 2019

This introduces also a couple of breaking changes:

  • createComponent is renamed to render - should be possible to provide a schematic for this to make the transition easier
  • getFromTestBed is removed, use TestBed.get directly instead
  • upgrades to dom-testing-library, which had some breaking changes
  • signature changes, properties are passed through via RenderOptions as componentProperties

Closes #4

@kentcdodds
Copy link
Member

This looks really awesome! You may consider moving the bulk of the documentation over to https://testing-library.com/angular as well 👍

@timdeschryver timdeschryver force-pushed the testing-library-conform branch 2 times, most recently from 26aee6e to 3cd64eb Compare May 3, 2019 20:51
BREAKING CHANGE: The getFromTestBed function has been removed, use Angular's TestBed.get instead
BREAKING CHANGE: The createComponent function has been renamed to render
BREAKING CHANGE: See the changelog of dom-testing-library
BREAKING CHANGE: The parameters parameter has been renamed to componentProperties and has also been moved to RenderOptions. To create a component via the component syntax, just pass it to the render function. BEFORE: ```ts const component = createComponent( { component: HomeComponent, parameters: { welcomeText: 'hello' } }, { declarations: [ HomeComponent ] } ) ``` AFTER: ```ts const component = render(HomeComponent, { componentProperties: { welcomeText: 'hello' }, declarations: [ HomeComponent ] }) ```
@timdeschryver timdeschryver force-pushed the testing-library-conform branch from 3cd64eb to 1e28ddb Compare May 3, 2019 21:08
@timdeschryver timdeschryver marked this pull request as ready for review May 3, 2019 21:14
@timdeschryver timdeschryver force-pushed the testing-library-conform branch from a06b1a7 to 8451d33 Compare May 4, 2019 07:32
@timdeschryver timdeschryver force-pushed the testing-library-conform branch from 8451d33 to 12035a4 Compare May 4, 2019 07:38
@timdeschryver
Copy link
Member Author

timdeschryver commented May 4, 2019

fyi @kentcdodds , I will cut a release with these changes on Monday.

I also trimmed down the README (a copy paste from the svelte library) and will start updating the docs on the docs repository. I noticed all of the *-testing-libraries are using an animal as logo, I picked up the 🦔 if that's OK 😃.

Thanks again! 🙏
I'm happy with these changes, they will be in line with the rest and it will be easier/more naturally to use.

@kentcdodds
Copy link
Member

Love that emoji. It's perfect 🦔

@timdeschryver timdeschryver merged commit d07db1c into master May 5, 2019
@timdeschryver
Copy link
Member Author

🎉 This PR is included in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@timdeschryver timdeschryver deleted the testing-library-conform branch May 5, 2019 15:20
@ghost
Copy link

ghost commented Nov 5, 2020

I notice that this PR mentions a schematic 'to make the transition easier' - has any work been done on this?

Thanks! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants