Socket
Socket
Sign inDemoInstall

jest-url-matchers

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jest-url-matchers

A Collection of Jest matchers for URLs


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Install size
11.7 kB
Created
Weekly downloads
 

Readme

Source

jest-url-matchers

A little library with some jest matchers for working with and validating URL's

Installation

  • Install with npm or yarn
$ npm install --save-dev jest-url-matchers
# $ yarn add --dev jest-url-matchers
  • Set up the types in the tsconfig.json/tsconfig.spec.json
    {
        // ...rest of the file
        "types": ["jest", "node", "jest-url-matchers/types" ]
    }
  • import at the top of your jest.setup.ts;
import 'jest-url-matchers'

Usage

    # In your write your tests like this: 
    expect("https://www.google.com?s=search+query").toHaveQueryString("s");

Keywords

FAQs

Last updated on 23 Dec 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc