Socket
Book a DemoInstallSign in
Socket

jasmine-contains

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jasmine-contains

Jasmine matchers to check the contents of an array

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Actions Status

jasmine-contains

Jasmine matchers to check the contents of an array

install

npm install --save-dev jasmine-contains
require("jasmine-contains")

or

<script src="\path\to\jasmine-contains\src\jasmine-contains.js"></script>

Matchers

toContainOnly(array)

Matches if expected array contains all and only the given array objects in any order.

Example

expect([1, "2", { "3": 4 }, 5]).toContainOnly([jasmine.any(Number), jasmine.objectContaining({ "3": 4 }), 1, "2"]);

toContainAll(array)

Matches if expected array contains all the given array objects in any order.

Example

expect([5, 4, 3, 2, 1]).toContainAll([1, 2, 3]);

Keywords

jasmine

FAQs

Package last updated on 01 Jun 2022

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