{"_id":"chai-backbone","_rev":"21-e491985aa75919f104cf0853a52b2d66","name":"chai-backbone","description":"Backbone assertions for the Chai assertion library","dist-tags":{"latest":"0.9.4"},"versions":{"0.8.0":{"author":{"name":"Matthijs Groen","email":"matthijs.groen@gmail.com"},"name":"chai-backbone","description":"Backbone assertions for the Chai assertion library","keywords":["test","assertion","assert","testing","backbone"],"version":"0.8.0","repository":{"type":"git","url":"git://github.com/matthijsgroen/chai-backbone.git"},"bugs":{"url":"https://github.com/matthijsgroen/chai-backbone/issues"},"main":"./chai-backbone","devDependencies":{"chai":">= 1.0.0","mocha":">= 1.0.0"},"dependencies":{"chai-changes":">= 0.8.0"},"_npmUser":{"name":"thaisi","email":"matthijs.groen@gmail.com"},"_id":"chai-backbone@0.8.0","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"135b6dbb637a6bdf98e969e4e05819492e34e1d6","tarball":"https://registry.npmjs.org/chai-backbone/-/chai-backbone-0.8.0.tgz","integrity":"sha512-vcc9QkWK8GvIjtw7Tbi6gN8SX1pqztNK0+SYKWPmhmeRJLqWtvs6RYf9kErDNDo+eS6TClkWKYW3OxBLgvGHWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWQtQCZNvQBMkNieT94lz0iKxNUTJP+yXMYtKH9GGf7QIhANEJ8noFotUP5psQDv+eSZGSA8PO8W5kgJ5zzLyB3HqC"}]},"maintainers":[{"name":"thaisi","email":"matthijs.groen@gmail.com"}]},"0.8.1":{"author":{"name":"Matthijs Groen","email":"matthijs.groen@gmail.com"},"name":"chai-backbone","description":"Backbone assertions for the Chai assertion library","keywords":["test","assertion","assert","testing","backbone"],"version":"0.8.1","repository":{"type":"git","url":"git://github.com/matthijsgroen/chai-backbone.git"},"bugs":{"url":"https://github.com/matthijsgroen/chai-backbone/issues"},"main":"./chai-backbone","devDependencies":{"chai":">= 1.0.0","mocha":">= 1.0.0"},"dependencies":{"chai-changes":">= 0.8.0","backbone":">= 0.9.2"},"_npmUser":{"name":"thaisi","email":"matthijs.groen@gmail.com"},"_id":"chai-backbone@0.8.1","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"b567cad2b693a4719490076695459bb65c872b19","tarball":"https://registry.npmjs.org/chai-backbone/-/chai-backbone-0.8.1.tgz","integrity":"sha512-CYPT59SJR/zGNKAF6YfCXXW6rOmSGiAK1Sq+3dOSY4hf/7GVEmF55esxgNzsQdlP4Lq2hb31LzGOQVZIIazRLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAopH6+g6+5o9mrgki5asYO7wT7o9s7K9OXRGp7ewH8+AiEAw5BrJdS4DSWEtTeltOOSgAQCzNukXXFeWnKbloF8AN8="}]},"maintainers":[{"name":"thaisi","email":"matthijs.groen@gmail.com"}]},"0.8.2":{"author":{"name":"Matthijs Groen","email":"matthijs.groen@gmail.com"},"name":"chai-backbone","description":"Backbone assertions for the Chai assertion library","keywords":["test","assertion","assert","testing","backbone"],"version":"0.8.2","repository":{"type":"git","url":"git://github.com/matthijsgroen/chai-backbone.git"},"bugs":{"url":"https://github.com/matthijsgroen/chai-backbone/issues"},"main":"./chai-backbone","devDependencies":{"chai":">= 1.0.0","mocha":">= 1.0.0"},"dependencies":{"chai-changes":">= 0.8.0","backbone":">= 0.9.2"},"_npmUser":{"name":"thaisi","email":"matthijs.groen@gmail.com"},"_id":"chai-backbone@0.8.2","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"335c6fe14655b457ffccd2ee85198682ce1ee092","tarball":"https://registry.npmjs.org/chai-backbone/-/chai-backbone-0.8.2.tgz","integrity":"sha512-ltCxUOjneGoKh2rqgCd88tAsBAQU88DSCm4NwlpUUZoHkncAUNL2PZe+T33M33f7d69pO803BjqO21z3DV3FaA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQUSRXyNOBmlwYcRuPLckvkS051q3RXZdA3hcGy9iGWwIhAIsaCjvUVzAe1nZJFt5TzGf+UFnoKrKtpLqaOuJLfoL8"}]},"maintainers":[{"name":"thaisi","email":"matthijs.groen@gmail.com"}]},"0.8.3":{"author":{"name":"Matthijs Groen","email":"matthijs.groen@gmail.com"},"name":"chai-backbone","description":"Backbone assertions for the Chai assertion library","keywords":["test","assertion","assert","testing","backbone"],"version":"0.8.3","repository":{"type":"git","url":"git://github.com/matthijsgroen/chai-backbone.git"},"bugs":{"url":"https://github.com/matthijsgroen/chai-backbone/issues"},"main":"./chai-backbone","devDependencies":{"chai":">= 1.0.0","mocha":">= 1.0.0"},"dependencies":{"sinon":">= 1.5.2","chai-changes":">= 0.8.0","backbone":">= 0.9.2"},"scripts":{"test":"./test.sh"},"licenses":[{"type":"MIT","url":"http://github.com/matthijsgroen/chai-backbone/blob/master/LICENSE"}],"_npmUser":{"name":"thaisi","email":"matthijs.groen@gmail.com"},"_id":"chai-backbone@0.8.3","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"77299718eed2ead3fe7b5d1cbe05f5bc97747fcb","tarball":"https://registry.npmjs.org/chai-backbone/-/chai-backbone-0.8.3.tgz","integrity":"sha512-iaq7DIsAAFYmNqNOAyiVz00HVFN2L7LyM9pnMona/Ju8wl5SQyLoSl5RNaZC+AMJya2IYemPUH1golnOT+vOmw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC0toehxVLHrPFZw4H33qRTYD+IW3NccEYCiKo2ZYB8hAiEArJn/jqvGTxRcgBIf5/FvnS1myiXFz/IUVl615vyOycE="}]},"maintainers":[{"name":"thaisi","email":"matthijs.groen@gmail.com"}]},"0.8.4":{"author":{"name":"Matthijs Groen","email":"matthijs.groen@gmail.com"},"name":"chai-backbone","description":"Backbone assertions for the Chai assertion library","keywords":["test","assertion","assert","testing","backbone"],"version":"0.8.4","repository":{"type":"git","url":"git://github.com/matthijsgroen/chai-backbone.git"},"bugs":{"url":"https://github.com/matthijsgroen/chai-backbone/issues"},"main":"./chai-backbone","devDependencies":{"chai":">= 1.0.0","mocha":">= 1.0.0"},"dependencies":{"sinon":">= 1.5.2","chai-changes":">= 1.0.0","backbone":">= 0.9.2"},"scripts":{"test":"./test.sh"},"licenses":[{"type":"MIT","url":"http://github.com/matthijsgroen/chai-backbone/blob/master/LICENSE"}],"_npmUser":{"name":"thaisi","email":"matthijs.groen@gmail.com"},"_id":"chai-backbone@0.8.4","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.4","_nodeVersion":"v0.6.19","_defaultsLoaded":true,"dist":{"shasum":"973cad507ab3282385c37d7f36a63e087335fc57","tarball":"https://registry.npmjs.org/chai-backbone/-/chai-backbone-0.8.4.tgz","integrity":"sha512-tCnMO7DEDad7M6xeX9VSmN5h78ypHwewwsiTNmk2IL9qPrKukqy071Gmw/A5SzUJBwnQyWvwnI7QmqsTbvqXyQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFLnQOuZIpgrZMyxAbl/FG9sfF7BAZ+LpGFuJl6LsqU/AiAKlPk4MyizlrM67T7zx9+yOcVac4gkz9OAU5AmqFD5RA=="}]},"maintainers":[{"name":"thaisi","email":"matthijs.groen@gmail.com"}]},"0.9.0":{"author":{"name":"Matthijs Groen","email":"matthijs.groen@gmail.com"},"name":"chai-backbone","description":"Backbone assertions for the Chai assertion library","keywords":["test","assertion","assert","testing","backbone"],"version":"0.9.0","repository":{"type":"git","url":"https://github.com/matthijsgroen/chai-backbone"},"bugs":{"url":"https://github.com/matthijsgroen/chai-backbone/issues"},"main":"./chai-backbone","devDependencies":{"chai":">= 1.0.0","mocha":">= 1.0.0","coffee-script":">= 1.4.0"},"dependencies":{"sinon":">= 1.5.2","chai-changes":">= 1.0.0","backbone":">= 0.9.2"},"scripts":{"test":"mocha","test-browser":"./test.sh"},"licenses":[{"type":"MIT","url":"http://github.com/matthijsgroen/chai-backbone/blob/master/LICENSE"}],"_id":"chai-backbone@0.9.0","dist":{"shasum":"eed5c8a756b4b67dc2bc5c3e3f7628cd4a63ff68","tarball":"https://registry.npmjs.org/chai-backbone/-/chai-backbone-0.9.0.tgz","integrity":"sha512-0JLe+K/WoWQ1FjYr6bJY4qdzmoiK8403le9HdbyLJflF8KMnxx7INir6BPgnsj/r5SMGdmCT+kxJm5Wv43go0w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8P/GBz1lon23tkZ7IgEAAhL6sjAlO27JtWnLo1t80/wIhAPnviH2b/vji+gXyXNzj8OuDfCouAH4JZWa1mIH/KYbE"}]},"_npmVersion":"1.1.69","_npmUser":{"name":"thaisi","email":"matthijs.groen@gmail.com"},"maintainers":[{"name":"thaisi","email":"matthijs.groen@gmail.com"}]},"0.9.1":{"author":{"name":"Matthijs Groen","email":"matthijs.groen@gmail.com"},"name":"chai-backbone","description":"Backbone assertions for the Chai assertion library","keywords":["test","assertion","assert","testing","backbone"],"version":"0.9.1","repository":{"type":"git","url":"https://github.com/matthijsgroen/chai-backbone"},"bugs":{"url":"https://github.com/matthijsgroen/chai-backbone/issues"},"main":"./chai-backbone","devDependencies":{"chai":">= 1.0.0","mocha":">= 1.0.0","coffee-script":">= 1.4.0"},"dependencies":{"sinon":">= 1.5.2","chai-changes":">= 1.0.0","backbone":">= 0.9.2"},"scripts":{"test":"mocha test/chai-backbone_spec.coffee","test-browser":"./test.sh"},"licenses":[{"type":"MIT","url":"http://github.com/matthijsgroen/chai-backbone/blob/master/LICENSE"}],"_id":"chai-backbone@0.9.1","dist":{"shasum":"4f660c08a896d13401caa206fe66d2895e21b5d8","tarball":"https://registry.npmjs.org/chai-backbone/-/chai-backbone-0.9.1.tgz","integrity":"sha512-2TvD3wLTOA+xA3GUzZNVrnCjQVVaBuQIPdK7yLw5wvu5Ed0Dq1UXHH3ZKjKjSH3w43P5PS+HyTpUOiozxfnCDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID/sEw1kwgUIjIiY9sZyenRrbYx9YQFAkgnS25ViDZOaAiEA+uBj6di5M6w8vRPHbbZ/T2tXi0ykQRgjsSyTsZixEhk="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"thaisi","email":"matthijs.groen@gmail.com"},"maintainers":[{"name":"thaisi","email":"matthijs.groen@gmail.com"}]},"0.9.2":{"author":{"name":"Matthijs Groen","email":"matthijs.groen@gmail.com"},"name":"chai-backbone","description":"Backbone assertions for the Chai assertion library","keywords":["test","assertion","assert","testing","backbone"],"version":"0.9.2","repository":{"type":"git","url":"https://github.com/matthijsgroen/chai-backbone"},"bugs":{"url":"https://github.com/matthijsgroen/chai-backbone/issues"},"main":"./chai-backbone","devDependencies":{"chai":">= 1.0.0","mocha":">= 1.0.0","coffee-script":">= 1.4.0"},"dependencies":{"sinon":">= 1.5.2","chai-changes":">= 1.0.0","backbone":">= 0.9.2"},"scripts":{"test":"mocha test/chai-backbone_spec.coffee","test-browser":"./test.sh"},"licenses":[{"type":"MIT","url":"http://github.com/matthijsgroen/chai-backbone/blob/master/LICENSE"}],"_id":"chai-backbone@0.9.2","dist":{"shasum":"fe51f03aedb7111c09221886d4640c6d2214cc28","tarball":"https://registry.npmjs.org/chai-backbone/-/chai-backbone-0.9.2.tgz","integrity":"sha512-jAxIOKJzEuzewlMgB3lp0wkVAVYglX6lxdBLSKDs84kGU9w2lNaVRCRhx4XZBg9mOQfoOQdiO7obkUKp4ErwaQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAo3PdTtHlznaQ+T4YXUUrEQFbHRjWeYMftBPXTQor3fAiEArCWB+m0hiN6LK1pyL4ORhSVLA7KLQDOVANeM4LVsxek="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"thaisi","email":"matthijs.groen@gmail.com"},"maintainers":[{"name":"thaisi","email":"matthijs.groen@gmail.com"}]},"0.9.4":{"author":{"name":"Matthijs Groen","email":"matthijs.groen@gmail.com"},"name":"chai-backbone","description":"Backbone assertions for the Chai assertion library","keywords":["test","assertion","assert","testing","backbone","chai-plugin","browser","vendor","dom"],"version":"0.9.4","repository":{"type":"git","url":"https://github.com/matthijsgroen/chai-backbone"},"bugs":{"url":"https://github.com/matthijsgroen/chai-backbone/issues"},"main":"./chai-backbone","devDependencies":{"chai":">= 1.0.0","mocha":">= 1.0.0","coffee-script":">= 1.4.0"},"dependencies":{"sinon":">= 1.5.2","chai-changes":">= 1.0.0","backbone":">= 0.9.2"},"scripts":{"test":"mocha test/chai-backbone_spec.coffee","test-browser":"./test.sh"},"licenses":[{"type":"MIT","url":"http://github.com/matthijsgroen/chai-backbone/blob/master/LICENSE"}],"gitHead":"b35b6da8056e321f83f16620793bf133d40900bb","homepage":"https://github.com/matthijsgroen/chai-backbone","_id":"chai-backbone@0.9.4","_shasum":"be0d7ab6c2e4adc2e9bcca6c754a61499f529208","_from":".","_npmVersion":"1.4.22","_npmUser":{"name":"thaisi","email":"matthijs.groen@gmail.com"},"maintainers":[{"name":"thaisi","email":"matthijs.groen@gmail.com"}],"dist":{"shasum":"be0d7ab6c2e4adc2e9bcca6c754a61499f529208","tarball":"https://registry.npmjs.org/chai-backbone/-/chai-backbone-0.9.4.tgz","integrity":"sha512-bTc/ZyaAI+z4vHXT00Do1DnRtzwmhYGV74N/LWiK9bBDkrym94YQqVi+Sdr62wYAiYCWBytu9LjzRyxye46Zng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJTNzuxrGutLXGvTKRCMcB67OUnqYOkIB9y1qt5z3i9QIgEGmbgvjmajg6wEkNtOySNllNOAb4eBZL+KfvxoIu8+U="}]}}},"readme":"chai-backbone\n=============\n\n[![Build Status](https://travis-ci.org/matthijsgroen/chai-backbone.png?branch=master)](https://travis-ci.org/matthijsgroen/chai-backbone)\n[![NPM Version](https://fury-badge.herokuapp.com/js/chai-backbone.png)](http://badge.fury.io/js/chai-backbone)\n\nchai-backbone is an extension to the [chai](http://chaijs.com/) assertion library that\nprovides a set of backbone specific assertions.\n\nUse the assertions with chai's `expect` or `should` assertions.\n\nDependencies\n------------\n\n- [sinon](http://sinonjs.org/)\n- [chai-changes](https://github.com/matthijsgroen/chai-changes)\n- [underscore](http://underscorejs.org/)\n- [backbone](http://backbonejs.org/)\n\nAssertions\n----------\n\n### `trigger`\n\n```javascript\nmodel.should.trigger(\"change\", { with: [model] }).when(function() {\n  model.set({ attribute: \"value\" });\n});\n```\n\nthis can also be chained further:\n\n```javascript\nmodel.should.trigger(\"change\").and.trigger(\"change:attribute\").when(function() {\n  model.set({ attribute: \"value\" });\n});\n\nmodel.should.trigger(\"change\").and.not.trigger(\"reset\").when(function() {\n  model.set({ attribute: \"value\" });\n});\n```\n\n### `route.to`\n\nTests if a route is delegated to the correct router and if the arguments\nare extracted in the expected manner.\n\n```javascript\n\"page/3\".should.route.to(myRouter, \"openPage\", { arguments: [\"3\"] });\n\"pages/3\".should.not.route.to(myRouter, \"openPage\");\n\"page/3\".should.route.to(myRouter, \"openPage\", { considering: [conflictingRouter] });\n```\n\n### `call`\n\nThis assertion is ideal for testing view callbacks it will rebind view\nevents to test DOM events\n\n```javascript\nview.should.call('startAuthentication').when(function() {\n  view.$('a.login').trigger('click');\n});\n```\n\n## Installation and Setup\n\n### Node\n\nDo an `npm install chai-backbone` to get up and running. Then:\n\n```javascript\nvar chai = require(\"chai\");\nvar chaiBackbone = require(\"chai-backbone\");\n\nchai.use(chaiBackbone);\n```\n\nYou can of course put this code in a common test fixture file; for an example using [Mocha][mocha]\n\n### AMD\n\nChai Backbone supports being used as an [AMD][amd] module, registering itself anonymously (just like Chai). So,\nassuming you have configured your loader to map the Chai and Chai\nBackbone files to the respective module IDs\n`\"chai\"` and `\"chai-backbone\"`, you can use them as follows:\n\n```javascript\ndefine(function (require, exports, module) {\n    var chai = require(\"chai\");\n    var chaiBackbone = require(\"chai-backbone\");\n\n    chai.use(chaiBackbone);\n});\n```\n\n### `<script>` tag\n\nIf you include Chai Backbone directly with a `<script>` tag, after the one for Chai itself,\nthen it will automatically plug in to Chai and be ready for use:\n\n```html\n<script src=\"chai.js\"></script>\n<script src=\"chai-backbone.js\"></script>\n```\n\n## License\n\nCopyright (c) 2012-2015 Matthijs Groen\n\nMIT License (see the LICENSE file)\n\n[chai]: http://chaijs.com/\n[mocha]: http://visionmedia.github.com/mocha/\n[amd]: https://github.com/amdjs/amdjs-api/wiki/AMD\n\n","maintainers":[{"name":"thaisi","email":"matthijs.groen@gmail.com"}],"time":{"modified":"2022-06-13T05:50:49.459Z","created":"2012-10-13T19:23:00.135Z","0.8.0":"2012-10-13T19:23:01.731Z","0.8.1":"2012-10-13T19:26:22.619Z","0.8.2":"2012-11-22T05:06:58.200Z","0.8.3":"2013-01-06T21:11:13.852Z","0.8.4":"2013-01-09T21:38:22.561Z","0.9.0":"2013-01-28T20:40:50.608Z","0.9.1":"2013-02-08T14:02:08.686Z","0.9.2":"2013-02-08T14:48:49.615Z","0.9.4":"2015-11-12T22:13:07.673Z"},"author":{"name":"Matthijs Groen","email":"matthijs.groen@gmail.com"},"repository":{"type":"git","url":"https://github.com/matthijsgroen/chai-backbone"},"homepage":"https://github.com/matthijsgroen/chai-backbone","keywords":["test","assertion","assert","testing","backbone","chai-plugin","browser","vendor","dom"],"bugs":{"url":"https://github.com/matthijsgroen/chai-backbone/issues"},"readmeFilename":"README.md","users":{"anaumidis":true}}