Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tpill

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tpill - npm Package Compare versions

Comparing version 0.0.1 to 1.0.0

9

package.json
{
"name": "tpill",
"version": "0.0.1",
"description": "MoNoApps Test Pill",
"version": "1.0.0",
"description": "Sync testing tool",
"main": "tpill.js",

@@ -14,5 +14,4 @@ "scripts": {

"keywords": [
"mongodb",
"TPill",
"mna"
"test",
"sync"
],

@@ -19,0 +18,0 @@ "author": "Daniel Martinez",

tpill
=====
Assertion syncronic test.
MoNoApps Test Pill
Usage
install
===
Install
````bash
npm install tpill
````
Import, create and run
usage
===
````js
// import
var TPill = require('tpill').TPill;
var tpill = new TPill();
// var tpill = new TPill(3000); wait 3 seconds
// add test
tpill.create(1, 1, 'My Test is True', true);
tpill.create(1, '1', 'My Second Test is True ', false);
// run all test
tpill.run(function(){

@@ -23,1 +29,6 @@ process.exit()

````
api
===
tpill.create(current, expected, testName, strict);
tpill.run(callback);
var TPill = require('../tpill.js').TPill;
var tpill = new TPill();
var tpill = new TPill(1000);
var assert = require("assert");

@@ -10,33 +10,33 @@

assert.ok(tpill instanceof TPill);
})
});
it('TPill should have a stats', function(){
assert.equal('\nStatistics:', tpill.MESSAGES.stats);
})
assert.equal('\nStatistics:', tpill.MESSAGES.STATS);
});
it('TPill should have a stats object', function(){
assert.equal('object', typeof tpill.STATS);
})
});
it('TPill should have an emtpy list for tests', function(){
assert.equal(0, tpill.LIST.length);
})
});
it('TPill should add one test to the list', function(){
tpill.create('test', 'test', 'Must to pass',true);
tpill.create('test', 'test', 'Must to pass', true);
assert.equal(1, tpill.LIST.length);
})
});
it('TPill should add on ignored test', function(){
it('TPill should add an ignored test', function(){
tpill.create();
assert.equal(2, tpill.LIST.length);
})
});
it('TPill should run and return stats', function(done){
tpill.create('test', '', 'Must to fail',true);
tpill.create('test', '', 'Must to fail', true);
tpill.run(done);
})
});
})
});
})
});

@@ -7,6 +7,4 @@ /**

this.BALLOT_X = String.fromCharCode(0x2717);
this.SURPRISE = String.fromCharCode(8264);
this.MESSAGES = {
stats: '\nStatistics:'
};
this.SURPRISE = String.fromCharCode(0x2726);
this.MESSAGES = { STATS: '\nStatistics:' };
this.TIMEOUT = time || 0;

@@ -38,5 +36,5 @@ this.STATS = {

if (test.strict) {
return (test.current === test.expected)
return (test.current === test.expected);
} else {
return (test.current == test.expected)
return (test.current == test.expected);
}

@@ -69,3 +67,3 @@ };

setTimeout(function () {
console.log(tpill.MESSAGES['stats'] + ' ' + JSON.stringify(tpill.STATS));
console.log(tpill.MESSAGES.STATS + ' ' + JSON.stringify(tpill.STATS));
if (cb){

@@ -72,0 +70,0 @@ cb();

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