Catalog npm
Back to packageRELEASE DETAILS

0.1.15

npm

@0ti.me/test-deps

A library for adding test tooling

Published10 Aug 2020
Direct dependencies18
Transitive dependenciesNot calculated

README

Current package documentation

Objective

Simplify maintenance of test dependencies by just shoving them all into one npm package.

Usage

In your [https://mochajs.org/#-require-module-r-module](mocha require configuration), require a file which contains this line:

// Example file will be referred to as `test/add-deps-global.js`
global.deps = require('@0time/test-deps');

Then in your tests, you can use the exports of src/index.js like this:

const {bluebird, chai, expect, tquire, uuid} = deps;

This works because in the test/add-deps-global.js file, we added the deps global variable containing these features.

tquire

Currently unconfigurable, the tquire feature will find the source file which maps to the file you're trying to test if you lay out your test files consistently.

For unit tests:

// Given files:
// * src/some/source/file.js
// * test/unit/some/source/file.js
// and given an environment variable NODE_ENV set to `unit`
// If this file is test/unit/some/source/file.js, this line will 'require' the src/some/source/file.js module
const moduleFromSrcSomeSourceFile = tquire(__filename);

For integration tests:

// Given files:
// * src/some/source/file.js
// * test/integration/some/source/file.js
// and given an environment variable NODE_ENV set to `integration`
// If this file is test/integration/some/source/file.js, this line will 'require' the src/some/source/file.js module
const moduleFromSrcSomeSourceFile = tquire(__filename);

d (short for a modified mocha describe function call)

The d feature will use the same logic as tquire to call describe with the source filename.

// This
d(__filename, () => {
});
// is roughly equivalent (for unit testing) to:
describe(
  __filename
    .replace(process.cwd(), '')
    .replace(/\/?test\/unit/, ''), () => {
});

Configuration Templates

In the ./configuration-templates directory, you can find configuration files which can be used in various ways.

Quickstart:

yarn

yarn add --dev @0ti.me/test-deps
yarn run link-test-deps

npm

npm install --save-dev @0ti.me/test-deps
$(npm bin)/link-test-deps

nyc.config.js

You can use it as is with a symlink

#!/usr/bin/env bash

ln -s node_modules/@0ti.me/test-deps/configuration-templates/nyc.config.js

Or you can require it (in your own nyc.config.js)

const testDepsNycConfig = require('@0ti.me/test-deps/configuration-templates/nyc.config.js');

module.exports = testDepsNycConfig;

Or you can require it and override things you want to change. (in your own nyc.config.js)

const testDepsNycConfig = require('@0ti.me/test-deps/configuration-templates/nyc.config.js');

module.exports = Object.assign(
  {},
  testDepsNycConfig,
  {branches: 10},
);

Files similar to nyc.config.js:

  • eslintrc.js☭
  • huskyrc.js☭
  • lint-staged.config.js
  • mocharc.js☭
  • prettierrc.js☭

☭ The files with this mark must be symlinked to project-dir/.filename like so:

ln -s node_modules/@0ti.me/test-deps/configuration-templates/eslintrc.js .eslintrc.js

Downloads & popularity

1downloads
7-day window · source-reported counts24 Oct 2026
10.50
2026-10-24: 1 · observed 2026-10-24T10:45:44.5181988Z
24 Oct24 Oct

npm · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2412026-10-24T10:45:44.5181988Z

Declared dependencies 18

Native requirements
18 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
bluebird
Environment
{
  "local_name": "bluebird",
  "alias": false,
  "peer_metadata": null
}
^3.7.1runtime
chai
Environment
{
  "local_name": "chai",
  "alias": false,
  "peer_metadata": null
}
^4.2.0runtime
chai-as-promised
Environment
{
  "local_name": "chai-as-promised",
  "alias": false,
  "peer_metadata": null
}
^7.1.1runtime
coveralls
Environment
{
  "local_name": "coveralls",
  "alias": false,
  "peer_metadata": null
}
^3.0.7runtime
eslint
Environment
{
  "local_name": "eslint",
  "alias": false,
  "peer_metadata": null
}
^6.5.1runtime
eslint-config-prettier
Environment
{
  "local_name": "eslint-config-prettier",
  "alias": false,
  "peer_metadata": null
}
^6.4.0runtime
eslint-plugin-prettier
Environment
{
  "local_name": "eslint-plugin-prettier",
  "alias": false,
  "peer_metadata": null
}
^3.1.1runtime
lint-staged
Environment
{
  "local_name": "lint-staged",
  "alias": false,
  "peer_metadata": null
}
^9.4.2runtime
lodash
Environment
{
  "local_name": "lodash",
  "alias": false,
  "peer_metadata": null
}
^4.17.19runtime
minimist
Environment
{
  "local_name": "minimist",
  "alias": false,
  "peer_metadata": null
}
^1.2.5runtime
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
^6.2.1runtime
nyc
Environment
{
  "local_name": "nyc",
  "alias": false,
  "peer_metadata": null
}
^14.1.1runtime
prettier
Environment
{
  "local_name": "prettier",
  "alias": false,
  "peer_metadata": null
}
^1.18.2runtime
proxyquire
Environment
{
  "local_name": "proxyquire",
  "alias": false,
  "peer_metadata": null
}
^2.1.3runtime
sinon
Environment
{
  "local_name": "sinon",
  "alias": false,
  "peer_metadata": null
}
^9.0.2runtime
sinon-as-promised
Environment
{
  "local_name": "sinon-as-promised",
  "alias": false,
  "peer_metadata": null
}
^4.0.3runtime
sinon-chai
Environment
{
  "local_name": "sinon-chai",
  "alias": false,
  "peer_metadata": null
}
^3.5.0runtime
uuid
Environment
{
  "local_name": "uuid",
  "alias": false,
  "peer_metadata": null
}
^3.3.3runtime

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-Ie8O/QaImL+WyJMoruFRHM7c9WMV7W5t4rbY92MDw3uPO7ZaPwtvEwC3o3Gb9wnksHtD8Z4kD2/9f+jaheXOLg==",
  "shasum": "8e78151713facb3dbc7a56c1204518866611bd38",
  "tarball": "https://registry.npmjs.org/@0ti.me/test-deps/-/test-deps-0.1.15.tgz",
  "fileCount": 15,
  "unpackedSize": 7199,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMa61CRA9TVsSAnZWagAAsoQP/2PpWx7vdCZuyPuBjlg/\nY4kfh4fLKuHIHcXX/FjZiHaCaN6MZjCjnfG63ciCHf7P1CcrBHYyFFEHEjov\ncziG9GPSEbjj5njB6A5+UieLxM+SO5fq8UWj6rcLRzHmNwiJAyp0cWQoQzeQ\nFhW0VfAd5kdtaFWKhFlxd26MesFRZOd0ekJzpL7Jo+J2mZADIjN/bpE7PC0P\nQsySn90q5hc9GNM8NKlHyhZRIepKs0SaYY7m/+ZT3XJ7sStKoJwm6r2Q2h7H\n5dI43YOUfCxZUUWOkOHGoiEU1cT2geqwukgR8HaHMLBEkDRghN16AgAQWwC/\n1FIUExt3mHQyikJYh34nj0u5l55iE/tG0VO1S+rUIFFMMW4+x0kjXz/dT1dT\nMtSNyxGNHijKbyloI1quh4doDgOM5wLHZN+t7XvAg2GhehlOwpYuMZelMn/M\n+hUGUgmTlNWe0C86DAtOjRsFgAwDeJIzXWUGao9G9lWJIUYKypUXmza+xfT0\nDrDdzg1GZpI/8WmL3PsH50AKKUrqscOj9yc8xlav10hqEXVwIIxbfdX4NK0D\nLwnaFSpcRLxETDWXqNPEW+D0g3YyZ64RP2TtWra5+v2GX7gfxOJfk4sI6eqk\ntAbk+05Qa2sxZ1Pm7mujYGOT2zpohRLjbbUD4C+OD8ECnhjAF3t9QgGoNypl\n0LpA\r\n=NUXe\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQDbVFnsKq0uTKrHwuFutaAej0KW/y5v7XQeKVrZkA9SPwIgb173KhhrzHK6tAgGAoevJf1/eBLWVUdZvsDVoOd+Ck4="
    }
  ]
}

