Tape: Promise and ES6 support?

Created on 4 May 2017  路  4Comments  路  Source: substack/tape

So if I want both Promise and ES6 support what do I need to do? (These are separate proxies [???] over tape.) I suppose I can just use the version of tape with Promise support and then configure babel-register. Or is this another way?

question

All 4 comments

ES6 support is unrelated to tape - if you're using babel, or a node that understands it, you can just use it.

As for Promises, promise.then(t.end).catch(t.fail); will make your tape test end when the promise is resolved, and fail if it's rejected - no additional support is needed.

So in a project with lots of promises, that's not a practical approach. I'm only asking this because your docs have the following section below, so I would like to know if it's possible to get those two versions to work with each other.

## other
// ...
Promise support with https://www.npmjs.com/package/blue-tape
ES6 support with https://www.npmjs.com/package/babel-tape-runner

Since blue-tape is what you require in your tests, and babel-tape-runner is a command line runner, they definitely should work together.

doh. Hadn't noticed that. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kl0tl picture kl0tl  路  7Comments

dcousens picture dcousens  路  8Comments

mustafamamun picture mustafamamun  路  3Comments

callumlocke picture callumlocke  路  4Comments

Istador picture Istador  路  3Comments