RationalJS / future

A Js.Promise alternative for ReasonML
213 stars 15 forks source link

fixed bugs in promise rejection tests #18

Closed dvisztempacct closed 6 years ago

dvisztempacct commented 6 years ago

when you use Js.String.make() as your error transformer, i'm guessing that maps to javascripts' String() function, which means you'll get a string based on the specific JS representation that bucklescript has chosen for your error value.

these changes should work no matter how bsb decides to represent those values

dvisztempacct commented 6 years ago

To see the old tests break, just add another exception type to your project. It's probably pretty likely to break the tests.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 22


Totals Coverage Status
Change from base Build 18: 0.0%
Covered Lines: 82
Relevant Lines: 83

💛 - Coveralls
gilbert commented 6 years ago

Thanks for the PR. On further thought, shouldn't we be testing JavaScript exceptions? I believe TestError is an ocaml exception, which has a different runtime representation.

dvisztempacct commented 6 years ago

@gilbert yes I think that would be a good idea. Once this is merged I'm going to write some

gilbert commented 6 years ago

Sounds good. Thank you for you contribution!