Socket
Socket
Sign inDemoInstall

@spartez-software/test-utils

Package Overview
Dependencies
Maintainers
0
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spartez-software/test-utils

Spartez tests helper lib


Version published
Weekly downloads
7K
increased by96.11%
Maintainers
0
Weekly downloads
 
Created
Source

spartez test utils (Beta)

Various test helpers - jest based

prerequisites

  • ability to run tests using jest

installation

npm install @spartez-software/jira-test --save-dev

Usage

Logging

For logging inside tests it is better to use TestLogger from @spartez-software/test-utils. It's a wrapper around console.log(...), but with added test context and colors. Especially useful when running tests in parallel.

Steps

Use steps from @spartez-software/test-utils to divide your integration and e2e tests into sections that can/should be retried(in case of network.* issues, external services hiccups etc) to make the test stable. It uses https://www.npmjs.com/package/p-retry underneth, you can pass retry options by providing optional StepOpts param.

interface StepOpts {
    retries?: number,
    minTimeout?: number,
    maxTimeout?: number
}

look https://github.com/tim-kos/node-retry#retryoperationoptions for default values.

If no StepOpts are given - it defaults to

{ retries: 3 }

FAQs

Package last updated on 05 Aug 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