Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-tdd

Package Overview
Dependencies
Maintainers
1
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-tdd

Drop in replacement for mocha to abstract commonly used test setups

  • 1.9.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
686
decreased by-3.38%
Maintainers
1
Weekly downloads
 
Created
Source

node-tdd

Build Status Test Coverage Dependabot Status Dependencies NPM Downloads Semantic-Release Gardener

Drop in replacement for mocha to abstract commonly used test setups

Install

Install with npm:

$ npm install --save node-tdd

Usage

Please see tests for usage examples.

Options

useTmpDir

Type: boolean
Default: false

When set to true, a fresh temporary directory is set up for each test. The directory is cleaned up after the test run has completed.

useNock

Type: boolean
Default: false

When set to true, all requests are automatically nocked. The recording files are automatically created relative to the current test file.

envVars

Type: object
Default: -

Used to declare environment variables per describe. Environment variables are also picked up from shadow files as e.g. test.spec.js.env.yml.

To allow overwriting of environment variables prefix the name of the environment variable with ^.

timestamp

Type: number
Default: -

Set unix timestamp to freeze time to. Will modify the result of e.g. new Date().

recordConsole

Type: boolean
Default: false

When set to true, console logging calls are recorded and can be accessed by calling getConsoleOutput() from within the test.

cryptoSeed

Type: string
Default: -

When set, randomization is overwritten and consistent per test using the provided seed.

Keywords

FAQs

Package last updated on 16 Aug 2019

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