
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
"small test" for node
A small test runner for a simple, small test framework. Because, hey, everyone writes a test framework in node, right?
Really, I just wanted to see what I could do in a day or two. I'm currently using it in node-ravendb for two reasons:
Keep things small (the main testino module is around 300 lines of code) and simple, support the assert module. Other than that, a few simple things:
Bonus: Since this is JavaScript, tests members can have a name that is a string, not just a legal function name, so have fun with spec-style test names!
These points are demonstrated in the Usage section below.
var testino = require('testino');
var assert = require('assert');
module.exports = sampleTester = testino.createFixture('Sample Tester');
sampleTester.tests = {
thingsAreWiredUp: function() {
assert.ok(true, 'just making sure things are wired up');
},
'we can use string names for methods too!': function() {
assert.ok(true, 'see, this is easy!');
},
thisTestShouldFail: function() {
var actual = expected = null;
assert.fail(actual, expected, 'this test failed on purpsose');
},
'tests with unexpected errors end up in the "Other" category': function () {
throw new Error("This result should end up in the Other category");
}
};
// If the file is run directly, just run the test fixture with default output
if (require.main === module) console.log(module.exports.run());
and the output is:
$ node sample-test.js
TEST RESULTS FOR Sample Tester Total: 4
Passed: 2 Failed: 1 Other (unknown): 1
FAILED test details:
thisTestShouldFail AssertionError: this test failed on purpsose
OTHER test details:
tests with unexpected errors end up in the "Other" category Error: This result should end up in the Other category
© 2013 Tony Heupel
FAQs
testino ======= "small test" for node
We found that testino 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
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.