Repository

ACCESSIBLE
0ti.me/test-deps

Shared repository data · GitLab

License detected in repository
Not collected
Contributor identities
2 · complete API traversal
Contributors · showing 2 of 2 collected
ContributorContributions
h109
dependabot[bot]1

Default-branch author identities; GitLab commit counts exclude merge commits.

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

2identities
Gauge · observed snapshots24 Oct 2026
210
2026-10-20: 2 · observed 2026-10-20T23:06:10.9477531Z2026-10-21: 2 · observed 2026-10-21T23:07:14.5213310Z2026-10-23: 2 · observed 2026-10-23T07:39:12.4807481Z2026-10-24: 2 · observed 2026-10-24T08:55:30.1013897Z
20 Oct24 Oct

gitlab · 4 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2422026-10-24T08:55:30.1013897Z
2026-10-2322026-10-23T07:39:12.4807481Z
2026-10-2122026-10-21T23:07:14.5213310Z
2026-10-2022026-10-20T23:06:10.9477531Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:16 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:11e8c06a4c25e29a1f892a2a3fe7e970da4343ecd8d14f7daa00f78bf9228aff

Other collected versions

0.2.123 Dec0.1.347 Sept0.1.331 Sept0.1.3228 Aug0.1.3127 Aug0.1.3030 MayView all collected versions →