Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
human-readable TAP summarizer
Pipe TAP text into the faucet
command, get back pretty results:
You can use any runner you want to generate the TAP output. Here we'll use tape:
You can give the faucet
command a list of files:
or if you just type faucet
, any js files in test/
or tests/
will be run
using the tape
command internally:
To get the faucet
command, with npm do:
npm install -g faucet
The great thing about TAP is that it's inherently serializable on stdout, so you can use whichever libraries you wish to generate it.
Many test libraries have ways to get TAP output.
tape and tap will give you TAP output by default.
With a tape test, you would just write
a test.js
like:
var test = require('tape');
test('beep boop', function (t) {
t.plan(2);
t.equal(1 + 1, 2);
setTimeout(function () {
t.deepEqual(
'ABC'.toLowerCase().split(''),
['a','b','c']
);
});
});
and then just run the file with node test.js
to get the TAP output:
TAP version 13
# beep boop
ok 1 should be equal
ok 2 should be equivalent
1..2
# tests 2
# pass 2
# ok
or if you have a directory of files, you can use the tape
command that you get
when you npm install -g tape
:
$ tape test/*.js
TAP version 13
# stream in a stream
ok 1 should be equivalent
# expand a streams1 stream
ok 2 should be equivalent
# expand a streams2 stream
ok 3 should be equivalent
# expand a streams2 stream with delay
ok 4 should be equivalent
1..4
# tests 4
# pass 4
# ok
To get TAP out of mocha, do mocha -R tap
:
$ mocha -R tap
1..17
ok 1 shim found
ok 2 core shim not found
ok 3 false file
ok 4 false module
ok 5 local
ok 6 index.js of module dir
ok 7 alternate main
ok 8 string browser field as main
ok 9 string browser field as main - require subfile
ok 10 object browser field as main
ok 11 object browser field replace file
ok 12 object browser field replace file - no paths
ok 13 replace module in browser field object
ok 14 replace module in object browser field with subdirectory
ok 15 replace module in object browser field with subdirectory containing
package.json
ok 16 replace module in object browser field with subdirectory containing
package.json with string browser field as main
ok 17 replace module in object browser field with subdirectory containing
package.json with object browser field as main
# tests 17
# pass 17
# fail 0
Once you've got a way to get TAP out of your tests, just pipe into faucet
:
usage:
faucet [FILES]
command | faucet
MIT
v0.0.2 - 2022-09-22
#1
npm run lint
4399c97
8a62fc5
f88d449
51df79a
auto-changelog
7a01dd6
string.prototype.trim
, array.prototype.foreach
, array.prototype.push
edcea74
0d4aa82
.push
changes from edcea74 7694712
array.prototype.join
, array.prototype.map
, string.prototype.split
, array.prototype.slice
555e2f6
sideEffects
flag, funding
, FUNDING.yml
a653c28
safe-regex-test
418c79e
npmignore
to autogenerate an npmignore file 5b18ec4
npm-which
to locate tape
binary 0a9bd16
duplexer
, sprintf
, tap-parser
6a8765c
tape
f3ca01e
d4559ca
90a49a2
safe-publish-latest
d5d2f41
2f159b1
sprintf-js
successor instead of sprintf
1671ad5
minimist
0994d21
FAQs
human-readable TAP summarizer
The npm package faucet receives a total of 10,992 weekly downloads. As such, faucet popularity was classified as popular.
We found that faucet 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.