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

ava-jsverify

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

ava-jsverify

An interface for running jsverify tests with AVA

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by400%
Maintainers
1
Weekly downloads
 
Created
Source

ava-jsverify

npm version

An interface for running jsverify tests with AVA

Getting started

NPM

$ npm install ava-jsverify --save

Yarn

$ yarn add ava-jsverify

Usage

ava-jsverify exports a check function to be passed to ava's test function. check performs broadly the same task as jsc#checkforall, except that it also exposes ava's test api for assertions. You should continue to use the jsverify and ava API's with the exception of check.

const test = require('ava');
const jsc = require('jsverify');
const { check } = require('ava-jsverify');

test(
  'generates',
  check(jsc.integer, jsc.string, (t, x, y) => {
    t.is(typeof x, 'number');
    t.is(typeof y, 'string');
  })
);

Output

On a test failure the shrunken fail case will be displayed after the test description and between the parentheses. In the example below the smallest failure has been identified as 0

3 passed
1 failed

generates with plan ( 0 )

/ava-jsverify/test/check.test.js:30

 29:     t.plan(2);
 30:     t.true(x >= 1);
 31:     t.is(typeof x, 'number');

Value is not `true`:

  false

x>=1
=> false

x
=> 0

Keywords

FAQs

Package last updated on 10 Apr 2017

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