New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dtest

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dtest

simple unit tests with stats

latest
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

dtestjs

dtestjs is a simple test framework for nodejs / javascript.

It uses colorsjs by Marak Squires

var dtest = require('dtest');
var assert;

/////////////////////////////////////
assert = dtest.ut("math");
/////////////////////////////////////
assert(1 + 1 === 2, "basic addition, one plus one");
assert(5318008<3, "number comparison, 5318008<3");

/////////////////////////////////////
assert = dtest.ut("wow");
/////////////////////////////////////
var doge = "wow";
assert(doge === "wow", "such doge");
assert(doge === "dog", "so test".rainbow);

dtest.print_failures();
dtest.print_stats();


PASS :: math basic addition, one plus one
FAIL :: math number comparison, 5318008<3
PASS :: wow such doge
FAIL :: wow so test

[[ FAILURES ]]
math - number comparison, 5318008<3
wow - so test

2|2

such colors

colored output

Keywords

assert

FAQs

Package last updated on 03 Jan 2014

Did you know?

Socket

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.

Install

Related posts