@tapjs
Workspace for node-tap development.
Do this at least once to get everything set up and ready to go:
npm run bootstrap
(Note: npm install
will not work until you do this, because
the generated TypeScript eats its own tail.)
Build the test class (required after any plugin or core changes):
npm run build
Any other builds:
npm run prepare -w src/{whatever}
After adding or removing workspaces:
npm i
Run all tests in all workspaces:
npm test
Run all tests, saving snapshots:
npm run snap
Build and serve docs:
npm start
@tapjs/core
Most of the basic moving parts of tap@tapjs/test
The plugin-ified Test
class.@tapjs/config
Handling config files, command line interface parsing,
environment variables, and validation@tapjs/run
The command line runner@tapjs/asserts
methods).@tapjs/stack
Library for capturing stack frames, the descendant of
stack-utils
.@tapjs/processinfo
The library that tracks process information and code coverage
(hosted outside the monorepo, because it can't be tested by a
version of tap that uses itself without bootstrap paradoxes)@tapjs/typescript
Adds typescript support, and the --typecheck
config option@tapjs/before
Adds t.before()
@tapjs/before-each
Adds t.beforeEach()
@tapjs/after
Adds t.after()
and t.teardown()
(which are the same thing
now)@tapjs/after-each
Adds t.afterEach()
@tapjs/spawn
Adds t.spawn()
@tapjs/stdin
Adds t.stdin()
@tapjs/asserts
Adds all the various assertion methods, like t.equal()
,
t.match()
, etc.@tapjs/snapshot
Adds t.matchSnapshot()
@tapjs/fixture
Adds t.testdir()
features@tapjs/mock
Adds t.mockRequire()
and t.mockImport()
@tapjs/intercept
Adds t.intercept()
and t.capture()
functionality (sort of
like a very scaled-down minimal form of Sinon. If you want
more, consider using the @tapjs/sinon
plugin.)@tapjs/filter
Adds t.only()
and support for the --grep
and --only
cli
options.@tapjs/nock
Optional plugin providing t.nock()
method (descendent of
@npmjs/tap-nock
, and a significant inspiration for tap's
plugin architecture)@tapjs/clock
Optional plugin providing a
clock-mock object on t.clock
@tapjs/sinon
Optional plugin providing a Sinon
sandbox at t.sinon
that automatically restores at the end
of the test.@tapjs/esbuild-kit
Optional plugin that loads TypeScript using
@esbuild-kit/cjs-loader
and
@esbuild-kit/esm-loader
instead of
ts-node
.npm init
packages. This
will move out as soon as this version of tap is published.@tapjs/create-plugin
An npm init
library facilitating npm init @tapjs/plugin
to create new plugins.skipLibCheck
Run npm run bootstrap
to build the @tapjs/test
module with
the default set of plugins, so that the other libraries can build
properly. (This only has to be done once, unless the build script
or set of default plugins are changed, of course.)
Because there's a bootstrapping cycle between @tapjs/core
,
@tapjs/test
, and all of the plugins, they MUST use
skipLibCheck: true
in their tsconfigs. It should not be used in
other packages.