andreasgal/vtt.js — pull request #31 by humphd (2013-07-16 18:57:37+00:00)
Title: [WIP] Rework tests to use Mocha instead of Tape (#17).

I've experimented with a switch to Mocha from Tape. I haven't updated the README (lots of changes) or moved all the tests over from the `run-tests.js` style runner yet--I wanted to see if you were OK with this.

The basic idea is that you have tests/*.js files, and Mocha will automatically walk the test dir/subdirs and find/run all the tests. I've done a few tests (see simple.js and tests/cuetext/bold/not-closed.js below). I've extended node's `assert` module to allow you to do `assert.jsonEqual(vttFilename, jsonFilename, message)`, so it's trivial to test against last-known-good output from `cue2json.js`.

I've also added `difflet` to give us useful, pretty-printed object diffs when json comparisons fail.

If you are OK with this, I'll continue and switch everything over.

To test, pull this branch and do:

```
$ npm prune
$ npm install
$ npm test
```