mocha-test-runner-polymer

0.1.12 • Public • Published

mocha-test-runner

Published on webcomponents.org npm version

A custom element for running mocha tests

How it works:

  • attaches events to local existing mocha instance

  • does not rely on the html reporter (unless you wish to do so)

  • uses events to communicate its state as well as the attributes running, and failed

  • Demo

  • API Docs

<html>
<head>
  <title>My test suite</title>
  <link rel="import" href="path/to/mocha-test/mocha-test-runner.html">
</head>
<body>
  <mocha-test-runner></mocha-test-runner>
</body>
</html>

Install

Install with either NPM or Bower:

npm install mocha-test-runner-polymer --save-dev
bower install sebs/mocha-test-runner --save-dev

Usage

Use webcomponentsjs to polyfill the web component APIs in incompatible browsers. Then use the <mocha-test> tag.

By default mocha-test assumes it is running within node_modules or bower_components and will find mocha in sibling folders.

ui

This attribute lets you control which user-interface is used. Either bdd, tdd or exports are valid options. bdd is the default.

<mocha-test-runner ui="tdd">...</mocha-test-runner>

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i mocha-test-runner-polymer

Weekly Downloads

3

Version

0.1.12

License

MIT

Unpacked Size

692 kB

Total Files

17

Last publish

Collaborators

  • sebs