NODEUNIT(1)

πŸ’– NODEUNIT(1) πŸ’–

okay bestie, so like β€” nodeunit, section 1 of the manual. that's the vibe. let's go ✨


🌸 NAME 🌸

nodeunit β€” a simple node.js unit testing tool 🧚 no cap, that's literally it.


πŸŽ€ SYNOPSIS πŸŽ€

nodeunit [options] <file-or-directory> [<file-or-directory> ...]

πŸ¦‹ DESCRIPTION πŸ¦‹

so nodeunit is a simple unit testing tool built on top of the node.js assert module. that's the whole personality. πŸ’…

here's the tea on why she's iconic:

  • Simple to use β€” like, you just run her. no 400-line config arc. πŸ™ˆ
  • Just export the tests from a module β€” that's the whole setup. export and go. periodt.
  • Helps you avoid common pitfalls when testing asynchronous code β€” async testing chaos? not on her watch. 😭
  • Easy to add test cases with setUp and tearDown functions if you wish β€” want them? cool. don't want them? also cool. no pressure, bestie. 🫢
  • Allows the use of mocks and stubs β€” mocks and stubs are welcome here, always. πŸ‘‘

✨ OPTIONS ✨

  • --config FILE β€” loads config options from a JSON file πŸ“. this is how you customize stuff like the color schemes for the default test reporter etc. for the currently available options, go peek at bin/nodeunit.json. iykyk.
  • --reporter FILE β€” set the test reporter to a custom module, or to one of the modules in nodeunit/lib/reporters 🌈. when you leave this out entirely, the default test runner is used.
  • --list-reporters β€” lists all the available built-in reporters πŸ“‹. window shopping, but for reporters.
  • -h, --help β€” displays the help and then exits πŸ‘‹.
  • -v, --version β€” outputs version information and exits πŸ’œ.
  • <file-or-directory> β€” you can run nodeunit on specific files, or on all *.js files inside a directory πŸ“. your call, bestie.

πŸ‘‘ AUTHORS πŸ‘‘

Written by Caolan McMahon and other nodeunit contributors πŸ’–.

Contributors list: http://github.com/caolan/nodeunit/contributors.


πŸ’€ REPORTING BUGS πŸ’€

Report nodeunit bugs to http://github.com/caolan/nodeunit/issues.

not me begging you to actually file the issue instead of just complaining in the group chat 😭

Copyright Β© 2010 Caolan McMahon.

Nodeunit has been released under the MIT license: http://github.com/caolan/nodeunit/raw/master/LICENSE.


🌟 SEE ALSO 🌟

node(1)


and that's the whole page, bestie πŸŽ€ October 2010 energy, straight from the NODEUNIT(1) manual β€” go write some tests, you absolute main character πŸ’…βœ¨

πŸ“¦ where this page comes from