briancavalier / creed

Sophisticated and functionally-minded async with advanced features: coroutines, promises, ES2015 iterables, fantasy-land
https://briancavalier.github.io/creed
MIT License
273 stars 20 forks source link

fix(trace): Defend against Errors with missing or bogus stacks #125

Closed briancavalier closed 7 years ago

briancavalier commented 7 years ago

Defend against Errors with missing or bogus stacks. Error instances or subclasses with missing or non-string stacks would crash async trace reconstruction because of a blind call to stack.replace.

Also, refactored npm scripts a bit to make it easier to run just unit tests (npm run test:unit) for faster iteration while developing.