aurelia / testing

Simplifies the testing of UI components by providing an elegant, fluent interface for arranging test setups along with a number of runtime debug/test helpers.
MIT License
40 stars 27 forks source link

Type inconsistency in waitFor, waitForElement, & waitForElements #72

Closed michaelbull closed 6 years ago

michaelbull commented 7 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: The type definition for waitForElement, waitForElements and waitFor define the second options argument as required (options: any). The ComponentTester's unit test suggests that the second argument is optional as it omits it entirely.

This inconsistent definition forces TypeScript users to unnecessarily pass in an empty object to satisfy the type definition, therefore I think the definition should be changed to options?: any.

This is reinforced by the official docs which state the first argument, selector, as mandatory, but pose no such restriction on the options argument.

Expected/desired behavior:

michaelbull commented 6 years ago

Looks like this was fixed with https://github.com/aurelia/testing/pull/76