Commit graph

16 commits

Author SHA1 Message Date
Leo Horie
270b20a2b0 v0.2.2-rc.1 2015-12-20 09:14:28 -05:00
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
Leo Horie
d6911d105b clean up unused test code 2015-04-21 09:24:13 -04:00
Leo Horie
c980fd9b66 fix order issue when trusted content is mixed with other siblings,
fix js error when child is a random object
make home demo more minimalist
add explanation about modules in guide
2014-10-31 09:31:01 -04:00
Leo Horie
a4c98e63e8 Fix tests for IE 2014-10-06 21:46:18 -04:00
Leo Horie
50173f0e74 fix IE null ref exception 2014-10-03 13:31:02 -04:00
Zolmeister
6b62681da8 promise prop resolution 2014-08-13 00:50:35 -07:00
Jim Witschey
3160e696df fixes non-browser-based tests 2014-07-28 14:06:14 -04:00
Jim Witschey
6a1ab4e39f adds saucelabs integration to unit tests 2014-07-25 13:35:29 -04:00
Sebastian
3df5578e7b Removed trailing spaces 2014-05-25 23:19:52 +02:00
Leo Horie
1ff4b3ccf6 push for travis 2014-03-25 21:48:23 -04:00
Leo Horie
e94b6597af s/spaces/tab 2014-03-25 21:30:53 -04:00
Eirik S. Morland
3c34d8d6ed Fix a typo. 2014-03-23 08:44:10 +01:00
Eirik S. Morland
a8d6f529d5 Make tests throw exception, add travis-ci integration.
Relates to #23.
2014-03-23 08:42:15 +01:00
Leo Horie
c5f3bc23aa fixing archiving 2014-03-17 21:34:48 -04:00
Leo Horie
70b2489539 initial release 2014-03-16 22:07:53 -04:00