This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
browser-tap with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
A wrapper around
tape that lets you run tests in the browser and see the results in a Chrome Devtools Tab if available.
Best used with
browser-tap will output the results in the console, exactly like
tape would do.
If you have the Chrome extension installed, you will be able to control and see a nice output of the test results.
Note: For the moment,
tape relies on nodejs API and is only browser-compliant because it's compiled using
browserify which provides the necessary polyfills.
browser-tap will probably become a standalone natively browser compliant library exposing the exact same API instead of being a wrapper around
npm i -S browser-tap
To use it, simply import
browser-tap instead of
tape (or use something like
webpack resolve.alias to have that done automatically).
In the example folder, you'll find a project covering all the major aspects of unit testing a React application. You'll see how simple the configuration is.
browser-tap value relies greatly in the provided extension. It's not published yet but it's easy to build and install manually. See its README for guidance.