Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.12 KB

getting_started_browser.md

File metadata and controls

34 lines (22 loc) · 1.12 KB

Getting Started Guide (browser version)

This guide details using Blanket.js with a simple QUnit test runner in the browser.

To begin you will need:

  • an existing QUnit test runner (including the QUnit script)
  • source files
  • QUnit tests for those source files
  1. Download Blanket.js or bower install blanket

  2. Reference the script in the testrunner HTML file (after, not before, qunit.js) as follows:

<script src="blanket.min.js"></script>
  1. Add a data-cover attribute to any source script tags you want covered:
<script src="sourceScript.js" data-cover></script>
  1. Open the test runner in the browser. The coverage details will be appended below the test results.

What if I encounter difficulties? Add the data-cover-flags attribute to your Blanket script tag with the value "debug" to enable debugging mode.

<script src="blanket.min.js" data-cover-flags="debug"></script>

This will provide logging for everything that Blanket is doing and should help identify any misconfigurations or incompatibilities.