Socket
Socket
Sign inDemoInstall

testy

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testy

Super simple testing script


Version published
Weekly downloads
2
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status

testy

Super simple testing script. No added sugar. ≈100 LOC.

Install

Install with npm:

npm install testy

Usage

Example A

Designed to be as simple as possible - no functions, just the test.

var test  = require('testy')();
var assert = test.assert;
assert.equal(true, true);

example-a-screenshot!

Example B

Set the expected property for async testing.

var test  = require('testy')();
var assert = test.assert;

test.expected = 2;

setTimeout(function() {
  assert.equal(1, 1);
  assert.deepEqual([1, 2, 3], [1, 2, 3]);
}, 2000);
```

![example-b-screenshot!](https://github.com/leetreveil/node-testy/raw/master/example-b.png)



### Example C

Run multiple tests within a file.

``` javascript
var testy = require('testy');

var testA = new testy('testA');
var assertA = testA.assert;
testA.expected = 1;
assertA.strictEqual(1, 1);

var testB = new testy('testB');
var assertB = testB.assert;
testB.expected = 1;
assertB.strictEqual(1, 1);
```

![example-c-screenshot!](https://github.com/leetreveil/node-testy/raw/master/example-c.png)

FAQs

Package last updated on 02 Apr 2013

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc