Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Doctest.js - A Humane JavaScript Test Framework

DZone's Guide to

Doctest.js - A Humane JavaScript Test Framework

· Web Dev Zone ·
Free Resource

Bugsnag monitors application stability, so you can make data-driven decisions on whether you should be building new features, or fixing bugs. Learn more.

Doctest.js is a test runner and testing framework for JavaScript.  Doctest uses a novel approach to testing: example and expected result. Each test is a chunk of code that prints out results and side effects, and then the expected result is matched against that to see if the test passed or failed.

Doctest is based on the Python doctest module originally written by Tim Peters. Spy was inspired some by Jasmine's Spy class, and carries over ideas from MiniMock.  If you've used Python's doctest and found it annoying or not widely useful for doctest: doctest.js fixes all those problems.

Requirements: None
Demo: http:/ / doctestjs. org/
License: MIT License

 

 

 

Monitor application stability with Bugsnag to decide if your engineering team should be building new features on your roadmap or fixing bugs to stabilize your application.Try it free.

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}