Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork275
Test Anything Protocol tools for node
License
tapjs/tapjs
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Workspace for node-tap development.
Do this at least once to get everything set up and ready to go:
npm run bootstrap(Note:npm installwill not work until you do this, becausethe generated TypeScript eats its own tail.)
Build the test class (required after any plugin or core changes):
npm run buildAny other builds:
npm run prepare -w src/{whatever}After adding or removing workspaces:
npm iRun all tests in all workspaces:
npm testRun all tests, saving snapshots:
npm run snapBuild and serve docs:
npm start- tap Themain entry point module, which sets up the root test runner andexposes an alias to the cli runner.
- tap-parserThe module that parsesTAP
@tapjs/coreMost of the basic moving parts of tap- tap-yamlThin wrapper aroundYAML andyaml-types forconsistent handling of JavaScript values in YAML diagnostics.
@tapjs/testThe plugin-ifiedTestclass.@tapjs/configHandling config files, command line interface parsing,environment variables, and validation@tapjs/runThe command line runner- tcompareThe library that does comparison and object formatting (useheavily by
@tapjs/assertsmethods). @tapjs/stackLibrary for capturing stack frames, the descendant ofstack-utils.@tapjs/processinfoThe library that tracks process information and code coverage(hosted outside the monorepo, because it can't be tested by aversion of tap that uses itself without bootstrap paradoxes)- default plugins:
@tapjs/typescriptAdds typescript support, and the--typecheckconfig option@tapjs/beforeAddst.before()@tapjs/before-eachAddst.beforeEach()@tapjs/afterAddst.after()andt.teardown()(which are the same thingnow)@tapjs/after-eachAddst.afterEach()@tapjs/spawnAddst.spawn()@tapjs/stdinAddst.stdin()@tapjs/assertsAdds all the various assertion methods, liket.equal(),t.match(), etc.@tapjs/snapshotAddst.matchSnapshot()@tapjs/fixtureAddst.testdir()features@tapjs/mockAddst.mockRequire()andt.mockImport()@tapjs/interceptAddst.intercept()andt.capture()functionality (sort oflike a very scaled-down minimal form of Sinon. If you wantmore, consider using the@tapjs/sinonplugin.)@tapjs/filterAddst.only()and support for the--grepand--onlyclioptions.
- optional plugins:
@tapjs/nockOptional plugin providingt.nock()method (descendent of@npmjs/tap-nock, and a significant inspiration for tap'splugin architecture)@tapjs/clockOptional plugin providing aclock-mock object ont.clock@tapjs/sinonOptional plugin providing aSinonsandbox att.sinonthat automatically restores at the endof the test.@tapjs/esbuild-kitOptional plugin that loads TypeScript using@esbuild-kit/cjs-loaderand@esbuild-kit/esm-loaderinstead ofts-node.
- other stuff:
- npm-init-templateA library for more easily creating
npm initpackages. Thiswill move out as soon as this version of tap is published. @tapjs/create-pluginAnnpm initlibrary facilitatingnpm init @tapjs/pluginto create new plugins.
- npm-init-templateA library for more easily creating
Runnpm run bootstrap to build the@tapjs/test module withthe default set of plugins, so that the other libraries can buildproperly. (This only has to be done once, unless the build scriptor 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 useskipLibCheck: true in their tsconfigs. It should not be used inother packages.
About
Test Anything Protocol tools for node
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.