New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jasmine-paratest

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jasmine-paratest

Parametrize your `it` assertions.

  • 0.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

Jasmine Paratest

Build Status

Parameterize your it assertions, reduce lines of code and improve readability of your tests with this library.

Installation

Requires jasmine v2+ to run.

$ npm install -D jasmine-paratest

Usage

Configure cases for single it assertion.

import {Para} from 'jasmine-paratest';

describe('Tests for isEven method', () => {
    Para.case(32)
        .fcase(12) // same as fit
        .xcase(33) // same as xit
        .case(2) // same as it
        .case(64)
        .it('Method should return true for $1', number => {
            // arrange
            // Configure mocks and stubs by case's data

            // act
            const result = isEven(number);

            // assert
            expect(result).toBeTruthy();
        });
});

Test run will looks like

Tests for isEven method
    Method should return true for 32
    Method should return true for 12
    Method should return true for 33
    Method should return true for 2
    Method should return true for 64

Keywords

FAQs

Package last updated on 19 Dec 2018

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