feat: make this library *-testing-library conform - #5
Conversation
|
This looks really awesome! You may consider moving the bulk of the documentation over to https://testing-library.com/angular as well 👍 |
26aee6e to
3cd64eb
Compare
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 ] })
```
3cd64eb to
1e28ddb
Compare
a06b1a7 to
8451d33
Compare
8451d33 to
12035a4
Compare
|
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! 🙏 |
|
Love that emoji. It's perfect 🦔 |
|
🎉 This PR is included in version 4.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
|
I notice that this PR mentions a schematic 'to make the transition easier' - has any work been done on this? Thanks! 🙏 |
This introduces also a couple of breaking changes:
createComponentis renamed torender- should be possible to provide a schematic for this to make the transition easiergetFromTestBedis removed, useTestBed.getdirectly insteadRenderOptionsascomponentPropertiesCloses #4