@spartez-software/test-utils
TypeScript icon, indicating that this package has built-in type declarations

0.0.72 • Public • Published

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 }

Readme

Keywords

none

Package Sidebar

Install

npm i @spartez-software/test-utils

Weekly Downloads

7,717

Version

0.0.72

License

MIT

Unpacked Size

13.9 kB

Total Files

12

Last publish

Collaborators

  • matteo.castellotti
  • neenu.baby
  • diego_rillosi
  • marcin_gazdulski_appfire
  • rytistarasevicius1
  • manish-appfire
  • szymon.knopp
  • murthy_appfire
  • appfireap
  • aleksanderciesielski
  • appfire
  • oleh.zheleznyak
  • mnykiel
  • pdobrzanski
  • bzieba-spartez
  • szymonwalkowskispartez
  • sebastianmialkowski