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

fix(waitFor): reject with Error rather than string #84

Closed RomkeVdMeulen closed 6 years ago

RomkeVdMeulen commented 6 years ago

When used in combination with async / await, the value that the promise is rejected with may be thrown, and throwing a string literal rather than an Error may cause warnings in some browsers.

In my case (using headless Chrome), I got "Error: the string "Element not found" was thrown, throw an Error :)". This obscured the trace of the actual rejected promise.

Alexander-Taran commented 6 years ago

Seems like browsers started to respect the whatwg recommendations.. that might lead to reorganizing router redirects as well.. )-: sad day (-:

RomkeVdMeulen commented 6 years ago

Just ran into this again. Has anyone had a chance to look at this?

silbinarywolf commented 6 years ago

@EisenbergEffect Can you or somebody on your team please take a look at this?

EisenbergEffect commented 6 years ago

I can get this merged and released if @RomkeVdMeulen can remove the changes to the dist folder. Those will get generated when I run the build. Ping me after that's done and I'll merge it and put out a release.

EisenbergEffect commented 6 years ago

Apologies for the delay. This just went under the radar somehow.

RomkeVdMeulen commented 6 years ago

Done.

EisenbergEffect commented 6 years ago

Thanks!

EisenbergEffect commented 6 years ago

Need a bit more time to get the actual release out. It will probably be Monday-ish.