Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Testly is a testing library built for simplicity and usefulness.
Testly is an agile and polyglot testing framework. This is the NodeJS implementation.
Here is a basic example:
module.exports = function (suite) {
var i = 0;
suite.name("Basic");
suite.init(function () {
i++;
});
suite.define("Passing Test", function (test) {
test.assert(i == 1);
});
suite.define("Failing Test", function (test) {
test.shouldFail(function () {
test.fail();
});
});
suite.define("Assertion Test", function (test) {
test.assert(5 == 5);
test.assert("Hello" == "Hello");
test.assert("Go" != "No");
test.assert("LOL".toLowerCase() == "lol");
});
};
A suite is a set of tests. Each file where tests are is a separate suite.
name
: Gets/Sets the name of the suiteinit
: Pass a function to this function and it will be run before any tests are executed.define
: Defines a new test - args: String, Function
The test
object is passed to each test function as a utility belt :)
assert
: Asserts that the input is true
shouldFail
: Assertions or Errors are ignored in functions passed to itfail
: Fails the Testexec
: Executes a process - (uses shelljs's exec
function)shell
: shelljs shorthandlog
: String passed to this function will be recorded in the test reportstest.assert
is a function that can be used like normal test assertions.
test.assert
also adds the assert
module's functions onto it, so it can be used like:
test.assert.equal(5, 5);
Please file any bugs on the GitHub Issue Tracker.
FAQs
Testly is a testing library built for simplicity and usefulness.
The npm package testly receives a total of 0 weekly downloads. As such, testly popularity was classified as not popular.
We found that testly 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.