Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
The minimal unit testing library.
I wanted something simple, that just does unit tests (no async) and where each test is a standalone UNIX program. Now it exists.
Currently there is only one sane way: Do not use a framework. Instead use one file per test.
If that becomes an issue, you should write more unit tests. (It is not a unit test if it does I/O).
npm install utest
Running a test with utest is very simple:
var test = require('utest');
var assert = require('assert');
test('Number#toFixed', {
'returns a string': function() {
assert.equal(typeof (5).toFixed(), 'string');
},
'takes number of decimal places': function() {
assert.equal((5).toFixed(1), '5.0');
},
'does not round': function() {
assert.equal((5.55).toFixed(1), '5.5');
},
});
The only additional feature is running a before/after method:
var test = require('utest');
var assert = require('assert');
test('Date', {
before: function() {
this.date = new Date;
},
after: function() {
this.date = null;
},
'lets you manipulate the year': function() {
this.date.setYear(2012);
assert.equal(this.date.getFullYear(), 2012);
},
'can be coerced into a number': function() {
assert.equal(typeof +this.date, 'number');
},
});
I want to keep this library as minimal as possible, but I do consider the addition of the following features:
This module is licensed under the MIT license.
FAQs
The minimal unit testing library.
The npm package utest receives a total of 162 weekly downloads. As such, utest popularity was classified as not popular.
We found that utest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.