Observed since 20 Oct, 22:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A library for adding test tooling
Simplify maintenance of test dependencies by just shoving them all into one npm package.
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.
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);
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/, ''), () => {
});
In the ./configuration-templates directory, you can find configuration files which can be used in various ways.
yarn add --dev @0ti.me/test-deps
yarn run link-test-deps
npm install --save-dev @0ti.me/test-deps
$(npm bin)/link-test-deps
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},
);
nyc.config.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
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.1Registry latest | 23 Dec 2023 | 21 | |
| 0.1.34 | 7 Sept 2021 | 21 | |
| 0.1.33 | 1 Sept 2021 | 20 | |
| 0.1.32 | 28 Aug 2021 | 20 | |
| 0.1.31 | 27 Aug 2021 | 20 | |
| 0.1.30 | 30 May 2021 | 20 | |
| 0.1.29 | 29 May 2021 | 20 | |
| 0.1.28 | 29 May 2021 | 20 | |
| 0.1.27 | 29 May 2021 | 20 | |
| 0.1.26 | 29 May 2021 | 20 | |
| 0.1.23 | 29 May 2021 | 20 | |
| 0.1.22 | 9 May 2021 | 20 | |
| 0.1.21 | 26 Aug 2020 | 20 | |
| 0.1.20 | 22 Aug 2020 | 20 | |
| 0.1.19 | 16 Aug 2020 | 20 | |
| 0.1.18 | 16 Aug 2020 | 20 | |
| 0.1.17 | 16 Aug 2020 | 19 | |
| 0.1.16 | 10 Aug 2020 | 18 | |
| 0.1.15 | 10 Aug 2020 | 18 | |
| 0.1.14 | 4 Aug 2020 | 17 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitLab
| Contributor | Contributions |
|---|---|
| h | 109 |
| 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.
gitlab · 3 observations shown. Missing days are unknown.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-23 | 2 | 2026-10-23T07:39:12.4807481Z |
| 2026-10-21 | 2 | 2026-10-21T23:07:14.5213310Z |
| 2026-10-20 | 2 | 2026-10-20T23:06:10.9477531Z |
Observed since 20 Oct, 22:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:c009b22cf3271cf367739b70b13e01705c6fed15ecb05a8d54bfd52ffe613c77