mithril-vndb/docs
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
..
layout Convert tests to Mocha/Chai/Sinon and lint them. 2015-10-31 11:07:22 -04:00
auto-redrawing.md improve docs about redrawing 2015-04-20 22:16:27 -04:00
benchmarks.md add section about todomvc benchmark 2014-12-31 16:39:17 -05:00
change-log.md document component shorthand syntax 2015-07-23 23:43:19 -04:00
community.md community.md -- link to github wiki 2015-06-03 13:11:47 -05:00
comparison.md fix file size in docs 2015-09-28 22:26:41 -04:00
components.md components.md - eliminate global variable introduced in previous commit 2015-07-07 09:04:08 -05:00
getting-started.md fix file size in docs 2015-09-28 22:26:41 -04:00
how-to-read-signatures.md improve docs 2014-09-14 00:52:11 -04:00
installation.md fixed bower description 2015-06-13 09:47:20 +02:00
integration.md fix select2 example 2015-06-29 18:59:41 -04:00
mithril.component.md document component shorthand syntax 2015-07-23 23:43:19 -04:00
mithril.computation.md improve docs about redrawing 2015-04-20 22:16:27 -04:00
mithril.deferred.md docs for catch 2015-07-23 21:52:32 -04:00
mithril.deps.md fix formatting in docs 2014-09-27 21:01:00 -04:00
mithril.md Fix SyntaxError in the render example 2015-08-20 01:47:27 +03:00
mithril.mount.md Clarification on m.mount() signature 2015-05-07 08:51:36 -05:00
mithril.prop.md Fix typo in the example of data binding 2015-08-22 19:43:05 +03:00
mithril.redraw.md Fixed typos in doc links 2015-06-16 16:15:42 -04:00
mithril.render.md Remove trailing whitespace 2015-07-09 03:38:42 -04:00
mithril.request.md m.request: fix sample code in documentation 2015-08-28 22:18:46 +09:00
mithril.route.md Update mithril.route.md 2015-05-02 22:55:10 +09:00
mithril.sync.md fixing links 2014-08-12 18:00:54 -04:00
mithril.trust.md Copy edit docs 2014-05-26 23:51:16 -05:00
mithril.withAttr.md changes in the docs: rename modules to components, change idiomatic controller and view usage 2015-04-06 22:41:38 -04:00
optimizing-performance.md #307 fix compiler bugs 2014-10-13 21:22:38 -04:00
practices.md remove references to m.module 2015-04-22 21:18:41 -04:00
roadmap.md initial release 2014-03-16 22:07:53 -04:00
routing.md Module -> mount rename: fix a documentation link 2015-08-18 21:42:08 +03:00
tools.md tools.md: explicitly say IE8 needs polyfills 2015-02-23 00:39:05 -05:00
web-services.md rephrase sentence. 2015-07-13 10:47:22 -06:00