Support for Tape/Tap based test cases
How would I run test cases that I created using the Tape testing framework?
For Mocha, I would open Run/Debug Configurations dialog --> Press + sign and add "Mocha" to run them... wondering what is the alternative for Tape?
Please sign in to leave a comment.
Currently WebStorm provides no support for this framework. If you miss it, please vote for https://youtrack.jetbrains.com/issue/WEB-20916. For now, you can use Node.js Run configuration to execute Tape tests. Or, you can try developing a plugin for Tape support: see http://www.jetbrains.org/intellij/sdk/docs/ for basic documentation on plugin development. Mocha runner is not fully open source, but its JavaScript part is open source (https://github.com/JetBrains/mocha-intellij). Also, there is an open source plugin for Karma https://github.com/JetBrains/intellij-plugins/tree/master/js-karma.
Hi!
TAP is a well-specified protocol with lots of open-source implementations, e.g. http://tap4j.org
Regarding plugin development, the only hard part here is to know IntelliJ internals. I believe that some people see that hard part as an easy part. I would definitely prefer them to do the job.
(I wrote tape-dom)
It'd be great if intellij supported it, as many tests can output tap format.
we have a feature request for Tape support, please vote for it: https://youtrack.jetbrains.com/issue/WEB-20916
To debug your tape tests in any JetBrains IDE (WebStorm, IDEA, etc.) you can use this instruction:
https://medium.com/@vladmystetskyi/how-to-debug-tape-tests-in-jetbrains-ide-webstorm-idea-etc-1979aa99c490
As this is one of the first results in Google, here my 2021 comment for running tape over TypeScript-Testcases:
Add ts-node to your devDependencies (in package.json) and npm install.
Then, you can use -r ts-node/register to use it in the node.js runner.
Depending on your project setup you might want to add some environment variables to configure ts-node:
Third, you can insert your TypeScript as "JavaScript file": tests/xyz.ts
WEB-20916 would be nice, though, for having an auto-discover (including several test case files) and nicer output. It seems, one cannot pipe the above stdout through a prettifier.