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

checkers

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checkers - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

CHANGELOG.md

2

package.json
{
"name": "checkers",
"version": "0.9.0",
"version": "0.9.1",
"description": "Property-based testing for JavaScript via ClojureScript's test.check",

@@ -5,0 +5,0 @@ "main": "checkers.js",

@@ -5,2 +5,4 @@ # checkers

<img src="https://drive.google.com/uc?id=0BxqNu2E4b85zeWtxZGtOR1doaXM" align="right" />
Property-based testing for JavaScript via ClojureScript's [test.check](https://github.com/clojure/test.check).

@@ -55,2 +57,7 @@

* Generator docs
* Sugar for popular testing frameworks
```js
var checking = require('checkers/mocha'), gen = checking.gen;
checking("property", [gen/int], function ...)
```
* Tutorial

@@ -57,0 +64,0 @@ * Better examples

/*eslint-env mocha */
var _ = require('lodash');
var assert = require('assert');

@@ -27,2 +28,22 @@ var checkers = require('..');

});
it("errors if property is not satisfied", function() {
try {
checkers.forAll([gen.int], function(i) {
return _.isString(i);
}).check(1);
throw new Error("Shouldn't throw");
} catch(ex) {
assert.notEqual(ex.message, "Shouldn't throw");
}
});
it("errors if property checker throws", function() {
try {
checkers.forAll([gen.int], function() {
throw new Error("whoops");
}).check(1);
throw new Error("Shouldn't throw");
} catch(ex) {
assert.equal(ex.message, "whoops");
}
});
});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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