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

testing

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testing - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

6

index.js

@@ -20,3 +20,3 @@ 'use strict';

* Reports a success for the current test. Parameters:
* - message (optional): the message to show. Default: '.'.
* - message (optional): the message to show. Default: true.
* - callback (optional): function to call. If not present, just show the message.

@@ -29,3 +29,3 @@ * The function must be in node.js style: callback(error, result).

var parameters = processParameters(arguments);
var message = parameters.message || '.';
var message = parameters.message || true;
if (parameters.callback)

@@ -200,3 +200,3 @@ {

}
exports.success(util.format(result));
exports.success('All tests successful: %s', util.inspect(result, true, 10, true));
}

@@ -203,0 +203,0 @@

{
"name": "testing",
"version": "0.0.1",
"version": "0.0.2",
"description": "Simple testing framework.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/alexfernandez/testing",

@@ -42,3 +42,3 @@ # testing

Integration is very easy.
Implementation is very easy, based around three functions.

@@ -53,6 +53,8 @@ ### Basics

#### testing.success([callback])
#### testing.success([message], [callback])
Note success for the current test.
Note success for the current test. An optional message is shown if there is no callback.
If there is a callback, then it is called with the message.
#### testing.failure([message], [callback])

@@ -106,2 +108,14 @@

### Showing results
You can use your own function to show results. The library provides a premade callback:
#### testing.show(error, result)
Show an error if present, a success if there was no error.
### Sample code
This same library has some sample code in index.js, check it out!
## License

@@ -108,0 +122,0 @@

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