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

Learn how error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.

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

 

 

 

What’s the best way to boost the efficiency of your product team and ship with confidence? Check out this ebook to learn how Sentry's real-time error monitoring helps developers stay in their workflow to fix bugs before the user even knows there’s a problem.

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 }}