Comments (3)
IIRC this was done intentionally so that things like t.plan
are not affected by returned promises.
from blue-tape.
Huh. So the workaround is to use t.plan()
instead?
from blue-tape.
The resolved promise is not considered to be an assertion. Its instead considered to be an async test that simply ended.
Since the test ended without doing any assertions, the assertion count is zero.
If you add assertions, they will be counted. Nested tests will also be counted.
from blue-tape.
Related Issues (18)
- Publish a new version to npm HOT 1
- Consider loosening Tape version requirement to 2.x HOT 1
- Explain how/if this differs from .catch(t.error) HOT 1
- Adding Generator Support? HOT 25
- `instanceof Function` isn't reliable cross-realm HOT 3
- Assume sync if no promise is returned? HOT 9
- Can't assert within a 'then' block HOT 2
- Move tape to peer dependencies HOT 4
- Provide support for generator functions HOT 1
- Error output stack trace could be more useful HOT 18
- Improve shouldFail() similar to throws()? HOT 5
- Using with t.plan and t.end HOT 2
- Don't try to detect promises. Just use `Promise.resolve`.
- Test that promise rejects/throws HOT 2
- Passing tests are not reported HOT 2
- Errors don't crash test runner
- No custom message for functions ok, true, assert
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blue-tape.