Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added no-proxy configuration when fetching. Added tests concerning th…

…e no-proxy configuration.

Added test launch to package.json. Added node_modules mocha, chai and express for test purpose.
  • Loading branch information...
commit 6da4ea08dfe5fb65feffcbc42db93fd930f1b2b0 1 parent 237b953
Victor Voisin authored
Showing with 31,839 additions and 3 deletions.
  1. +7 −0 doc/cli/config.md
  2. +18 −3 lib/utils/fetch.js
  3. +9 −0 node_modules/chai/.npmignore
  4. +568 −0 node_modules/chai/History.md
  5. +51 −0 node_modules/chai/README.md
  6. +3,403 −0 node_modules/chai/chai.js
  7. +3 −0  node_modules/chai/index.js
  8. +1,112 −0 node_modules/chai/lib/assertion.js
  9. +28 −0 node_modules/chai/lib/browser/error.js
  10. +72 −0 node_modules/chai/lib/chai.js
  11. +59 −0 node_modules/chai/lib/error.js
  12. +963 −0 node_modules/chai/lib/interface/assert.js
  13. +12 −0 node_modules/chai/lib/interface/expect.js
  14. +62 −0 node_modules/chai/lib/interface/should.js
  15. +70 −0 node_modules/chai/lib/utils/addChainableMethod.js
  16. +37 −0 node_modules/chai/lib/utils/addMethod.js
  17. +40 −0 node_modules/chai/lib/utils/addProperty.js
  18. +100 −0 node_modules/chai/lib/utils/eql.js
  19. +32 −0 node_modules/chai/lib/utils/flag.js
  20. +19 −0 node_modules/chai/lib/utils/getActual.js
  21. +46 −0 node_modules/chai/lib/utils/getMessage.js
  22. +20 −0 node_modules/chai/lib/utils/getName.js
  23. +103 −0 node_modules/chai/lib/utils/getPathValue.js
  24. +96 −0 node_modules/chai/lib/utils/index.js
  25. +278 −0 node_modules/chai/lib/utils/inspect.js
  26. +51 −0 node_modules/chai/lib/utils/overwriteMethod.js
  27. +54 −0 node_modules/chai/lib/utils/overwriteProperty.js
  28. +26 −0 node_modules/chai/lib/utils/test.js
  29. +44 −0 node_modules/chai/lib/utils/transferFlags.js
  30. +58 −0 node_modules/chai/package.json
  31. +7 −0 node_modules/express/.npmignore
  32. +811 −0 node_modules/express/History.md
  33. +22 −0 node_modules/express/LICENSE
  34. +29 −0 node_modules/express/Makefile
  35. +145 −0 node_modules/express/Readme.md
  36. +417 −0 node_modules/express/bin/express
  37. +2 −0  node_modules/express/index.js
  38. +510 −0 node_modules/express/lib-cov/application.js
  39. +65 −0 node_modules/express/lib-cov/express.js
  40. +54 −0 node_modules/express/lib-cov/middleware.js
  41. +225 −0 node_modules/express/lib-cov/request.js
  42. +611 −0 node_modules/express/lib-cov/response.js
  43. +40 −0 node_modules/express/lib-cov/router/collection.js
  44. +515 −0 node_modules/express/lib-cov/router/index.js
  45. +9 −0 node_modules/express/lib-cov/router/methods.js
  46. +68 −0 node_modules/express/lib-cov/router/route.js
  47. +151 −0 node_modules/express/lib-cov/utils.js
  48. +81 −0 node_modules/express/lib-cov/view.js
  49. +79 −0 node_modules/express/lib/express.js
  50. +582 −0 node_modules/express/lib/http.js
  51. +52 −0 node_modules/express/lib/https.js
  52. +323 −0 node_modules/express/lib/request.js
  53. +460 −0 node_modules/express/lib/response.js
  54. +53 −0 node_modules/express/lib/router/collection.js
  55. +398 −0 node_modules/express/lib/router/index.js
  56. +79 −0 node_modules/express/lib/router/methods.js
  57. +88 −0 node_modules/express/lib/router/route.js
  58. +152 −0 node_modules/express/lib/utils.js
  59. +460 −0 node_modules/express/lib/view.js
  60. +40 −0 node_modules/express/lib/view/partial.js
  61. +210 −0 node_modules/express/lib/view/view.js
  62. +11 −0 node_modules/express/node_modules/connect/.npmignore
  63. +24 −0 node_modules/express/node_modules/connect/LICENSE
  64. +2 −0  node_modules/express/node_modules/connect/index.js
  65. +81 −0 node_modules/express/node_modules/connect/lib/cache.js
  66. +106 −0 node_modules/express/node_modules/connect/lib/connect.js
  67. +218 −0 node_modules/express/node_modules/connect/lib/http.js
  68. +47 −0 node_modules/express/node_modules/connect/lib/https.js
  69. +46 −0 node_modules/express/node_modules/connect/lib/index.js
  70. +93 −0 node_modules/express/node_modules/connect/lib/middleware/basicAuth.js
  71. +196 −0 node_modules/express/node_modules/connect/lib/middleware/bodyParser.js
  72. +163 −0 node_modules/express/node_modules/connect/lib/middleware/compiler.js
  73. +146 −0 node_modules/express/node_modules/connect/lib/middleware/compress.js
  74. +46 −0 node_modules/express/node_modules/connect/lib/middleware/cookieParser.js
  75. +105 −0 node_modules/express/node_modules/connect/lib/middleware/csrf.js
  76. +222 −0 node_modules/express/node_modules/connect/lib/middleware/directory.js
  77. +100 −0 node_modules/express/node_modules/connect/lib/middleware/errorHandler.js
  78. +76 −0 node_modules/express/node_modules/connect/lib/middleware/favicon.js
  79. +80 −0 node_modules/express/node_modules/connect/lib/middleware/limit.js
  80. +299 −0 node_modules/express/node_modules/connect/lib/middleware/logger.js
  81. +38 −0 node_modules/express/node_modules/connect/lib/middleware/methodOverride.js
  82. +100 −0 node_modules/express/node_modules/connect/lib/middleware/profiler.js
  83. +40 −0 node_modules/express/node_modules/connect/lib/middleware/query.js
  84. +34 −0 node_modules/express/node_modules/connect/lib/middleware/responseTime.js
  85. +379 −0 node_modules/express/node_modules/connect/lib/middleware/router.js
  86. +345 −0 node_modules/express/node_modules/connect/lib/middleware/session.js
  87. +126 −0 node_modules/express/node_modules/connect/lib/middleware/session/cookie.js
  88. +131 −0 node_modules/express/node_modules/connect/lib/middleware/session/memory.js
  89. +137 −0 node_modules/express/node_modules/connect/lib/middleware/session/session.js
  90. +87 −0 node_modules/express/node_modules/connect/lib/middleware/session/store.js
  91. +225 −0 node_modules/express/node_modules/connect/lib/middleware/static.js
  92. +175 −0 node_modules/express/node_modules/connect/lib/middleware/staticCache.js
  93. +44 −0 node_modules/express/node_modules/connect/lib/middleware/vhost.js
  94. +79 −0 node_modules/express/node_modules/connect/lib/patch.js
  95. +75 −0 node_modules/express/node_modules/connect/lib/public/directory.html
  96. +13 −0 node_modules/express/node_modules/connect/lib/public/error.html
  97. BIN  node_modules/express/node_modules/connect/lib/public/favicon.ico
  98. BIN  node_modules/express/node_modules/connect/lib/public/icons/page.png
  99. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_add.png
  100. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_attach.png
  101. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_code.png
  102. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_copy.png
  103. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_delete.png
  104. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_edit.png
  105. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_error.png
  106. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_excel.png
  107. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_find.png
  108. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_gear.png
  109. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_go.png
  110. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_green.png
  111. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_key.png
  112. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png
  113. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_link.png
  114. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png
  115. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_paste.png
  116. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_red.png
  117. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png
  118. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_save.png
  119. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white.png
  120. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png
  121. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png
  122. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_add.png
  123. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_c.png
  124. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_camera.png
  125. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_cd.png
  126. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png
  127. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png
  128. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png
  129. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_compressed.png
  130. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png
  131. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png
  132. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_csharp.png
  133. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_cup.png
  134. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_database.png
  135. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_delete.png
  136. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_dvd.png
  137. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png
  138. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_error.png
  139. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png
  140. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png
  141. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_flash.png
  142. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png
  143. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png
  144. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png
  145. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_go.png
  146. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_h.png
  147. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_horizontal.png
  148. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png
  149. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_lightning.png
  150. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png
  151. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png
  152. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_medal.png
  153. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png
  154. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png
  155. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png
  156. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_paste.png
  157. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_php.png
  158. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png
  159. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png
  160. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_put.png
  161. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png
  162. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png
  163. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png
  164. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png
  165. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_text.png
  166. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_text_width.png
  167. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_tux.png
  168. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_vector.png
  169. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png
  170. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png
  171. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png
  172. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png
  173. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png
  174. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png
  175. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_word.png
  176. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_world.png
  177. +141 −0 node_modules/express/node_modules/connect/lib/public/style.css
  178. +451 −0 node_modules/express/node_modules/connect/lib/utils.js
  179. +4 −0 node_modules/express/node_modules/connect/node_modules/formidable/.npmignore
  180. +4 −0 node_modules/express/node_modules/connect/node_modules/formidable/.travis.yml
  181. +14 −0 node_modules/express/node_modules/connect/node_modules/formidable/Makefile
  182. +311 −0 node_modules/express/node_modules/connect/node_modules/formidable/Readme.md
  183. +3 −0  node_modules/express/node_modules/connect/node_modules/formidable/TODO
  184. +70 −0 node_modules/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js
  185. +43 −0 node_modules/express/node_modules/connect/node_modules/formidable/example/post.js
  186. +48 −0 node_modules/express/node_modules/connect/node_modules/formidable/example/upload.js
  187. +1 −0  node_modules/express/node_modules/connect/node_modules/formidable/index.js
  188. +73 −0 node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js
  189. +384 −0 node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js
  190. +3 −0  node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js
  191. +312 −0 node_modules/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js
  192. +25 −0 node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js
  193. +6 −0 node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js
  194. +4 −0 node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Makefile
  195. +167 −0 node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Readme.md
  196. +22 −0 node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/dog.js
  197. +11 −0 node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/event_emitter.js
  198. +1 −0  node_modules/express/node_modules/connect/node_modules/formidable/node-gently/index.js
  199. +184 −0 node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/gently.js
  200. +1 −0  node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/index.js
  201. +14 −0 node_modules/express/node_modules/connect/node_modules/formidable/node-gently/package.json
  202. +8 −0 node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/common.js
  203. +348 −0 node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/simple/test-gently.js
  204. +27 −0 node_modules/express/node_modules/connect/node_modules/formidable/package.json
  205. +19 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/common.js
  206. +1 −0  node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt
  207. +1 −0  node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt
  208. +3 −0  ...es/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md
  209. +3 −0  node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js
  210. +21 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js
  211. +72 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js
  212. +89 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js
  213. +24 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/common.js
  214. +80 −0 ...dules/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js
  215. +104 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js
  216. +727 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js
  217. +50 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js
  218. +45 −0 ..._modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js
  219. +75 −0 ..._modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js
  220. +2 −0  node_modules/express/node_modules/connect/node_modules/formidable/test/run.js
  221. +63 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js
  222. +47 −0 node_modules/express/node_modules/connect/node_modules/formidable/tool/record.js
  223. +42 −0 node_modules/express/node_modules/connect/package.json
  224. +15 −0 node_modules/express/node_modules/connect/test.js
  225. +19 −0 node_modules/express/node_modules/mime/LICENSE
  226. +50 −0 node_modules/express/node_modules/mime/README.md
  227. +92 −0 node_modules/express/node_modules/mime/mime.js
  228. +33 −0 node_modules/express/node_modules/mime/package.json
  229. +79 −0 node_modules/express/node_modules/mime/test.js
  230. +1,479 −0 node_modules/express/node_modules/mime/types/mime.types
  231. +43 −0 node_modules/express/node_modules/mime/types/node.types
  232. +2 −0  node_modules/express/node_modules/mkdirp/.gitignore.orig
  233. +5 −0 node_modules/express/node_modules/mkdirp/.gitignore.rej
  234. +2 −0  node_modules/express/node_modules/mkdirp/.npmignore
  235. +21 −0 node_modules/express/node_modules/mkdirp/LICENSE
  236. +54 −0 node_modules/express/node_modules/mkdirp/README.markdown
  237. +6 −0 node_modules/express/node_modules/mkdirp/examples/pow.js
  238. +6 −0 node_modules/express/node_modules/mkdirp/examples/pow.js.orig
  239. +19 −0 node_modules/express/node_modules/mkdirp/examples/pow.js.rej
  240. +79 −0 node_modules/express/node_modules/mkdirp/index.js
  241. +32 −0 node_modules/express/node_modules/mkdirp/package.json
  242. +38 −0 node_modules/express/node_modules/mkdirp/test/chmod.js
  243. +37 −0 node_modules/express/node_modules/mkdirp/test/clobber.js
  244. +28 −0 node_modules/express/node_modules/mkdirp/test/mkdirp.js
  245. +32 −0 node_modules/express/node_modules/mkdirp/test/perm.js
  246. +39 −0 node_modules/express/node_modules/mkdirp/test/perm_sync.js
  247. +41 −0 node_modules/express/node_modules/mkdirp/test/race.js
  248. +32 −0 node_modules/express/node_modules/mkdirp/test/rel.js
  249. +27 −0 node_modules/express/node_modules/mkdirp/test/sync.js
  250. +28 −0 node_modules/express/node_modules/mkdirp/test/umask.js
  251. +27 −0 node_modules/express/node_modules/mkdirp/test/umask_sync.js
  252. +6 −0 node_modules/express/node_modules/qs/.gitmodules
  253. +1 −0  node_modules/express/node_modules/qs/.npmignore
  254. +4 −0 node_modules/express/node_modules/qs/.travis.yml
  255. +73 −0 node_modules/express/node_modules/qs/History.md
  256. +5 −0 node_modules/express/node_modules/qs/Makefile
  257. +54 −0 node_modules/express/node_modules/qs/Readme.md
  258. +17 −0 node_modules/express/node_modules/qs/benchmark.js
  259. +51 −0 node_modules/express/node_modules/qs/examples.js
  260. +2 −0  node_modules/express/node_modules/qs/index.js
  261. +264 −0 node_modules/express/node_modules/qs/lib/querystring.js
  262. +25 −0 node_modules/express/node_modules/qs/package.json
  263. +2 −0  node_modules/express/node_modules/qs/test/mocha.opts
  264. +167 −0 node_modules/express/node_modules/qs/test/parse.js
  265. +103 −0 node_modules/express/node_modules/qs/test/stringify.js
  266. +70 −0 node_modules/express/package.json
  267. +41 −0 node_modules/express/test.js
  268. +4 −0 node_modules/mocha/.npmignore
  269. +5 −0 node_modules/mocha/.travis.yml
  270. +358 −0 node_modules/mocha/History.md
  271. +22 −0 node_modules/mocha/LICENSE
  272. +113 −0 node_modules/mocha/Makefile
  273. +41 −0 node_modules/mocha/Readme.md
  274. +4,325 −0 node_modules/mocha/_mocha.js
  275. +410 −0 node_modules/mocha/bin/_mocha
  276. +32 −0 node_modules/mocha/bin/mocha
  277. +16 −0 node_modules/mocha/editors/JavaScript mocha.tmbundle/Snippets/bdd - after each.tmSnippet
  278. +16 −0 node_modules/mocha/editors/JavaScript mocha.tmbundle/Snippets/bdd - after.tmSnippet
  279. +16 −0 node_modules/mocha/editors/JavaScript mocha.tmbundle/Snippets/bdd - before each.tmSnippet
  280. +16 −0 node_modules/mocha/editors/JavaScript mocha.tmbundle/Snippets/bdd - before.tmSnippet
  281. +16 −0 node_modules/mocha/editors/JavaScript mocha.tmbundle/Snippets/bdd - it.tmSnippet
  282. +16 −0 node_modules/mocha/editors/JavaScript mocha.tmbundle/Snippets/untitled.tmSnippet
  283. +19 −0 node_modules/mocha/editors/JavaScript mocha.tmbundle/info.plist
  284. BIN  node_modules/mocha/images/error.png
  285. BIN  node_modules/mocha/images/ok.png
  286. +4 −0 node_modules/mocha/index.js
  287. +6 −0 node_modules/mocha/lib/browser/debug.js
  288. 0  node_modules/mocha/lib/browser/diff.js
  289. +178 −0 node_modules/mocha/lib/browser/events.js
  290. 0  node_modules/mocha/lib/browser/fs.js
  291. 0  node_modules/mocha/lib/browser/path.js
  292. +125 −0 node_modules/mocha/lib/browser/progress.js
  293. +8 −0 node_modules/mocha/lib/browser/tty.js
  294. +55 −0 node_modules/mocha/lib/context.js
  295. +31 −0 node_modules/mocha/lib/hook.js
  296. +91 −0 node_modules/mocha/lib/interfaces/bdd.js
  297. +60 −0 node_modules/mocha/lib/interfaces/exports.js
  298. +5 −0 node_modules/mocha/lib/interfaces/index.js
  299. +91 −0 node_modules/mocha/lib/interfaces/qunit.js
  300. +94 −0 node_modules/mocha/lib/interfaces/tdd.js
