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

mocha-param

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha-param - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

lib/index.js

@@ -20,3 +20,3 @@ /*

it(desc, function () {
callback(val);
return callback(val);
});

@@ -37,2 +37,2 @@ });

itParam,
}
}
{
"name": "mocha-param",
"version": "1.0.1",
"version": "1.0.2",
"description": "Parameterized tests for Mocha",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -11,3 +11,3 @@ # Mocha param

Simply use 'itParam' instaead of the standard mocha 'it' function and pass in some data.
Simply use 'itParam' instead of the standard mocha 'it' function and pass in some data.

@@ -26,3 +26,18 @@ ```javascript

})
```
Result:
```
basic mocha test with data
✓ test each value in the array
✓ test each value in the array
✓ test each value in the array
3 passing (25ms)
```
# Async

@@ -45,2 +60,15 @@

Result:
```
async mocha test with data
✓ test each value in the array
✓ test each value in the array
✓ test each value in the array
3 passing (17ms)
```
# Array Objects

@@ -58,2 +86,14 @@

})
```
```
Result:
```
test with array of data
✓ test each person object in the array
✓ test each person object in the array
2 passing (14ms)
```
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