Skip to content

v4.0.0

Compare
Choose a tag to compare
@cexbrayat cexbrayat released this 26 Jun 15:17
· 1539 commits to master since this release

Features

  • strict and better typings (822963d)

We now properly infer (if possible) the type of the queried element(s).
For example:

const testElement = tester.element('div'); // inferred as TestHtmlElement<HTMLDivElement> | null
const testLink = tester.element<HTMLAnchorElement>('.selector'); // inferred as TestHtmlElement<HTMLAnchorElement> | null
const testButtons = tester.elements<HTMLButtonElement>('.btn'); // inferred as Array<TestButton>
const testElements = tester.elements('div'); // inferred as Array<TestHtmlElement<HTMLDivElement>>
const testLinks = tester.elements<HTMLAnchorElement>('.selector'); // inferred as Array<TestHtmlElement<HTMLAnchorElement>>

⚠ BREAKING CHANGES

  • ngx-speculoos is now built against Angular 10.0.0. If you want to use it with Angular 9.x, stick to the previous version of ngx-speculoos.