Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
section-tests
Advanced tools
A beautiful, extensible and lightweight async test framework.
1. Install the module
npm i --save-dev section-tests
2. Add test command to your package.json file
"scripts": {
"test": "./node_modules/.bin/section ./test/**/*.js"
},
You may use glob patterns for defining the files that should be loaded for executing the tests.
3. Create your test files
The section test framework generates structured messages from your test which then are processed by an output reporter. That reporter needs to be instantiated before the first test is executed.
Example:
import section, {SpecReporter} from 'section-tests';
// this must only be done in the first file
// that is executed for testing
section.use(new SpecReporter());
// lets do some preparations before we execute
// the actual tests
section.setup(async () => {
await doSetupThings();
// print status
section.info('Things are set up!');
});
// now lets execute some tests
section('Outer Group', (section) => {
section('Inner Group', (section) => {
section.test('Test a', async() => {
const result = await doSomething();
asser(result);
});
section.test('Test a', async() => {
const result = await doAnotherThing();
asser(result);
// print a neat log message
section.success(`Got result ${result}`);
});
});
});
The resulting output looks like this:
FAQs
TDD for node.js
The npm package section-tests receives a total of 1,890 weekly downloads. As such, section-tests popularity was classified as popular.
We found that section-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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
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.