
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Framework for convenient unit testing. Testing provides the intuitive interface, simple tests structure, asynchronous code handling mechanism, colorful report, verbosity control and more. Use the module to get free of routines which can be automated.
Framework for convenient unit testing. Utility Testing provides the intuitive interface, simple tests structure, asynchronous code handling mechanism, colorful report, verbosity control and more. Use the module to get free of routines which can be automated.
To install :
npm install -g wTesting@stable
Name of test file should has the suffix .test
so that the testing utility could find and run it. Create a test file First.test.js
in any project directory
require( 'wTesting' );
function myTest( test )
{
/* describe what is going to happen */
test.case = 'info about test case';
/* do it and save results */
var got = 'abc'.indexOf( 'a' );
var expected = 0;
/* compare result with expected */
test.identical( got, expected );
}
/*
Map that describes test suit, contains
- name of the suit,
- map of test routines
- and other options
*/
var testSuite =
{
name : 'name of my test suit',
tests :
{
myTest : myTest
}
}
/* Initilize test suit */
testSuite = wTestSuite( testSuite );
/* Run all tests of the suit */
wTester.test( testSuite.name );
tst .run ./someDirectory
Running all test suites in directory by utility Testing
. To run file First.test.js
run command tst .run ./
in directory of file.
tst .run ./path/to/suite
Running of separate test suite by utility Testing
.
node ./path/to/suite
Running of separate test suite by NodeJS directly.
Utility provides more control of testing process by running options. It is control parameters of the testing that is passed to the run command.
tst .run ./someDirectory verbosity:5
Option verbosity
- change amount of output test information. Accepts a value from 0 to 9. Default value is 4.
tst .run ./path/to/suite routine:someRoutine
Option routine
- used to test separate test routine. Accepts name of test routine.
tst .run ./someDirectory testRoutineTimeOut:10000
Option testRoutineTimeOut
- limits the testing time for test routines. Accepts time in milliseconds. Default value is 5000ms.
Please see documentation in the doc
directory.
For gentle introduction use tutorials. For getting exhaustive information on one or another aspect use list of concepts to find a concept of interest and get familiar with it.
All information about utility in short form given in cheat sheet.
FAQs
Framework for convenient unit testing. Testing provides the intuitive interface, simple tests structure, asynchronous code handling mechanism, colorful report, verbosity control and more. Use the module to get free of routines which can be automated.
We found that wTesting 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 researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.