You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
however, I still face this problem today. I followed the directions exactly as published on the website:
Installed TAP
npm install tap --save-dev
wrote a test file
ran tap from the commandline
→ tap lib/zql/queryMaker/where/index.test.js
tap
zsh: command not found: tap
The solution, as suggested in the linked issue #774 is to install TAP globally with npm install -g tap. If that is true, why is that not on the website? In any case, I'd prefer not to install TAP globally.
Much appreciation in advance for any guidance.
Reproduction
see above
Environment
which tap -→ cannot run this
npm ls tap -→ see below
tap versions -→ cannot run this
tap config list -→ cannot run this
tap plugin list -→ cannot run this
# if using typescript:
npm ls @isaacs/ts-node-temp-fork-for-pr-2009
npm ls typescript
# posix:
uname -a
# windows (in powershell)
"$([Environment]::OSVersion.VersionString) $(('x86', 'x64')[[Environment]::Is64BitOperatingSystem])"
→ npm ls tap
zenodeo3@3.4.1 /Users/punkish/Projects/zenodeo3
└── tap@18.7.2
→ node --version
v20.12.2
I want to add that I am using node with nvm. I don't know if that matters. Since I installed tap as a local dev-dependency, it is in my project's node_modules directory.
→ which node
/Users/punkish/.nvm/versions/node/v20.12.2/bin/node
I am able to run the test using node directly as well as via npx tap successfully, but when I do the following
# the following works
→ node lib/zql/queryMaker/where/index.test.js
# the following works
→ npx tap lib/zql/queryMaker/where/index.test.js
# the following does not work
→ tap lib/zql/queryMaker/where/index.test.js
Also, running the test with npx tap causes all the tests in the entire project directory structure to be run. I want to run only the test specified on the command line (just to reduce the noise in the terminal)
The text was updated successfully, but these errors were encountered:
I got tired of typing npx so I gave up and installed tap globally. But, faced a similar problem as above -- when running tap path/to/index.test.js, it works fine. But nothing happens when running tap "**/*.test.js". Actually, something does happen but it just takes a long time. And, again contrary to what the documentation says, tapwants to run the tests in all thenode_modules`
When I try to edit the config file using tap config edit, I get a YAML error even though strangely I didn't even touch that line 14. I only wanted to change the exclude pattern.
YAMLParseError: A block sequence may not be used as an implicit map key at line 14, column 1:
coverage-map: map.mjs
In any case, tap should not be running tests in the node_modules directory as stated
A glob pattern indicating which filenames should NEVER be run as tests. This overrides the include option.
Defaults to excluding any folders named dist, fixture, or fixtures.
Note: folders named tap-snapshots, node_modules, or .git are ALWAYS excluded from the default test file set. If you wish to run tests in these folders, then name the test files on the command line as positional arguments.
What am I doing wrong that my experience doesn't match what the docs say?
Is there an existing issue for this?
Have you read the
CONTRIBUTING
guide on posting bugs, andCODE_OF_CONDUCT
?This issue exists in the latest tap version
Description
this issue was reported in 2021 #774
however, I still face this problem today. I followed the directions exactly as published on the website:
npm install tap --save-dev
The solution, as suggested in the linked issue #774 is to install TAP globally with
npm install -g tap
. If that is true, why is that not on the website? In any case, I'd prefer not to install TAP globally.Much appreciation in advance for any guidance.
Reproduction
see above
Environment
I want to add that I am using
node
withnvm
. I don't know if that matters. Since I installedtap
as a local dev-dependency, it is in my project'snode_modules
directory.I am able to run the test using node directly as well as via
npx tap
successfully, but when I do the followingAlso, running the test with
npx tap
causes all the tests in the entire project directory structure to be run. I want to run only the test specified on the command line (just to reduce the noise in the terminal)The text was updated successfully, but these errors were encountered: