mithril-vndb/docs/layout
impinball 12b8f044f1 Convert tests to Mocha/Chai/Sinon and lint them.
Details:

1. All tests now live in `test`. All test dependencies that aren't from npm live
   in `test-deps`.

2. The QUnit tests are gone, as well as their dependencies. Half of them
   duplicated existing tests, and some of them depended on the real DOM to
   properly test.

3. All tests are now using Mocha to run the tests, Chai for assertions, and
   Sinon and Sinon Chai for testing some callbacks.

4. Tests are run through mocha-phantomjs. If you want to run just the tests,
   run `grunt mocha_phantomjs` or fire up a server in the root and open
   `http://localhost:<port>/test/index.html`, e.g. `python3 -m http.server`.

5. The linter I chose is ESLint. It is relatively easy to configure, but with a
   lot of flexibility. The rules I chose mostly were in tune to the style the
   project was already using. I'm not including a style guide in this commit,
   but one will likely come. You can check out the `.eslintrc` in the root and
   in `test/` for the two configs. The `.eslintignore` includes a TODO for
   `mithril.js` itself targeted at me, in the root.

Other info:

- As a drive-by fix, I fixed line endings on a few of the files.

- I also took care of a few other files and linted them as I went:

  - `Gruntfile.js`
  - `test/input-cursor.html` (was in `tests/`)
  - `test/svg.html` (was in `tests/`)
  - `docs/layout/tools/template-converter.html`
  - `docs/layout/tools/template-converter.js`

  I didn't test the template converter after linting it, because it needs
  further scrutiny to ensure it works with the latest version of Mithril. I
  know the API has changed a little, which is why I want to be sure.

- I simplified the `.travis.yml` file because none of the tests are run directly
  through Node anymore. They are always run in a browser of some kind.

Hopefully, this turned out all right...
2015-10-31 11:07:22 -04:00
..
comparisons changes in the docs: rename modules to components, change idiomatic controller and view usage 2015-04-06 22:41:38 -04:00
lib/prism initial release 2014-03-16 22:07:53 -04:00
tools Convert tests to Mocha/Chai/Sinon and lint them. 2015-10-31 11:07:22 -04:00
api.html add meta description and equalize protocol for twitter widgets 2015-04-14 20:39:49 -04:00
bower.json update bower 2014-04-07 10:22:08 -04:00
component.json remove minified stuff from component 2014-07-02 09:24:40 -04:00
ghbtns.html self-host ghbtn for https support 2014-11-17 21:40:39 -05:00
guide.html add meta description and equalize protocol for twitter widgets 2015-04-14 20:39:49 -04:00
index.html fix file size in docs 2015-09-28 22:26:41 -04:00
package.json fix package.json 2015-03-30 16:00:24 -04:00
pages.json Convert tests to Mocha/Chai/Sinon and lint them. 2015-10-31 11:07:22 -04:00
style.css link to change log from home 2015-04-10 20:55:09 -04:00