
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Tape with promise support.
Same as tape, except if you return a promise from a test,
it will be checked for errors. If there are no errors, the test will end. Otherwise the test
will fail. This means there is no need to use t.plan()
or t.end()
.
Also provides t.shouldFail(promise P, optional class|regex expected, optional message)
(as
well as the alias shouldReject
) which returns a new promise that resolves successfully if P
rejects. If you provide the optional class, or regex then it additionally ensures that err
is
an instance of that class or that the message matches the regular expression. The behaviour is
identical to tape's throws
assertion.
Assuming delay()
returns a promise:
const test = require('blue-tape');
test("simple delay", function(t) {
return delay(1);
});
test("should fail", function(t) {
return delay(1).then(function() {
throw new Error("Failed!");
});
});
Assuming failDelay()
returns a promise that rejects with a DerpError:
test("promise fails but test succeeds", function(t) {
return t.shouldFail(failDelay(), DerpError);
});
MIT
FAQs
Tape test runner with promise support
The npm package blue-tape receives a total of 41,868 weekly downloads. As such, blue-tape popularity was classified as popular.
We found that blue-tape demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.