TAPE(1)

πŸ“¦
version 5.6.1+~cs8.20.19 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– TAPE(1) πŸ’–

okay bestie, welcome to tape(1) β€” the manual page. yes it's a man page. yes it's also a whole vibe. let's get into it 🫢


✨ NAME ✨

tape β€” a tap-producing test harness for node and browsers. it's giving "tiny library, enormous main character energy" πŸ’…


🌸 SYNOPSIS 🌸

tape [-r module] [file] [file ...]

πŸ¦‹ DESCRIPTION πŸ¦‹

tape is a tap-producing test harness for node and browsers that needs literally only a few lines of code. no cap. you can use it for unit testing and integration testing, it's versatile like that ✨

tape will execute the test described by the file option. by default, file gets interpreted using the glob module. so yeah, you might need to quote file to keep your shell from doing its own globbing first β€” your shell is nosy, we love her, but still πŸ™ˆ

tests are written in pure javascript, so tests could be run using Node.js. periodt.


πŸ’… OPTIONS πŸ’…

  • -r, --require β€” load one or more modules before running any tests. ⚠️ heads up bestie: all modules loaded with the -r flag will run before any tests, no matter when you specify them. like, tape -r a b -r c will actually load a and c before loading b, because a and c are flagged as required modules. the ordering is not what your eyes think it is, iykyk 😭
  • -i, --ignore β€” ignore tests from certain folders and/or files that are not intended to be run. it defaults to the .gitignore file when passed with no argument. for example:
tape -i .ignore **/*.js`
  • --no-only β€” this is particularly useful in a CI environment where an "only test" is not supposed to go unnoticed. πŸ‘€ by passing the --no-only flag, any existing "only test" causes tests to fail:
tape --no-only **/*.js`

alternatively, the environment variable NODE_TAPE_NO_ONLY_TEST can be set to true to achieve the same behavior; the command-line flag takes precedence. πŸ†


πŸŽ€ METHODS πŸŽ€

the assertion methods in tape are heavily influenced or copied from the methods in node-tap. iconic lineage honestly πŸ‘‘

var test = require('tape')

🌈 EXAMPLES 🌈

tape 'tests/**/*.js'
tape -r './my/local/module' 'tests/**/*.js'
tape -r 'babel-register' 'tests/**/*.js'

⭐ SEE ALSO ⭐


and that's the whole page bestie!! πŸ’– this one's from tape(1), dated 8/4/17 β€” so when you're out here running your tests, remember: slay, tap, and don't forget to quote your globs πŸ¦‹βœ¨πŸ’