Sorry, we could not display the entire diff because too many files (414) changed.
7 doc/cli/config.md
View
@@ -527,6 +527,13 @@ Any "%s" in the message will be replaced with the version number.
The node version to use when checking package's "engines" hash.
+### no-proxy
+
+* Default: `NO_PROXY` or `no_proxy` environment variable, or "null"
+* Type: String
+
+Hostnames which won't use proxy when being requested.
+
### npat
* Default: false
21 lib/utils/fetch.js
View
@@ -65,9 +65,24 @@ function makeRequest (remote, fstr, headers) {
"Auth required and none provided. Please run 'npm adduser'"))
}
- var proxy
- if (remote.protocol !== "https:" || !(proxy = npm.config.get("https-proxy"))) {
- proxy = npm.config.get("proxy")
+ var proxy = null
+ , useProxy = true
+ , noProxy = npm.config.get("no-proxy") || "null"
+ , noProxyTab = noProxy.split(",")
+
+ for(var i = 0, len = noProxyTab.length; i < len; ++i) {
+ noProxyTab[i] = noProxyTab[i].replace("*", "").trim()
+ if(remote.hostname.indexOf(noProxyTab[i]) !== -1) {
+ //Found a match between hostname and noProxy
+ useProxy = false
+ }
+ }
+
+ if(useProxy) {
+ //Use of proxy authorized
+ if (remote.protocol !== "https:" || !(proxy = npm.config.get("https-proxy"))) {
+ proxy = npm.config.get("proxy")
+ }
}
var opts = { url: remote
9 node_modules/chai/.npmignore
View
@@ -0,0 +1,9 @@
+.git*
+support/
+test/
+.DS_Store
+coverage.html
+lib-cov
+.travis.yml
+Makefile
+.mailmap
568 node_modules/chai/History.md
View
@@ -0,0 +1,568 @@
+
+1.0.4 / 2012-06-03
+==================
+
+ * Merge pull request #68 from fizker/itself
+ * Added itself chain.
+ * simplify error inspections for cross browser compatibility
+ * fix safari `addChainableMethod` errors. Closes #69
+
+1.0.3 / 2012-05-27
+==================
+
+ * Point Travis badge to the right place.
+ * Make error message for eql/deep.equal more clear.
+ * Fix .not.deep.equal.
+ * contributors list
+
+1.0.2 / 2012-05-26
+==================
+
+ * Merge pull request #67 from chaijs/chaining-and-flags
+ * Browser build.
+ * Use `addChainableMethod` to get away from `__proto__` manipulation.
+ * New `addChainableMethod` utility.
+ * Replace `getAllFlags` with `transferFlags` utility.
+ * browser build
+ * test - get all flags
+ * utility - get all flags
+ * Add .mailmap to .npmignore.
+ * Add a .mailmap file to fix my name in shortlogs.
+
+1.0.1 / 2012-05-18
+==================
+
+ * browser build
+ * Fixing "an" vs. "a" grammar in type assertions.
+ * Uniformize `assert` interface inline docs.
+ * Don't use `instanceof` for `assert.isArray`.
+ * Add `deep` flag for equality and property value.
+ * Merge pull request #64 from chaijs/assertion-docs
+ * Uniformize assertion inline docs.
+ * Add npm-debug.log to .gitignore.
+ * no reserved words as actuals. #62
+
+1.0.0 / 2012-05-15
+==================
+
+ * readme cleanup
+ * browser build
+ * utility comments
+ * removed docs
+ * update to package.json
+ * docs build
+ * comments / docs updates
+ * plugins app cleanup
+ * Merge pull request #61 from joliss/doc
+ * Fix and improve documentation of assert.equal and friends
+ * browser build
+ * doc checkpoint - texture
+ * Update chai-jquery link
+ * Use defined return value of Assertion extension functions
+ * Update utility docs
+
+1.0.0-rc3 / 2012-05-09
+==================
+
+ * Merge branch 'feature/rc3'
+ * docs update
+ * browser build
+ * assert test conformity for minor refactor api
+ * assert minor refactor
+ * update util tests for new add/overwrite prop/method format
+ * added chai.Assertion.add/overwrite prop/method for plugin toolbox
+ * add/overwrite prop/method don't make assumptions about context
+ * doc test suite
+ * docs don't need coverage
+ * refactor all simple chains into one forEach loop, for clean documentation
+ * updated npm ignore
+ * remove old docs
+ * docs checkpoint - guide styled
+ * Merge pull request #59 from joliss/doc
+ * Document how to run the test suite
+ * don't need to rebuild docs to view
+ * dep update
+ * docs checkpoint - api section
+ * comment updates for docs
+ * new doc site checkpoint - plugin directory!
+ * Merge pull request #57 from kossnocorp/patch-1
+ * Fix typo: devDependancies → devDependencies
+ * Using message flag in `getMessage` util instead of old `msg` property.
+ * Adding self to package.json contributors.
+ * `getMessage` shouldn't choke on null/omitted messages.
+ * `return this` not necessary in example.
+ * `return this` not necessary in example.
+ * Sinon–Chai has a dash
+ * updated plugins list for docs
+
+1.0.0-rc2 / 2012-05-06
+==================
+
+ * Merge branch 'feature/test-cov'
+ * browser build
+ * missing assert tests for ownProperty
+ * appropriate assert equivalent for expect.to.have.property(key, val)
+ * reset AssertionError to include full stack
+ * test for plugin utilities
+ * overwrite Property and Method now ensure chain
+ * version notes in readme
+
+1.0.0-rc1 / 2012-05-04
+==================
+
+ * browser build (rc1)
+ * assert match/notMatch tests
+ * assert interface - notMatch, ownProperty, notOwnProperty, ownPropertyVal, ownPropertyNotVal
+ * cleaner should interface export.
+ * added chai.Assertion.prototype._obj (getter) for quick access to object flag
+ * moved almostEqual / almostDeepEqual to stats plugin
+ * added mocha.opts
+ * Add test for `utils.addMethod`
+ * Fix a typo
+ * Add test for `utils.overwriteMethod`
+ * Fix a typo
+ * Browser build
+ * Add undefined assertion
+ * Add null assertion
+ * Fix an issue with `mocha --watch`
+ * travis no longer tests on node 0.4.x
+ * removing unnecissary carbon dep
+ * Merge branch 'feature/plugins-app'
+ * docs build
+ * templates for docs express app for plugin directory
+ * express app for plugin and static serving
+ * added web server deps
+ * Merge pull request #54 from josher19/master
+ * Remove old test.assert code
+ * Use util.inspect instead of inspect for deepAlmostEqual and almostEqual
+ * browser build
+ * Added almostEqual and deepAlmostEqual to assert test suite.
+ * bug - context determinants for utils
+ * dec=0 means rounding, so assert.deepAlmostEqual({pi: 3.1416}, {pi: 3}, 0) is true
+ * wrong travis link
+ * readme updates for version information
+ * travis tests 0.5.x branch as well
+ * [bug] util `addProperty` not correctly exporting
+ * read me version notes
+ * browser build 1.0.0alpha1
+ * not using reserved words in internal assertions. #52
+ * version tick
+ * clean up redundant tests
+ * Merge branch 'refs/heads/0.6.x'
+ * update version tag in package 1.0.0alpha1
+ * browser build
+ * added utility tests to browser specs
+ * beginning utility testing
+ * updated utility comments
+ * utility - overwriteMethod
+ * utility - overwriteProperty
+ * utility - addMethod
+ * utility - addProperty
+ * missing ;
+ * contributors list update
+ * Merge branch 'refs/heads/0.6.x-docs' into 0.6.x
+ * Added guide link to docs. WIP
+ * Include/contain are now both properties and methods
+ * Add an alias annotation
+ * Remove usless function wrapper
+ * Fix a typo
+ * A/an are now both properties and methods
+ * [docs] new site homepage layout / color checkpoint
+ * Ignore IE-specific error properties.
+ * Fixing order of error message test.
+ * New cross-browser `getName` util.
+ * Fixing up `AssertionError` inheritance.
+ * backup docs
+ * Add doctypes
+ * [bug] was still using `constructor.name` in `throw` assertion
+ * [bug] flag Object.create(null) instead of new Object
+ * [test] browser build
+ * [refactor] all usage of Assertion.prototype.assert now uses template tags and flags
+ * [refactor] remove Assertion.prototype.inspect for testable object inspection
+ * [refactor] object to test is now stored in flag, with ssfi and custom message
+ * [bug] flag util - don't return on `set`
+ * [docs] comments for getMessage utility
+ * [feature] getMessage
+ * [feature] testing utilities
+ * [refactor] flag doesn't require `call`
+ * Make order of source files well-defined
+ * Added support for throw(errorInstance).
+ * Use a foolproof method of grabbing an error's name.
+ * Removed constructor.name check from throw.
+ * disabled stackTrack configuration tests until api is stable again
+ * first version of line displayed error for node js (unstable)
+ * refactor core Assertion to use flag utility for negation
+ * added flag utility
+ * tests for assert interface negatives. Closed #42
+ * added assertion negatives that were missing. #42
+ * Support for expected and actual parameters in assert-style error object
+ * chai as promised - readme
+ * Added assert.fail. Closes #40
+ * better error message for assert.operator. Closes #39
+ * [refactor] Assertion#property to use getPathValue property
+ * added getPathValue utility helper
+ * removed todo about browser build
+ * version notes
+ * version bumb 0.6.0
+ * browser build
+ * [refactor] browser compile function to replace with `require('./error')' with 'require('./browser/error')'
+ * [feature] browser uses different error.js
+ * [refactor] error without chai.fail
+ * Assertion & interfaces use new utils helper export
+ * [refactor] primary export for new plugin util usage
+ * added util index.js helper
+ * added 2012 to copyright headers
+ * Added DeepEqual assertions
+
+0.5.3 / 2012-04-21
+==================
+
+ * Merge branch 'refs/heads/jgonera-oldbrowsers'
+ * browser build
+ * fixed reserved names for old browsers in interface/assert
+ * fixed reserved names for old browsers in interface/should
+ * fixed: chai.js no longer contains fail()
+ * fixed reserved names for old browsers in Assertion
+ * Merge pull request #49 from joliss/build-order
+ * Make order of source files well-defined
+ * Merge pull request #43 from zzen/patch-1
+ * Support for expected and actual parameters in assert-style error object
+ * chai as promised - readme
+
+0.5.2 / 2012-03-21
+==================
+
+ * browser build
+ * Merge branch 'feature/assert-fail'
+ * Added assert.fail. Closes #40
+ * Merge branch 'bug/operator-msg'
+ * better error message for assert.operator. Closes #39
+ * version notes
+
+0.5.1 / 2012-03-14
+==================
+
+ * chai.fail no longer exists
+ * Merge branch 'feature/assertdefined'
+ * Added asset#isDefined. Closes #37.
+ * dev docs update for Assertion#assert
+
+0.5.0 / 2012-03-07
+==================
+
+ * [bug] on inspect of reg on n 0.4.12
+ * Merge branch 'bug/33-throws'
+ * Merge pull request #35 from logicalparadox/empty-object
+ * browser build
+ * updated #throw docs
+ * Assertion#throw `should` tests updated
+ * Assertion#throw `expect` tests
+ * Should interface supports multiple throw parameters
+ * Update Assertion#throw to support strings and type checks.
+ * Add more tests for `empty` in `should`.
+ * Add more tests for `empty` in `expect`.
+ * Merge branch 'master' into empty-object
+ * don't switch act/exp
+ * Merge pull request #34 from logicalparadox/assert-operator
+ * Update the compiled verison.
+ * Add `assert.operator`.
+ * Notes on messages. #22
+ * browser build
+ * have been test
+ * below tests
+ * Merge branch 'feature/actexp'
+ * browser build
+ * remove unnecessary fail export
+ * full support for actual/expected where relevant
+ * Assertion.assert support expected value
+ * clean up error
+ * Update the compiled version.
+ * Add object & sane arguments support to `Assertion#empty`.
+
+0.4.2 / 2012-02-28
+==================
+
+ * fix for `process` not available in browser when used via browserify. Closes #28
+ * Merge pull request #31 from joliss/doc
+ * Document that "should" works in browsers other than IE
+ * Merge pull request #30 from logicalparadox/assert-tests
+ * Update the browser version of chai.
+ * Update `assert.doesNotThrow` test in order to check the use case when type is a string.
+ * Add test for `assert.ifError`.
+ * Falsey -> falsy.
+ * Full coverage for `assert.throws` and `assert.doesNotThrow`.
+ * Add test for `assert.doesNotThrow`.
+ * Add test for `assert.throws`.
+ * Add test for `assert.length`.
+ * Add test for `assert.include`.
+ * Add test for `assert.isBoolean`.
+ * Fix the implementation of `assert.isNumber`.
+ * Add test for `assert.isNumber`.
+ * Add test for `assert.isString`.
+ * Add test for `assert.isArray`.
+ * Add test for `assert.isUndefined`.
+ * Add test for `assert.isNotNull`.
+ * Fix `assert.isNotNull` implementation.
+ * Fix `assert.isNull` implementation.
+ * Add test for `assert.isNull`.
+ * Add test for `assert.notDeepEqual`.
+ * Add test for `assert.deepEqual`.
+ * Add test for `assert.notStrictEqual`.
+ * Add test for `assert.strictEqual`.
+ * Add test for `assert.notEqual`.
+
+0.4.1 / 2012-02-26
+==================
+
+ * Merge pull request #27 from logicalparadox/type-fix
+ * Update the browser version.
+ * Add should tests for type checks.
+ * Add function type check test.
+ * Add more type checks tests.
+ * Add test for `new Number` type check.
+ * Fix type of actual checks.
+
+0.4.0 / 2012-02-25
+==================
+
+ * docs and readme for upcoming 0.4.0
+ * docs generated
+ * putting coverage and tests for docs in docs/out/support
+ * make docs
+ * makefile copy necessary resources for tests in docs
+ * rename configuration test
+ * Merge pull request #21 from logicalparadox/close-to
+ * Update the browser version.
+ * Update `closeTo()` docs.
+ * Add `Assertion.closeTo()` method.
+ * Add `.closeTo()` should test.
+ * Add `.closeTo()` expect test.
+ * Merge pull request #20 from logicalparadox/satisfy
+ * Update the browser version.
+ * `..` -> `()` in `.satisfy()` should test.
+ * Update example for `.satisfy()`.
+ * Update the compiled browser version.
+ * Add `Assertion.satisfy()` method.
+ * Add `.satisfy()` should test.
+ * Add `.satisfy()` expect test.
+ * Merge pull request #19 from logicalparadox/respond-to
+ * Update the compiled browser version.
+ * Add `respondTo` Assertion.
+ * Add `respondTo` should test.
+ * Add `respondTo` expect test.
+ * Merge branch 'feature/coverage'
+ * mocha coverage support
+ * doc contributors
+ * README contributors
+
+0.3.4 / 2012-02-23
+==================
+
+ * inline comment typos for #15
+ * Merge branch 'refs/heads/jeffbski-configErrorStackCompat'
+ * includeStack documentation for all interfaces
+ * suite name more generic
+ * Update test to be compatible with browsers that do not support err.stack
+ * udpated compiled chai.js and added to browser tests
+ * Allow inclusion of stack trace for Assert error messages to be configurable
+ * docs sharing buttons
+ * sinon-chai link
+ * doc updates
+ * read me updates include plugins
+
+0.3.3 / 2012-02-12
+==================
+
+ * Merge pull request #14 from jfirebaugh/configurable_properties
+ * Make Assertion.prototype properties configurable
+
+0.3.2 / 2012-02-10
+==================
+
+ * codex version
+ * docs
+ * docs cleanup
+
+0.3.1 / 2012-02-07
+==================
+
+ * node 0.4.x compat
+
+0.3.0 / 2012-02-07
+==================
+
+ * Merge branch 'feature/03x'
+ * browser build
+ * remove html/json/headers testign
+ * regex error.message testing
+ * tests for using plugins
+ * Merge pull request #11 from domenic/master
+ * Make `chai.use` a no-op if the function has already been used.
+
+0.2.4 / 2012-02-02
+==================
+
+ * added in past tense switch for `been`
+
+0.2.3 / 2012-02-01
+==================
+
+ * try that again
+
+0.2.2 / 2012-02-01
+==================
+
+ * added `been` (past of `be`) alias
+
+0.2.1 / 2012-01-29
+==================
+
+ * added Throw, with a capital T, as an alias to `throw` (#7)
+
+0.2.0 / 2012-01-26
+==================
+
+ * update gitignore for vim *.swp
+ * Merge branch 'feature/plugins'
+ * browser build
+ * interfaces now work with use
+ * simple .use function. See #9.
+ * readme notice on browser compat
+
+0.1.7 / 2012-01-25
+==================
+
+ * added assert tests to browser test runner
+ * browser update
+ * `should` interface patch for primitives support in FF
+ * fix isObject() Thanks @milewise
+ * travis only on branch `master`
+ * add instanceof alias `instanceOf`. #6
+ * some tests for assert module
+
+0.1.6 / 2012-01-02
+==================
+
+ * commenting for assert interface
+ * updated codex dep
+
+0.1.5 / 2012-01-02
+==================
+
+ * browser tests pass
+ * type in should.not.equal
+ * test for should (not) exist
+ * added should.exist and should.not.exist
+ * browser uses tdd
+ * convert tests to tdd
+
+0.1.4 / 2011-12-26
+==================
+
+ * browser lib update for new assert interface compatiblitiy
+ * inspect typos
+ * added strict equal + negatives and ifError
+ * interface assert had doesNotThrow
+ * added should tests to browser
+ * new expect empty tests
+ * should test browser compat
+ * Fix typo for instanceof docs. Closes #3 [ci skip]
+
+0.1.3 / 2011-12-18
+==================
+
+ * much cleaner reporting string on error.
+
+0.1.2 / 2011-12-18
+==================
+
+ * [docs] for upcoming 0.1.2
+ * browser version built with pre/suffix … all tests passing
+ * make / compile now use prefix/suffix correctly
+ * code clean
+ * prefix/suffix to wrap browser output to prevent conflicts with other `require` methods.
+ * Merge branch 'feature/should4xcompatibility'
+ * compile for browser tests.. all pass
+ * added header/status/html/json
+ * throw tests
+ * should.throw & should.not.throw shortcuts
+ * improved `throw` type detection and messaging
+ * contain is now `include` … keys modifier is now `contain`
+ * removed object() test
+ * removed #respondTo
+ * Merge branch 'bug/2'
+ * replaced __defineGetter__ with defineProperty for all uses
+ * [docs] change mp tracking code
+ * docs site updated with assert (TDD) interface
+ * updated doc comments for assert interface
+
+0.1.1 / 2011-12-16
+==================
+
+ * docs ready for upcoming 0.1.1
+ * readme image fixed [ci skip]
+ * more readme tweaks [ci skip]
+ * réadmet image fixed [ci skip]
+ * documentation
+ * codex locked in version 0.0.5
+ * more comments to assertions for docs
+ * assertions fully commented, browser library updated
+ * adding codex as doc dependancy
+ * prepping for docs
+ * assertion component completely commented for documentation
+ * added exist test
+ * var expect outside of browser if check
+ * added keywords to package.json
+
+0.1.0 / 2011-12-15
+==================
+
+ * failing on purpose successful .. back to normal
+ * testing travis failure
+ * assert#arguments getter
+ * readme typo
+ * updated README
+ * added travis and npmignore
+ * copyright notices … think i got them all
+ * moved expect interface to own file for consistency
+ * assert ui deepEqual
+ * browser tests expect (all working)
+ * browser version built
+ * chai.fail (should ui)
+ * expect tests browser compatible
+ * tests for should and expect (all pass)
+ * moved fail to primary export
+ * should compatibility testing
+ * within, greaterThan, object, keys,
+ * Aliases
+ * Assertion#property now correctly works with negate and undefined values
+ * error message language matches should
+ * Assertion#respondTo
+ * Assertion now uses inspect util
+ * git ignore node modules
+ * should is exported
+ * AssertionError __proto__ from Error.prototype
+ * add should interface for should.js compatibility
+ * moved eql to until folder and added inspect from (joyent/node)
+ * added mocha for testing
+ * browser build for current api
+ * multiple .property assertions
+ * added deep equal from node
+
+0.0.2 / 2011-12-07
+==================
+
+ * cleaner output on error
+ * improved exists detection
+ * package remnant artifact
+ * empty deep equal
+ * test browser build
+ * assertion cleanup
+ * client compile script
+ * makefile
+ * most of the basic assertions
+ * allow no parameters to assertion error
+ * name change
+ * assertion error instance
+ * main exports: assert() & expect()
+ * initialize
51 node_modules/chai/README.md
View
@@ -0,0 +1,51 @@
+[![Build Status](https://secure.travis-ci.org/chaijs/chai.png)](http://travis-ci.org/chaijs/chai)
+
+[![Chai Documentation](http://chaijs.com/public/img/chai-logo.png)](http://chaijs.com)
+
+Chai is a BDD / TDD assertion library for [node](http://nodejs.org) and the browser that
+can be delightfully paired with any javascript testing framework.
+
+For more information or to download plugins, view the [documentation](http://chaijs.com).
+
+### Contributors
+
+ commits: 471
+ files : 44
+ authors:
+ 344 Jake Luer 73.0%
+ 66 Veselin Todorov 14.0%
+ 34 Domenic Denicola 7.2%
+ 5 Jo Liss 1.1%
+ 5 Juliusz Gonera 1.1%
+ 4 josher19 0.8%
+ 4 John Firebaugh 0.8%
+ 3 Jeff Barczewski 0.6%
+ 2 Jakub Nešetřil 0.4%
+ 1 Anand Patil 0.2%
+ 1 Sasha Koss 0.2%
+ 1 Benjamin Horsleben 0.2%
+ 1 Vinay Pulim 0.2%
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2011-2012 Jake Luer <jake@alogicalparadox.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
3,403 node_modules/chai/chai.js
View
@@ -0,0 +1,3403 @@
+!function (name, definition) {
+ if (typeof define == 'function' && typeof define.amd == 'object') define(definition);
+ else this[name] = definition();
+}('chai', function () {
+
+// CommonJS require()
+
+function require(p){
+ var path = require.resolve(p)
+ , mod = require.modules[path];
+ if (!mod) throw new Error('failed to require "' + p + '"');
+ if (!mod.exports) {
+ mod.exports = {};
+ mod.call(mod.exports, mod, mod.exports, require.relative(path));
+ }
+ return mod.exports;
+ }
+
+require.modules = {};
+
+require.resolve = function (path){
+ var orig = path
+ , reg = path + '.js'
+ , index = path + '/index.js';
+ return require.modules[reg] && reg
+ || require.modules[index] && index
+ || orig;
+ };
+
+require.register = function (path, fn){
+ require.modules[path] = fn;
+ };
+
+require.relative = function (parent) {
+ return function(p){
+ if ('.' != p[0]) return require(p);
+
+ var path = parent.split('/')
+ , segs = p.split('/');
+ path.pop();
+
+ for (var i = 0; i < segs.length; i++) {
+ var seg = segs[i];
+ if ('..' == seg) path.pop();
+ else if ('.' != seg) path.push(seg);
+ }
+
+ return require(path.join('/'));
+ };
+ };
+
+
+require.register("assertion.js", function(module, exports, require){
+/*!
+ * chai
+ * http://chaijs.com
+ * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>
+ * MIT Licensed
+ */
+
+
+/*!
+ * Module dependencies.
+ */
+
+var AssertionError = require('./browser/error')
+ , toString = Object.prototype.toString
+ , util = require('./utils')
+ , flag = util.flag;
+
+/*!
+ * Module export.
+ */
+
+module.exports = Assertion;
+
+
+/*!
+ * Assertion Constructor
+ *
+ * Creates object for chaining.
+ *
+ * @api private
+ */
+
+function Assertion (obj, msg, stack) {
+ flag(this, 'ssfi', stack || arguments.callee);
+ flag(this, 'object', obj);
+ flag(this, 'message', msg);
+}
+
+/*!
+ * ### Assertion.includeStack
+ *
+ * User configurable property, influences whether stack trace
+ * is included in Assertion error message. Default of false
+ * suppresses stack trace in the error message
+ *
+ * Assertion.includeStack = true; // enable stack on error
+ *
+ * @api public
+ */
+
+Assertion.includeStack = false;
+
+Assertion.addProperty = function (name, fn) {
+ util.addProperty(this.prototype, name, fn);
+};
+
+Assertion.addMethod = function (name, fn) {
+ util.addMethod(this.prototype, name, fn);
+};
+
+Assertion.addChainableMethod = function (name, fn, chainingBehavior) {
+ util.addChainableMethod(this.prototype, name, fn, chainingBehavior);
+};
+
+Assertion.overwriteProperty = function (name, fn) {
+ util.overwriteProperty(this.prototype, name, fn);
+};
+
+Assertion.overwriteMethod = function (name, fn) {
+ util.overwriteMethod(this.prototype, name, fn);
+};
+
+/*!
+ * ### .assert(expression, message, negateMessage, expected, actual)
+ *
+ * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass.
+ *
+ * @name assert
+ * @param {Philosophical} expression to be tested
+ * @param {String} message to display if fails
+ * @param {String} negatedMessage to display if negated expression fails
+ * @param {Mixed} expected value (remember to check for negation)
+ * @param {Mixed} actual (optional) will default to `this.obj`
+ * @api private
+ */
+
+Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual) {
+ var msg = util.getMessage(this, arguments)
+ , actual = util.getActual(this, arguments)
+ , ok = util.test(this, arguments);
+
+ if (!ok) {
+ throw new AssertionError({
+ message: msg
+ , actual: actual
+ , expected: expected
+ , stackStartFunction: (Assertion.includeStack) ? this.assert : flag(this, 'ssfi')
+ });
+ }
+};
+
+/*!
+ *
+ * ### ._obj
+ *
+ * Quick reference to stored `actual` value for plugin developers.
+ *
+ * @api private
+ */
+
+Object.defineProperty(Assertion.prototype, '_obj',
+ { get: function () {
+ return flag(this, 'object');
+ }
+ , set: function (val) {
+ flag(this, 'object', val);
+ }
+});
+
+/**
+ * ### Language Chains
+ *
+ * The following are provide as chainable getters to
+ * improve the readability of your assertions. They
+ * do not provide an testing capability unless they
+ * have been overwritten by a plugin.
+ *
+ * **Chains**
+ *
+ * - to
+ * - be
+ * - been
+ * - is
+ * - and
+ * - have
+ * - with
+ *
+ * @name language chains
+ * @api public
+ */
+
+[ 'to', 'be', 'been'
+, 'is', 'and', 'have'
+, 'with' ].forEach(function (chain) {
+ Object.defineProperty(Assertion.prototype, chain,
+ { get: function () {
+ return this;
+ }
+ , configurable: true
+ });
+});
+
+/**
+ * ### .not
+ *
+ * Negates any of assertions following in the chain.
+ *
+ * expect(foo).to.not.equal('bar');
+ * expect(goodFn).to.not.throw(Error);
+ * expect({ foo: 'baz' }).to.have.property('foo')
+ * .and.not.equal('bar');
+ *
+ * @name not
+ * @api public
+ */
+
+Object.defineProperty(Assertion.prototype, 'not',
+ { get: function () {
+ flag(this, 'negate', true);
+ return this;
+ }
+ , configurable: true
+});
+
+/**
+ * ### .deep
+ *
+ * Sets the `deep` flag, later used by the `equal` and
+ * `property` assertions.
+ *
+ * expect(foo).to.deep.equal({ bar: 'baz' });
+ * expect({ foo: { bar: { baz: 'quux' } } })
+ * .to.have.deep.property('foo.bar.baz', 'quux');
+ *
+ * @name deep
+ * @api public
+ */
+
+Object.defineProperty(Assertion.prototype, 'deep',
+ { get: function () {
+ flag(this, 'deep', true);
+ return this;
+ }
+ , configurable: true
+});
+
+/**
+ * ### .a(type)
+ *
+ * The `a` and `an` assertions are aliases that can be
+ * used either as language chains or to assert a value's
+ * type (as revealed by `Object.prototype.toString`).
+ *
+ * // typeof
+ * expect('test').to.be.a('string');
+ * expect({ foo: 'bar' }).to.be.an('object');
+ * expect(null).to.be.a('null');
+ * expect(undefined).to.be.an('undefined');
+ *
+ * // language chain
+ * expect(foo).to.be.an.instanceof(Foo);
+ *
+ * @name a
+ * @alias an
+ * @param {String} type
+ * @api public
+ */
+
+function an(type) {
+ var obj = flag(this, 'object')
+ , klassStart = type.charAt(0).toUpperCase()
+ , klass = klassStart + type.slice(1)
+ , article = ~[ 'A', 'E', 'I', 'O', 'U' ].indexOf(klassStart) ? 'an ' : 'a ';
+
+ this.assert(
+ '[object ' + klass + ']' === toString.call(obj)
+ , 'expected #{this} to be ' + article + type
+ , 'expected #{this} not to be ' + article + type
+ , '[object ' + klass + ']'
+ , toString.call(obj)
+ );
+}
+
+Assertion.addChainableMethod('an', an);
+Assertion.addChainableMethod('a', an);
+
+/**
+ * ### .include(value)
+ *
+ * The `include` and `contain` assertions can be used as either property
+ * based language chains or as methods to assert the inclusion of an object
+ * in an array or a substring in a string. When used as language chains,
+ * they toggle the `contain` flag for the `keys` assertion.
+ *
+ * expect([1,2,3]).to.include(2);
+ * expect('foobar').to.contain('foo');
+ * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo');
+ *
+ * @name include
+ * @alias contain
+ * @param {Object|String|Number} obj
+ * @api public
+ */
+
+function includeChainingBehavior () {
+ flag(this, 'contains', true);
+}
+
+function include (val) {
+ var obj = flag(this, 'object')
+ this.assert(
+ ~obj.indexOf(val)
+ , 'expected #{this} to include ' + util.inspect(val)
+ , 'expected #{this} to not include ' + util.inspect(val));
+}
+
+Assertion.addChainableMethod('include', include, includeChainingBehavior);
+Assertion.addChainableMethod('contain', include, includeChainingBehavior);
+
+/**
+ * ### .ok
+ *
+ * Asserts that the target is truthy.
+ *
+ * expect('everthing').to.be.ok;
+ * expect(1).to.be.ok;
+ * expect(false).to.not.be.ok;
+ * expect(undefined).to.not.be.ok;
+ * expect(null).to.not.be.ok;
+ *
+ * @name ok
+ * @api public
+ */
+
+Object.defineProperty(Assertion.prototype, 'ok',
+ { get: function () {
+ this.assert(
+ flag(this, 'object')
+ , 'expected #{this} to be truthy'
+ , 'expected #{this} to be falsy');
+
+ return this;
+ }
+ , configurable: true
+});
+
+/**
+ * ### .true
+ *
+ * Asserts that the target is `true`.
+ *
+ * expect(true).to.be.true;
+ * expect(1).to.not.be.true;
+ *
+ * @name true
+ * @api public
+ */
+
+Object.defineProperty(Assertion.prototype, 'true',
+ { get: function () {
+ this.assert(
+ true === flag(this, 'object')
+ , 'expected #{this} to be true'
+ , 'expected #{this} to be false'
+ , this.negate ? false : true
+ );
+
+ return this;
+ }
+ , configurable: true
+});
+
+/**
+ * ### .false
+ *
+ * Asserts that the target is `false`.
+ *
+ * expect(false).to.be.false;
+ * expect(0).to.not.be.false;
+ *
+ * @name false
+ * @api public
+ */
+
+Object.defineProperty(Assertion.prototype, 'false',
+ { get: function () {
+ this.assert(
+ false === flag(this, 'object')
+ , 'expected #{this} to be false'
+ , 'expected #{this} to be true'
+ , this.negate ? true : false
+ );
+
+ return this;
+ }
+ , configurable: true
+});
+
+/**
+ * ### .null
+ *
+ * Asserts that the target is `null`.
+ *
+ * expect(null).to.be.null;
+ * expect(undefined).not.to.be.null;
+ *
+ * @name null
+ * @api public
+ */
+
+Object.defineProperty(Assertion.prototype, 'null',
+ { get: function () {
+ this.assert(
+ null === flag(this, 'object')
+ , 'expected #{this} to be null'
+ , 'expected #{this} not to be null'
+ , this.negate ? false : true
+ );
+
+ return this;
+ }
+ , configurable: true
+});
+
+/**
+ * ### .undefined
+ *
+ * Asserts that the target is `undefined`.
+ *
+ * expect(undefined).to.be.undefined;
+ * expect(null).to.not.be.undefined;
+ *
+ * @name undefined
+ * @api public
+ */
+
+Object.defineProperty(Assertion.prototype, 'undefined',
+ { get: function () {
+ this.assert(
+ undefined === flag(this, 'object')
+ , 'expected #{this} to be undefined'
+ , 'expected #{this} not to be undefined'
+ , this.negate ? false : true
+ );
+
+ return this;
+ }
+ , configurable: true
+});
+
+/**
+ * ### .exist
+ *
+ * Asserts that the target is neither `null` nor `undefined`.
+ *
+ * var foo = 'hi'
+ * , bar = null
+ * , baz;
+ *
+ * expect(foo).to.exist;
+ * expect(bar).to.not.exist;
+ * expect(baz).to.not.exist;
+ *
+ * @name exist
+ * @api public
+ */
+
+Object.defineProperty(Assertion.prototype, 'exist',
+ { get: function () {
+ this.assert(
+ null != flag(this, 'object')
+ , 'expected #{this} to exist'
+ , 'expected #{this} to not exist'
+ );
+
+ return this;
+ }
+ , configurable: true
+});
+
+/**
+ * ### .empty
+ *
+ * Asserts that the target's length is `0`. For arrays, it checks
+ * the `length` property. For objects, it gets the count of
+ * enumerable keys.
+ *
+ * expect([]).to.be.empty;
+ * expect('').to.be.empty;
+ * expect({}).to.be.empty;
+ *
+ * @name empty
+ * @api public
+ */
+
+Object.defineProperty(Assertion.prototype, 'empty',
+ { get: function () {
+ var obj = flag(this, 'object')
+ , expected = obj;
+
+ if (Array.isArray(obj) || 'string' === typeof object) {
+ expected = obj.length;
+ } else if (typeof obj === 'object') {
+ expected = Object.keys(obj).length;
+ }
+
+ this.assert(
+ !expected
+ , 'expected #{this} to be empty'
+ , 'expected #{this} not to be empty');
+
+ return this;
+ }
+ , configurable: true
+});
+
+/**
+ * ### .arguments
+ *
+ * Asserts that the target is an arguments object.
+ *
+ * function test () {
+ * expect(arguments).to.be.arguments;
+ * }
+ *
+ * @name arguments
+ * @alias Arguments
+ * @api public
+ */
+
+function checkArguments () {
+ var obj = flag(this, 'object')
+ , type = Object.prototype.toString.call(obj);
+ this.assert(
+ '[object Arguments]' === type
+ , 'expected #{this} to be arguments but got ' + type
+ , 'expected #{this} to not be arguments'
+ );
+}
+
+Assertion.addProperty('arguments', checkArguments);
+Assertion.addProperty('Arguments', checkArguments);
+
+/**
+ * ### .equal(value)
+ *
+ * Asserts that the target is strictly equal (`===`) to `value`.
+ * Alternately, if the `deep` flag is set, asserts that
+ * the target is deeply equal to `value`.
+ *
+ * expect('hello').to.equal('hello');
+ * expect(42).to.equal(42);
+ * expect(1).to.not.equal(true);
+ * expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' });
+ * expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' });
+ *
+ * @name equal
+ * @param {Mixed} value
+ * @api public
+ */
+
+Assertion.prototype.equal = function (val) {
+ var obj = flag(this, 'object');
+ if (flag(this, 'deep')) {
+ return this.eql(val);
+ } else {
+ this.assert(
+ val === obj
+ , 'expected #{this} to equal #{exp}'
+ , 'expected #{this} to not equal #{exp}'
+ , val);
+ }
+
+ return this;
+};
+
+/**
+ * ### .eql(value)
+ *
+ * Asserts that the target is deeply equal to `value`.
+ *
+ * expect({ foo: 'bar' }).to.eql({ foo: 'bar' });
+ * expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]);
+ *
+ * @name eql
+ * @param {Mixed} value
+ * @api public
+ */
+
+Assertion.prototype.eql = function (obj) {
+ this.assert(
+ util.eql(obj, flag(this, 'object'))
+ , 'expected #{this} to deeply equal #{exp}'
+ , 'expected #{this} to not deeply equal #{exp}'
+ , obj );
+
+ return this;
+};
+
+/**
+ * ### .above(value)
+ *
+ * Asserts that the target is greater than `value`.
+ *
+ * expect(10).to.be.above(5);
+ *
+ * @name above
+ * @alias gt
+ * @param {Number} value
+ * @api public
+ */
+
+Assertion.prototype.above = function (val) {
+ this.assert(
+ flag(this, 'object') > val
+ , 'expected #{this} to be above ' + val
+ , 'expected #{this} to be below ' + val);
+
+ return this;
+};
+
+/**
+ * ### .below(value)
+ *
+ * Asserts that the target is less than `value`.
+ *
+ * expect(5).to.be.below(10);
+ *
+ * @name below
+ * @alias lt
+ * @param {Number} value
+ * @api public
+ */
+
+Assertion.prototype.below = function (val) {
+ this.assert(
+ flag(this, 'object') < val
+ , 'expected #{this} to be below ' + val
+ , 'expected #{this} to be above ' + val);
+
+ return this;
+};
+
+/**
+ * ### .within(start, finish)
+ *
+ * Asserts that the target is within a range.
+ *
+ * expect(7).to.be.within(5,10);
+ *
+ * @name within
+ * @param {Number} start lowerbound inclusive
+ * @param {Number} finish upperbound inclusive
+ * @api public
+ */
+
+Assertion.prototype.within = function (start, finish) {
+ var obj = flag(this, 'object')
+ , range = start + '..' + finish;
+
+ this.assert(
+ obj >= start && obj <= finish
+ , 'expected #{this} to be within ' + range
+ , 'expected #{this} to not be within ' + range);
+
+ return this;
+};
+
+/**
+ * ### .instanceof(constructor)
+ *
+ * Asserts that the target is an instance of `constructor`.
+ *
+ * var Tea = function (name) { this.name = name; }
+ * , Chai = new Tea('chai');
+ *
+ * expect(Chai).to.be.an.instanceof(Tea);
+ * expect([ 1, 2, 3 ]).to.be.instanceof(Array);
+ *
+ * @name instanceof
+ * @param {Constructor} constructor
+ * @alias instanceOf
+ * @api public
+ */
+
+Assertion.prototype.instanceOf = function (constructor) {
+ var name = util.getName(constructor);
+ this.assert(
+ flag(this, 'object') instanceof constructor
+ , 'expected #{this} to be an instance of ' + name
+ , 'expected #{this} to not be an instance of ' + name);
+
+ return this;
+};
+
+/**
+ * ### .property(name, [value])
+ *
+ * Asserts that the target has a property `name`, optionally asserting that
+ * the value of that property is strictly equal to `value`.
+ * If the `deep` flag is set, you can use dot- and bracket-notation for deep
+ * references into objects and arrays.
+ *
+ * // simple referencing
+ * var obj = { foo: 'bar' };
+ * expect(obj).to.have.property('foo');
+ * expect(obj).to.have.property('foo', 'bar');
+ * expect(obj).to.have.property('foo').to.be.a('string');
+ *
+ * // deep referencing
+ * var deepObj = {
+ * green: { tea: 'matcha' }
+ * , teas: [ 'chai', 'matcha', { tea: 'konacha' } ]
+ * };
+
+ * expect(deepObj).to.have.deep.property('green.tea', 'matcha');
+ * expect(deepObj).to.have.deep.property('teas[1]', 'matcha');
+ * expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha');
+ *
+ * @name property
+ * @param {String} name
+ * @param {Mixed} value (optional)
+ * @returns value of property for chaining
+ * @api public
+ */
+
+Assertion.prototype.property = function (name, val) {
+ var obj = flag(this, 'object')
+ , value = flag(this, 'deep') ? util.getPathValue(name, obj) : obj[name]
+ , descriptor = flag(this, 'deep') ? 'deep property ' : 'property '
+ , negate = flag(this, 'negate');
+
+ if (negate && undefined !== val) {
+ if (undefined === value) {
+ throw new Error(util.inspect(obj) + ' has no ' + descriptor + util.inspect(name));
+ }
+ } else {
+ this.assert(
+ undefined !== value
+ , 'expected #{this} to have a ' + descriptor + util.inspect(name)
+ , 'expected #{this} to not have ' + descriptor + util.inspect(name));
+ }
+
+ if (undefined !== val) {
+ this.assert(
+ val === value
+ , 'expected #{this} to have a ' + descriptor + util.inspect(name) + ' of #{exp}, but got #{act}'
+ , 'expected #{this} to not have a ' + descriptor + util.inspect(name) + ' of #{act}'
+ , val
+ , value
+ );
+ }
+
+ flag(this, 'object', value);
+ return this;
+};
+
+/**
+ * ### .ownProperty(name)
+ *
+ * Asserts that the target has an own property `name`.
+ *
+ * expect('test').to.have.ownProperty('length');
+ *
+ * @name ownProperty
+ * @alias haveOwnProperty
+ * @param {String} name
+ * @api public
+ */
+
+Assertion.prototype.ownProperty = function (name) {
+ var obj = flag(this, 'object');
+ this.assert(
+ obj.hasOwnProperty(name)
+ , 'expected #{this} to have own property ' + util.inspect(name)
+ , 'expected #{this} to not have own property ' + util.inspect(name));
+ return this;
+};
+
+/**
+ * ### .length(value)
+ *
+ * Asserts that the target's `length` property has the expected value.
+ *
+ * expect([1,2,3]).to.have.length(3);
+ * expect('foobar').to.have.length(6);
+ *
+ * @name length
+ * @alias lengthOf
+ * @param {Number} length
+ * @api public
+ */
+
+Assertion.prototype.length = function (n) {
+ var obj = flag(this, 'object');
+ new Assertion(obj).to.have.property('length');
+ var len = obj.length;
+
+ this.assert(
+ len == n
+ , 'expected #{this} to have a length of #{exp} but got #{act}'
+ , 'expected #{this} to not have a length of #{act}'
+ , n
+ , len
+ );
+
+ return this;
+};
+
+/**
+ * ### .match(regexp)
+ *
+ * Asserts that the target matches a regular expression.
+ *
+ * expect('foobar').to.match(/^foo/);
+ *
+ * @name match
+ * @param {RegExp} RegularExpression
+ * @api public
+ */
+
+Assertion.prototype.match = function (re) {
+ var obj = flag(this, 'object');
+ this.assert(
+ re.exec(obj)
+ , 'expected #{this} to match ' + re
+ , 'expected #{this} not to match ' + re);
+
+ return this;
+};
+
+
+/**
+ * ### .string(string)
+ *
+ * Asserts that the string target contains another string.
+ *
+ * expect('foobar').to.have.string('bar');
+ *
+ * @name string
+ * @param {String} string
+ * @api public
+ */
+
+Assertion.prototype.string = function (str) {
+ var obj = flag(this, 'object');
+ new Assertion(obj).is.a('string');
+
+ this.assert(
+ ~obj.indexOf(str)
+ , 'expected #{this} to contain ' + util.inspect(str)
+ , 'expected #{this} to not contain ' + util.inspect(str));
+
+ return this;
+};
+
+/**
+ * ### .keys(key1, [key2], [...])
+ *
+ * Asserts that the target has exactly the given keys, or
+ * asserts the inclusion of some keys when using the
+ * `include` or `contain` modifiers.
+ *
+ * expect({ foo: 1, bar: 2 }).to.have.keys(['foo', 'bar']);
+ * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.keys('foo', 'bar');
+ *
+ * @name keys
+ * @alias key
+ * @param {String...|Array} keys
+ * @api public
+ */
+
+Assertion.prototype.keys = function(keys) {
+ var obj = flag(this, 'object')
+ , str
+ , ok = true;
+
+ keys = keys instanceof Array
+ ? keys
+ : Array.prototype.slice.call(arguments);
+
+ if (!keys.length) throw new Error('keys required');
+
+ var actual = Object.keys(obj)
+ , len = keys.length;
+
+ // Inclusion
+ ok = keys.every(function(key){
+ return ~actual.indexOf(key);
+ });
+
+ // Strict
+ if (!flag(this, 'negate') && !flag(this, 'contains')) {
+ ok = ok && keys.length == actual.length;
+ }
+
+ // Key string
+ if (len > 1) {
+ keys = keys.map(function(key){
+ return util.inspect(key);
+ });
+ var last = keys.pop();
+ str = keys.join(', ') + ', and ' + last;
+ } else {
+ str = util.inspect(keys[0]);
+ }
+
+ // Form
+ str = (len > 1 ? 'keys ' : 'key ') + str;
+
+ // Have / include
+ str = (flag(this, 'contains') ? 'contain ' : 'have ') + str;
+
+ // Assertion
+ this.assert(
+ ok
+ , 'expected #{this} to ' + str
+ , 'expected #{this} to not ' + str
+ , keys
+ , Object.keys(obj)
+ );
+
+ return this;
+}
+
+/**
+ * ### .throw(constructor)
+ *
+ * Asserts that the function target will throw a specific error, or specific type of error
+ * (as determined using `instanceof`), optionally with a RegExp or string inclusion test
+ * for the error's message.
+ *
+ * var err = new ReferenceError('This is a bad function.');
+ * var fn = function () { throw err; }
+ * expect(fn).to.throw(ReferenceError);
+ * expect(fn).to.throw(Error);
+ * expect(fn).to.throw(/bad function/);
+ * expect(fn).to.not.throw('good function');
+ * expect(fn).to.throw(ReferenceError, /bad function/);
+ * expect(fn).to.throw(err);
+ * expect(fn).to.not.throw(new RangeError('Out of range.'));
+ *
+ * Please note that when a throw expectation is negated, it will check each
+ * parameter independently, starting with error constructor type. The appropriate way
+ * to check for the existence of a type of error but for a message that does not match
+ * is to use `and`.
+ *
+ * expect(fn).to.throw(ReferenceError)
+ * .and.not.throw(/good function/);
+ *
+ * @name throw
+ * @alias throws
+ * @alias Throw
+ * @param {ErrorConstructor} constructor
+ * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types
+ * @api public
+ */
+
+Assertion.prototype.Throw = function (constructor, msg) {
+ var obj = flag(this, 'object');
+ new Assertion(obj).is.a('function');
+
+ var thrown = false
+ , desiredError = null
+ , name = null;
+
+ if (arguments.length === 0) {
+ msg = null;
+ constructor = null;
+ } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) {
+ msg = constructor;
+ constructor = null;
+ } else if (constructor && constructor instanceof Error) {
+ desiredError = constructor;
+ constructor = null;
+ msg = null;
+ } else if (typeof constructor === 'function') {
+ name = (new constructor()).name;
+ } else {
+ constructor = null;
+ }
+
+ try {
+ obj();
+ } catch (err) {
+ // first, check desired error
+ if (desiredError) {
+ this.assert(
+ err === desiredError
+ , 'expected #{this} to throw ' + util.inspect(desiredError) + ' but ' + util.inspect(err) + ' was thrown'
+ , 'expected #{this} to not throw ' + util.inspect(desiredError)
+ );
+ return this;
+ }
+ // next, check constructor
+ if (constructor) {
+ this.assert(
+ err instanceof constructor
+ , 'expected #{this} to throw ' + name + ' but a ' + err.name + ' was thrown'
+ , 'expected #{this} to not throw ' + name );
+ if (!msg) return this;
+ }
+ // next, check message
+ if (err.message && msg && msg instanceof RegExp) {
+ this.assert(
+ msg.exec(err.message)
+ , 'expected #{this} to throw error matching ' + msg + ' but got ' + util.inspect(err.message)
+ , 'expected #{this} to throw error not matching ' + msg
+ );
+ return this;
+ } else if (err.message && msg && 'string' === typeof msg) {
+ this.assert(
+ ~err.message.indexOf(msg)
+ , 'expected #{this} to throw error including #{exp} but got #{act}'
+ , 'expected #{this} to throw error not including #{act}'
+ , msg
+ , err.message
+ );
+ return this;
+ } else {
+ thrown = true;
+ }
+ }
+
+ var expectedThrown = name ? name : desiredError ? util.inspect(desiredError) : 'an error';
+
+ this.assert(
+ thrown === true
+ , 'expected #{this} to throw ' + expectedThrown
+ , 'expected #{this} to not throw ' + expectedThrown);
+
+ return this;
+};
+
+/**
+ * ### .respondTo(method)
+ *
+ * Asserts that the object or class target will respond to a method.
+ *
+ * Klass.prototype.bar = function(){};
+ * expect(Klass).to.respondTo('bar');
+ * expect(obj).to.respondTo('bar');
+ *
+ * To check if a constructor will respond to a static function,
+ * set the `itself` flag.
+ *
+ * Klass.baz = function(){};
+ * expect(Klass).itself.to.respondTo('baz');
+ *
+ * @name respondTo
+ * @param {String} method
+ * @api public
+ */
+
+Assertion.prototype.respondTo = function (method) {
+ var obj = flag(this, 'object')
+ , itself = flag(this, 'itself')
+ , context = ('function' === typeof obj && !itself)
+ ? obj.prototype[method]
+ : obj[method];
+
+ this.assert(
+ 'function' === typeof context
+ , 'expected #{this} to respond to ' + util.inspect(method)
+ , 'expected #{this} to not respond to ' + util.inspect(method)
+ , 'function'
+ , typeof context
+ );
+
+ return this;
+};
+
+/**
+ * ### .itself
+ *
+ * Sets the `itself` flag, later used by the `respondTo` assertion.
+ *
+ * function Foo() {}
+ * Foo.bar = function() {}
+ * Foo.prototype.baz = function() {}
+ *
+ * expect(Foo).itself.to.respondTo('bar');
+ * expect(Foo).itself.not.to.respondTo('baz');
+ *
+ * @name itself
+ * @api public
+ */
+Object.defineProperty(Assertion.prototype, 'itself',
+ { get: function () {
+ flag(this, 'itself', true);
+ return this;
+ }
+ , configurable: true
+});
+
+/**
+ * ### .satisfy(method)
+ *
+ * Asserts that the target passes a given truth test.
+ *
+ * expect(1).to.satisfy(function(num) { return num > 0; });
+ *
+ * @name satisfy
+ * @param {Function} matcher
+ * @api public
+ */
+
+Assertion.prototype.satisfy = function (matcher) {
+ var obj = flag(this, 'object');
+ this.assert(
+ matcher(obj)
+ , 'expected #{this} to satisfy ' + util.inspect(matcher)
+ , 'expected #{this} to not satisfy' + util.inspect(matcher)
+ , this.negate ? false : true
+ , matcher(obj)
+ );
+
+ return this;
+};
+
+/**
+ * ### .closeTo(expected, delta)
+ *
+ * Asserts that the target is equal `expected`, to within a +/- `delta` range.
+ *
+ * expect(1.5).to.be.closeTo(1, 0.5);
+ *
+ * @name closeTo
+ * @param {Number} expected
+ * @param {Number} delta
+ * @api public
+ */
+
+Assertion.prototype.closeTo = function (expected, delta) {
+ var obj = flag(this, 'object');
+ this.assert(
+ (obj - delta === expected) || (obj + delta === expected)
+ , 'expected #{this} to be close to ' + expected + ' +/- ' + delta
+ , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta);
+
+ return this;
+};
+
+/*!
+ * Aliases.
+ */
+
+(function alias(name, as){
+ Assertion.prototype[as] = Assertion.prototype[name];
+ return alias;
+})
+('equal', 'eq')
+('above', 'gt')
+('below', 'lt')
+('length', 'lengthOf')
+('keys', 'key')
+('ownProperty', 'haveOwnProperty')
+('above', 'greaterThan')
+('below', 'lessThan')
+('Throw', 'throws')
+('Throw', 'throw')
+('instanceOf', 'instanceof');
+
+}); // module: assertion.js
+
+require.register("browser/error.js", function(module, exports, require){
+/*!
+ * chai
+ * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>
+ * MIT Licensed
+ */
+
+module.exports = AssertionError;
+
+function AssertionError (options) {
+ options = options || {};
+ this.message = options.message;
+ this.actual = options.actual;
+ this.expected = options.expected;
+ this.operator = options.operator;
+
+ if (options.stackStartFunction && Error.captureStackTrace) {
+ var stackStartFunction = options.stackStartFunction;
+ Error.captureStackTrace(this, stackStartFunction);
+ }
+}
+
+AssertionError.prototype = Object.create(Error.prototype);
+AssertionError.prototype.name = 'AssertionError';
+AssertionError.prototype.constructor = AssertionError;
+
+AssertionError.prototype.toString = function() {
+ return this.message;
+};
+
+}); // module: browser/error.js
+
+require.register("chai.js", function(module, exports, require){
+/*!
+ * chai
+ * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>
+ * MIT Licensed
+ */
+
+var used = []
+ , exports = module.exports = {};
+
+/*!
+ * Chai version
+ */
+
+exports.version = '1.0.4';
+
+/*!
+ * Primary `Assertion` prototype
+ */
+
+exports.Assertion = require('./assertion');
+
+/*!
+ * Assertion Error
+ */
+
+exports.AssertionError = require('./browser/error');
+
+/*!
+ * Utils for plugins (not exported)
+ */
+
+var util = require('./utils');
+
+/**
+ * # .use(function)
+ *
+ * Provides a way to extend the internals of Chai
+ *
+ * @param {Function}
+ * @returns {this} for chaining
+ * @api public
+ */
+
+exports.use = function (fn) {
+ if (!~used.indexOf(fn)) {
+ fn(this, util);
+ used.push(fn);
+ }
+
+ return this;
+};
+
+/*!
+ * Expect interface
+ */
+
+var expect = require('./interface/expect');
+exports.use(expect);
+
+/*!
+ * Should interface
+ */
+
+var should = require('./interface/should');
+exports.use(should);
+
+/*!
+ * Assert interface
+ */
+
+var assert = require('./interface/assert');
+exports.use(assert);
+
+}); // module: chai.js
+
+require.register("interface/assert.js", function(module, exports, require){
+/*!
+ * chai
+ * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>
+ * MIT Licensed
+ */
+
+
+module.exports = function (chai, util) {
+
+ /*!
+ * Chai dependencies.
+ */
+
+ var Assertion = chai.Assertion
+ , flag = util.flag;
+
+ /*!
+ * Module export.
+ */
+
+ /**
+ * ### assert(expression, message)
+ *
+ * Write your own test expressions.
+ *
+ * assert('foo' !== 'bar', 'foo is not bar');
+ * assert(Array.isArray([]), 'empty arrays are arrays');
+ *
+ * @param {Mixed} expression to test for truthiness
+ * @param {String} message to display on error
+ * @name assert
+ * @api public
+ */
+
+ var assert = chai.assert = function (express, errmsg) {
+ var test = new Assertion(null);
+ test.assert(
+ express
+ , errmsg
+ , '[ negation message unavailable ]'
+ );
+ };
+
+ /**
+ * ### .fail(actual, expected, [message], [operator])
+ *
+ * Throw a failure. Node.js `assert` module-compatible.
+ *
+ * @name fail
+ * @param {Mixed} actual
+ * @param {Mixed} expected
+ * @param {String} message
+ * @param {String} operator
+ * @api public
+ */
+
+ assert.fail = function (actual, expected, message, operator) {
+ throw new chai.AssertionError({
+ actual: actual
+ , expected: expected
+ , message: message
+ , operator: operator
+ , stackStartFunction: assert.fail
+ });
+ };
+
+ /**
+ * ### .ok(object, [message])
+ *
+ * Asserts that `object` is truthy.
+ *
+ * assert.ok('everything', 'everything is ok');
+ * assert.ok(false, 'this will fail');
+ *
+ * @name ok
+ * @param {Mixed} object to test
+ * @param {String} message
+ * @api public
+ */
+
+ assert.ok = function (val, msg) {
+ new Assertion(val, msg).is.ok;
+ };
+
+ /**
+ * ### .equal(actual, expected, [message])
+ *
+ * Asserts non-strict equality (`==`) of `actual` and `expected`.
+ *
+ * assert.equal(3, '3', '== coerces values to strings');
+ *
+ * @name equal
+ * @param {Mixed} actual
+ * @param {Mixed} expected
+ * @param {String} message
+ * @api public
+ */
+
+ assert.equal = function (act, exp, msg) {
+ var test = new Assertion(act, msg);
+
+ test.assert(
+ exp == flag(test, 'object')
+ , 'expected #{this} to equal #{exp}'
+ , 'expected #{this} to not equal #{act}'
+ , exp
+ , act
+ );
+ };
+
+ /**
+ * ### .notEqual(actual, expected, [message])
+ *
+ * Asserts non-strict inequality (`!=`) of `actual` and `expected`.
+ *
+ * assert.notEqual(3, 4, 'these numbers are not equal');
+ *
+ * @name notEqual
+ * @param {Mixed} actual
+ * @param {Mixed} expected
+ * @param {String} message
+ * @api public
+ */
+
+ assert.notEqual = function (act, exp, msg) {
+ var test = new Assertion(act, msg);
+
+ test.assert(
+ exp != flag(test, 'object')
+ , 'expected #{this} to not equal #{exp}'
+ , 'expected #{this} to equal #{act}'
+ , exp
+ , act
+ );
+ };
+
+ /**
+ * ### .strictEqual(actual, expected, [message])
+ *
+ * Asserts strict equality (`===`) of `actual` and `expected`.
+ *
+ * assert.strictEqual(true, true, 'these booleans are strictly equal');
+ *
+ * @name strictEqual
+ * @param {Mixed} actual
+ * @param {Mixed} expected
+ * @param {String} message
+ * @api public
+ */
+
+ assert.strictEqual = function (act, exp, msg) {
+ new Assertion(act, msg).to.equal(exp);
+ };
+
+ /**
+ * ### .notStrictEqual(actual, expected, [message])
+ *
+ * Asserts strict inequality (`!==`) of `actual` and `expected`.
+ *
+ * assert.notStrictEqual(3, '3', 'no coercion for strict equality');
+ *
+ * @name notStrictEqual
+ * @param {Mixed} actual
+ * @param {Mixed} expected
+ * @param {String} message
+ * @api public
+ */
+
+ assert.notStrictEqual = function (act, exp, msg) {
+ new Assertion(act, msg).to.not.equal(exp);
+ };
+
+ /**
+ * ### .deepEqual(actual, expected, [message])
+ *
+ * Asserts that `actual` is deeply equal to `expected`.
+ *
+ * assert.deepEqual({ tea: 'green' }, { tea: 'green' });
+ *
+ * @name deepEqual
+ * @param {Mixed} actual
+ * @param {Mixed} expected
+ * @param {String} message
+ * @api public
+ */
+
+ assert.deepEqual = function (act, exp, msg) {
+ new Assertion(act, msg).to.eql(exp);
+ };
+
+ /**
+ * ### .notDeepEqual(actual, expected, [message])
+ *
+ * Assert that `actual` is not deeply equal to `expected`.
+ *
+ * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' });
+ *
+ * @name notDeepEqual
+ * @param {Mixed} actual
+ * @param {Mixed} expected
+ * @param {String} message
+ * @api public
+ */
+
+ assert.notDeepEqual = function (act, exp, msg) {
+ new Assertion(act, msg).to.not.eql(exp);
+ };
+
+ /**
+ * ### .isTrue(value, [message])
+ *
+ * Asserts that `value` is true.
+ *
+ * var teaServed = true;
+ * assert.isTrue(teaServed, 'the tea has been served');