{"action":"created","issue":{"url":"https://api.github.com/repos/django/django/issues/4573","labels_url":"https://api.github.com/repos/django/django/issues/4573/labels{/name}","comments_url":"https://api.github.com/repos/django/django/issues/4573/comments","events_url":"https://api.github.com/repos/django/django/issues/4573/events","html_url":"https://github.com/django/django/pull/4573","id":71429312,"number":4573,"title":"[WIP] Add JavaScript unit tests","user":{"login":"treyhunner","id":285352,"avatar_url":"https://avatars.githubusercontent.com/u/285352?v=3","gravatar_id":"","url":"https://api.github.com/users/treyhunner","html_url":"https://github.com/treyhunner","followers_url":"https://api.github.com/users/treyhunner/followers","following_url":"https://api.github.com/users/treyhunner/following{/other_user}","gists_url":"https://api.github.com/users/treyhunner/gists{/gist_id}","starred_url":"https://api.github.com/users/treyhunner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treyhunner/subscriptions","organizations_url":"https://api.github.com/users/treyhunner/orgs","repos_url":"https://api.github.com/users/treyhunner/repos","events_url":"https://api.github.com/users/treyhunner/events{/privacy}","received_events_url":"https://api.github.com/users/treyhunner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-27T23:25:44Z","updated_at":"2015-04-27T23:40:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/4573","html_url":"https://github.com/django/django/pull/4573","diff_url":"https://github.com/django/django/pull/4573.diff","patch_url":"https://github.com/django/django/pull/4573.patch"},"body":"As detailed in [DEP 3][].  Uses QUnit with Blanket for code coverage and requires Node *only when running from the command-line*.  All tests run in the browser wiithout any external dependencies.\r\n\r\nBrowser Usage\r\n---------------------\r\n\r\nWithout measuring code coverage:\r\n\r\n- Open `./js_tests/tests.html` in your web browser and read the results\r\n\r\nWith measured code coverage:\r\n\r\n1. Execute `python -m SimpleHTTPServer`\r\n2. Open http://localhost:8000/js_tests/tests.html?coverage in your web browser and read the results\r\n\r\nNote that Node.js **is NOT required** to run the JavaScript tests in a web browser.\r\n\r\nCommand-line Usage\r\n-----------------------------\r\n\r\n1. Install Node.js\r\n2. Run `npm install` to install all local Node dependencies\r\n3. Run `npm test` to run the tests and read the results\r\n\r\nNote that Grunt **does NOT need to be installed** globally.\r\n\r\nThe minimum code coverage threshold can be set with the `globalThreshold` variable in `Gruntfile.js`.\r\n\r\n[dep 3]: https://github.com/django/deps/blob/master/draft/0003-javascript-tests.rst"},"comment":{"url":"https://api.github.com/repos/django/django/issues/comments/96851428","html_url":"https://github.com/django/django/pull/4573#issuecomment-96851428","issue_url":"https://api.github.com/repos/django/django/issues/4573","id":96851428,"user":{"login":"carljm","id":61586,"avatar_url":"https://avatars.githubusercontent.com/u/61586?v=3","gravatar_id":"","url":"https://api.github.com/users/carljm","html_url":"https://github.com/carljm","followers_url":"https://api.github.com/users/carljm/followers","following_url":"https://api.github.com/users/carljm/following{/other_user}","gists_url":"https://api.github.com/users/carljm/gists{/gist_id}","starred_url":"https://api.github.com/users/carljm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carljm/subscriptions","organizations_url":"https://api.github.com/users/carljm/orgs","repos_url":"https://api.github.com/users/carljm/repos","events_url":"https://api.github.com/users/carljm/events{/privacy}","received_events_url":"https://api.github.com/users/carljm/received_events","type":"User","site_admin":false},"created_at":"2015-04-27T23:40:17Z","updated_at":"2015-04-27T23:40:17Z","body":"Cool. While you're updating the DEP, I just reviewed it and noted the comment about Jasmine and Mocha being BDD frameworks. I don't know about Jasmine, but I do know that Mocha is more flexible than that; it provides both BDD and TDD flavored interfaces, and you can use whichever you want. (And really the difference just boils down to changing the language between \"describe\" and \"it\" vs \"suite\" and \"test\", so it's not very significant anyway.\r\n\r\n(I'm not arguing we should use Mocha instead of QUnit, I just don't think the BDD vs TDD rationale is a strong enough argument to be included in the DEP.)"}}