xsokev/Dojo-Bootstrap — pull request #122 by tomwayson (2014-06-28 03:06:41+00:00)
Title: Intern tests

I've added the Intern as a dev dependency and the tabs test suite as well as all the failing DOH test suites (collapse and popover). As per #97, I've tried to update the tests to use the exact same data and logic from the Bootstrap tests. However, I was not able to follow the logic of all of their tests due to all the jQuery chaining (esp for collapse), so I did not convert all of them. Popover's tests are fairly complete. At the very least, I did manage to fix whatever tests were failing in DOH in each suite. Basically this is a step in the right direction, but there's a lot more work to do to convert the other suites.

I've added a few moving parts w/ this PR, so you'll want to download and inspect it for yourself before merging. (See **NOTES** below).

To run the tests, checkout this pull and then:

1) `npm install`
2) open your browser and the browser's console window
3) load `http://host/path/to/Dojo-bootstrap/node_modules/intern/client.html?config=tests/intern`

You should see something like:

![screen shot 2014-06-27 at 7 47 55 pm](https://cloud.githubusercontent.com/assets/662944/3419594/b8ed8aa4-fe6e-11e3-9f53-d2e94b378aad.png)

I've commented out the 3 suites that I've converted from `tests/complete.js` so that DOH won't try to run them.

Like I said, there's a lot more work to do if we want to convert the remaining tests. I think this is a step in the right direction, and a good point to merge the work that I've done so others can follow the patterns to convert the other tests to the intern if there is interest.

The Intern should offer a lot of potential improvements over DOH including automating running of the functional tests (w/ Selenium) and running the tests in Travis CI when people make PRs.

**NOTES**
I've listed dojo 1.9.3 as a dependency to be installed w/ npm. This means dojo gets put under `node_modules`. If you expect dojo to live somewhere else (under `vendor`?) let me know, and I can point the Intern's loader there.

I added `.jshintrc` to the `tests` directory from [Bryan Forbes' Dojo Yeoman generator](https://github.com/bryanforbes/generator-dojo/blob/master/.jshintrc) so that I could lint to a Dojo standards as I worked.