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

@centrapay/jest-date-matchers

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@centrapay/jest-date-matchers

Centrapay Jest date matchers

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Jest Date Matchers

Centrapay Jest date matchers.

Matches date strings within a configurable threshold range.

Installation

npm install @centrapay/jest-date-matchers

Usage

// Add to jest.config.js:
module.exports = {
  setupFilesAfterEnv: [ '@centrapay/jest-date-matchers' ],
};

// or add to a cucumber support file:
require('@centrapay/jest-date-matchers');

// then use assertion in test or step definition:
const payload = { createdAt: '2020-09-01T10:45:00.250Z' };
expect(payload.createdAt).toBeIsoDateStringNear('2020-09-01T10:45:00.000Z'); // default match within 1 second
expect(payload.createdAt).toBeIsoDateStringNear(moment(), { threshold: 10, units: 'seconds' });

History

See Changelog

Copyright © 2020 Centrapay.

This software is licensed under Apache-2.0 License. Please see LICENSE for details.

Keywords

FAQs

Package last updated on 29 Oct 2024

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