Skip to content

v4.0.0

Compare
Choose a tag to compare
@timdeschryver timdeschryver released this 05 May 15:15

4.0.0 (2019-05-05)

chore

  • update dom-testing-library (4a793b2)

Code Refactoring

  • remove getFromTestBed (53409eb)
  • rename createComponent to render (3c2df01)

Features

  • add migrations to fix breaking changes (32a552a)
  • add wrapper and queries render options (3b04682)
  • allow to pass component properties with the template syntax (a6a6fda)
  • debug accepts an element to be pretty printed (d39b758)
  • no need to pass the component as declaration with the component syntax (9cd8e91)

BREAKING CHANGES

  • 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:

const component = createComponent(
  {
    component: HomeComponent,
    parameters: { welcomeText: 'hello' }
  },
  {
    declarations: [ HomeComponent ]
  }
)

AFTER:

const component = render(HomeComponent, { componentProperties: { welcomeText: 'hello' }, declarations: [ HomeComponent ] })
  • See the changelog of dom-testing-library
  • The createComponent function has been renamed to render
  • The getFromTestBed function has been removed, use Angular's TestBed.get instead