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

paratest

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paratest

parameterize your js tests

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

paratest

parameterize your javascript tests

what if you never had to write a describe block again? what would you do with all the extra time saved?

usage

require paratest in your spec file and give it an array of tests to run

const paratest = require('paratest');
const compute = require('../src/compute');

const tests = [
  {
    subject: compute.sum,
    cases: [
      {
        name: "works",
        args: [1, 2],
        result: 3
      }, {
        name: "works with floats",
        args: [1.0, 2],
        result: 3.0
      }
    ]
  }, {
    subject: compute.mult,
    cases: [
      {
        name: "works",
        args: [1, 2],
        result: 2
      }, {
        name: "works with floats",
        args: [1.0, 2],
        result: 2.0
      }
    ]
  }
];

paratest("compute", tests);

compatibility

tested with jasmine and jest

Keywords

FAQs

Package last updated on 09 Nov 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