Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
tests
Advanced tools
Readme
Console Test Runner: writes to stdin, reads stdout.
tests.js is useful for test-driven development of command-line utilities. Works on Mac OS X, Windows and Linux so you can write cross-platform tests. Tests do not depend on the implementation language of the program.
You will need Node.js and NPM. Install using the following command.
$ npm install -g tests
Then create some .test
files and execute the following command in the folder
with tests.
$ tests
Test files should have the following structure.
first line—command to execute (can be relative path, can contain pipeline of several commands),
then <<<
and input to send to the program (can be multiple lines),
then >>>
and expected output.
wc
<<<
one two three
>>>
1 3 14
This test executes wc
command, sends string one two three
to its stdin and
checks the output of the program.
When the test is run you should see something like
✓ /path/to/tests/wc.test: 9ms
✔ 1 test complete (9ms)
To compare program’s output with expected output not as literal strings but as
JSON objects write >>>JSON
in the test file instead of >>>
.
For more examples see https://github.com/sheremetyev/texts.js/tree/master/test.
The idea was borrowed from John MacFarlane’s tests format in Pandoc2.
FAQs
Console test runner - writes to stdin, reads stdout
The npm package tests receives a total of 4,206 weekly downloads. As such, tests popularity was classified as popular.
We found that tests 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.