Catalog npm
Back to packageRELEASE DETAILS

0.1.33

npm

@0ti.me/test-deps

A library for adding test tooling

Published1 Sept 2021
Direct dependencies20
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 20

Native requirements
20 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@0ti.me/en-path
Environment
{
  "local_name": "@0ti.me/en-path",
  "alias": false,
  "peer_metadata": null
}
^0.1.0runtime
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
}
^7.27.0runtime
eslint-config-prettier
Environment
{
  "local_name": "eslint-config-prettier",
  "alias": false,
  "peer_metadata": null
}
^8.3.0runtime
eslint-plugin-prettier
Environment
{
  "local_name": "eslint-plugin-prettier",
  "alias": false,
  "peer_metadata": null
}
^3.1.1runtime
husky
Environment
{
  "local_name": "husky",
  "alias": false,
  "peer_metadata": null
}
^7.0.2runtime
lint-staged
Environment
{
  "local_name": "lint-staged",
  "alias": false,
  "peer_metadata": null
}
^11.0.0runtime
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
}
^8.4.0runtime
nyc
Environment
{
  "local_name": "nyc",
  "alias": false,
  "peer_metadata": null
}
^15.1.0runtime
prettier
Environment
{
  "local_name": "prettier",
  "alias": false,
  "peer_metadata": null
}
^2.3.0runtime
proxyquire
Environment
{
  "local_name": "proxyquire",
  "alias": false,
  "peer_metadata": null
}
^2.1.3runtime
sinon
Environment
{
  "local_name": "sinon",
  "alias": false,
  "peer_metadata": null
}
^11.1.1runtime
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
}
^8.3.2runtime

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-l37TPPz9rohlP9CzOqSskbFLTlJcClV2PW6jXph79PeVMlIg1lkC0dLuA2FERjOQU6farZHgh3HJhujLRrIKSg==",
  "shasum": "7074c88c7691b615c788b9eafe798a4069dac1ea",
  "tarball": "https://registry.npmjs.org/@0ti.me/test-deps/-/test-deps-0.1.33.tgz",
  "fileCount": 24,
  "unpackedSize": 21182,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhL4tlCRA9TVsSAnZWagAAdtYP/jl0EP/yizMBMoulC9gJ\nDDhjdqHbxfXibufQi3qt4J9yWFjukcxxRNyCs5LyJom6uFVzt+cxrMWeJBn5\ne8zSajLBkwNB+MnGAm1RTd+KyQr65ZhozgwKOtvy/AfgnXmlOcXUotwckbmV\nMMcEENnSU0YSSv/mA4MzTEDbvh4TLdrWBTjoXf0S/OYP+I+9x8QuCrGKyF40\n8oEnVqx3LPoWwj+5l98nfYteWzLNcwGbv9BflfxzLFvpABqiWf8JpZR1YlLr\n0QCdbcoqiJqS8WuLHEFIYREVTkH4QW8pRoKUg3XKHdL9hOoPFxDZSZcX9iaa\nwOz3N35WAtyUi63NENMfJc0RhXbhTa9G7f6RKBrj10WH6FIIAvDrhKhxTbUg\nArqsXPYlMDGusVZfY82QM5Sd4tGkqWCC0NTn4KIt5tBs32kiPjAg6JY0YIgh\nah5ez5ocGF/6ynsoUZk8SLQ3YRTatXtV1bMVtpmEFC6l7AsfpRdxFCBSPN/N\n3w7hPlsxBC5x9qbCCKrwJ0Mt6ds4WFuu0QiMZeNSSaEcFDa2L2usCzDSdQeL\nTXpZbFF64WHWVisfCriq91LzuqAW+AXiaXPYoKLaWEBJ1hGrChN5UuY8HD2k\nByROJbSfafNlAXzturzr2NYIDCGkLFJUHlK6of1TkSIT0jogIBhtFwZi5ltW\nrPq2\r\n=oFjo\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQDnkRZgHSFS4fXBp0vh6cfotWqdc1zVNt/n9fJCX9AxlQIgYQkB5JMz7a9YBEVeLNGAdxYwRjQeF7vLknbePjYYbIo="
    }
  ]
}

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:da845eb29affa65d666adddf73f791dd9a8cec42e63d06a5375bef3537214251

Other collected versions

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