Browse files

updating npm

  • Loading branch information...
1 parent a1ae728 commit d0d3bed8034b295bebb7f53273d016f2f695fb28 @cbrammer cbrammer committed Oct 18, 2012
Showing with 38,620 additions and 0 deletions.
  1. +61 −0 .gitignore
  2. +1 −0 node_modules/.bin/_mocha
  3. +1 −0 node_modules/.bin/mocha
  4. +6 −0 node_modules/mocha/.npmignore
  5. +5 −0 node_modules/mocha/.travis.yml
  6. +457 −0 node_modules/mocha/History.md
  7. +22 −0 node_modules/mocha/LICENSE
  8. +120 −0 node_modules/mocha/Makefile
  9. +41 −0 node_modules/mocha/Readme.md
  10. +4,793 −0 node_modules/mocha/_mocha.js
  11. +417 −0 node_modules/mocha/bin/_mocha
  12. +47 −0 node_modules/mocha/bin/mocha
  13. +9 −0 node_modules/mocha/component.json
  14. BIN node_modules/mocha/images/error.png
  15. BIN node_modules/mocha/images/ok.png
  16. +4 −0 node_modules/mocha/index.js
  17. +6 −0 node_modules/mocha/lib/browser/debug.js
  18. 0 node_modules/mocha/lib/browser/diff.js
  19. +178 −0 node_modules/mocha/lib/browser/events.js
  20. 0 node_modules/mocha/lib/browser/fs.js
  21. 0 node_modules/mocha/lib/browser/path.js
  22. +125 −0 node_modules/mocha/lib/browser/progress.js
  23. +8 −0 node_modules/mocha/lib/browser/tty.js
  24. +69 −0 node_modules/mocha/lib/context.js
  25. +50 −0 node_modules/mocha/lib/hook.js
  26. +133 −0 node_modules/mocha/lib/interfaces/bdd.js
  27. +60 −0 node_modules/mocha/lib/interfaces/exports.js
  28. +5 −0 node_modules/mocha/lib/interfaces/index.js
  29. +91 −0 node_modules/mocha/lib/interfaces/qunit.js
  30. +115 −0 node_modules/mocha/lib/interfaces/tdd.js
  31. +288 −0 node_modules/mocha/lib/mocha.js
  32. +81 −0 node_modules/mocha/lib/ms.js
  33. +362 −0 node_modules/mocha/lib/reporters/base.js
  34. +56 −0 node_modules/mocha/lib/reporters/doc.js
  35. +63 −0 node_modules/mocha/lib/reporters/dot.js
  36. +51 −0 node_modules/mocha/lib/reporters/html-cov.js
  37. +254 −0 node_modules/mocha/lib/reporters/html.js
  38. +19 −0 node_modules/mocha/lib/reporters/index.js
  39. +149 −0 node_modules/mocha/lib/reporters/json-cov.js
  40. +61 −0 node_modules/mocha/lib/reporters/json-stream.js
  41. +70 −0 node_modules/mocha/lib/reporters/json.js
  42. +97 −0 node_modules/mocha/lib/reporters/landing.js
  43. +64 −0 node_modules/mocha/lib/reporters/list.js
  44. +92 −0 node_modules/mocha/lib/reporters/markdown.js
  45. +38 −0 node_modules/mocha/lib/reporters/min.js
  46. +259 −0 node_modules/mocha/lib/reporters/nyan.js
  47. +86 −0 node_modules/mocha/lib/reporters/progress.js
  48. +87 −0 node_modules/mocha/lib/reporters/spec.js
  49. +63 −0 node_modules/mocha/lib/reporters/tap.js
  50. +65 −0 node_modules/mocha/lib/reporters/teamcity.js
  51. +50 −0 node_modules/mocha/lib/reporters/templates/coverage.jade
  52. +13 −0 node_modules/mocha/lib/reporters/templates/menu.jade
  53. +34 −0 node_modules/mocha/lib/reporters/templates/script.html
  54. +301 −0 node_modules/mocha/lib/reporters/templates/style.html
  55. +115 −0 node_modules/mocha/lib/reporters/xunit.js
  56. +206 −0 node_modules/mocha/lib/runnable.js
  57. +496 −0 node_modules/mocha/lib/runner.js
  58. +296 −0 node_modules/mocha/lib/suite.js
  59. +16 −0 node_modules/mocha/lib/template.html
  60. +32 −0 node_modules/mocha/lib/test.js
  61. +282 −0 node_modules/mocha/lib/utils.js
  62. +203 −0 node_modules/mocha/mocha.css
  63. +4,906 −0 node_modules/mocha/mocha.js
  64. +1 −0 node_modules/mocha/node_modules/.bin/jade
  65. +4 −0 node_modules/mocha/node_modules/commander/.npmignore
  66. +4 −0 node_modules/mocha/node_modules/commander/.travis.yml
  67. +107 −0 node_modules/mocha/node_modules/commander/History.md
  68. +7 −0 node_modules/mocha/node_modules/commander/Makefile
  69. +262 −0 node_modules/mocha/node_modules/commander/Readme.md
  70. +2 −0 node_modules/mocha/node_modules/commander/index.js
  71. +1,026 −0 node_modules/mocha/node_modules/commander/lib/commander.js
  72. +34 −0 node_modules/mocha/node_modules/commander/package.json
  73. +4 −0 node_modules/mocha/node_modules/debug/.npmignore
  74. +47 −0 node_modules/mocha/node_modules/debug/History.md
  75. +4 −0 node_modules/mocha/node_modules/debug/Makefile
  76. +130 −0 node_modules/mocha/node_modules/debug/Readme.md
  77. +120 −0 node_modules/mocha/node_modules/debug/debug.component.js
  78. +116 −0 node_modules/mocha/node_modules/debug/debug.js
  79. +19 −0 node_modules/mocha/node_modules/debug/example/app.js
  80. +24 −0 node_modules/mocha/node_modules/debug/example/browser.html
  81. +10 −0 node_modules/mocha/node_modules/debug/example/wildcards.js
  82. +22 −0 node_modules/mocha/node_modules/debug/example/worker.js
  83. +1 −0 node_modules/mocha/node_modules/debug/head.js
  84. +2 −0 node_modules/mocha/node_modules/debug/index.js
  85. +135 −0 node_modules/mocha/node_modules/debug/lib/debug.js
  86. +31 −0 node_modules/mocha/node_modules/debug/package.json
  87. +4 −0 node_modules/mocha/node_modules/debug/tail.js
  88. +31 −0 node_modules/mocha/node_modules/diff/LICENSE
  89. +94 −0 node_modules/mocha/node_modules/diff/README.md
  90. +287 −0 node_modules/mocha/node_modules/diff/diff.js
  91. +89 −0 node_modules/mocha/node_modules/diff/index.html
  92. +42 −0 node_modules/mocha/node_modules/diff/package.json
  93. +81 −0 node_modules/mocha/node_modules/diff/style.css
  94. +616 −0 node_modules/mocha/node_modules/diff/test/diffTest.js
  95. +48 −0 node_modules/mocha/node_modules/growl/History.md
  96. +93 −0 node_modules/mocha/node_modules/growl/Readme.md
  97. +188 −0 node_modules/mocha/node_modules/growl/lib/growl.js
  98. +13 −0 node_modules/mocha/node_modules/growl/package.json
  99. +16 −0 node_modules/mocha/node_modules/growl/test.js
  100. +15 −0 node_modules/mocha/node_modules/jade/.npmignore
  101. +22 −0 node_modules/mocha/node_modules/jade/LICENSE
  102. +147 −0 node_modules/mocha/node_modules/jade/bin/jade
  103. +4 −0 node_modules/mocha/node_modules/jade/index.js
  104. +3,586 −0 node_modules/mocha/node_modules/jade/jade.js
  105. +510 −0 node_modules/mocha/node_modules/jade/jade.md
  106. +2 −0 node_modules/mocha/node_modules/jade/jade.min.js
  107. +642 −0 node_modules/mocha/node_modules/jade/lib/compiler.js
  108. +18 −0 node_modules/mocha/node_modules/jade/lib/doctypes.js
  109. +97 −0 node_modules/mocha/node_modules/jade/lib/filters.js
  110. +28 −0 node_modules/mocha/node_modules/jade/lib/inline-tags.js
  111. +237 −0 node_modules/mocha/node_modules/jade/lib/jade.js
  112. +771 −0 node_modules/mocha/node_modules/jade/lib/lexer.js
  113. +77 −0 node_modules/mocha/node_modules/jade/lib/nodes/attrs.js
  114. +33 −0 node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js
  115. +121 −0 node_modules/mocha/node_modules/jade/lib/nodes/block.js
  116. +43 −0 node_modules/mocha/node_modules/jade/lib/nodes/case.js
  117. +35 −0 node_modules/mocha/node_modules/jade/lib/nodes/code.js
  118. +32 −0 node_modules/mocha/node_modules/jade/lib/nodes/comment.js
  119. +29 −0 node_modules/mocha/node_modules/jade/lib/nodes/doctype.js
  120. +35 −0 node_modules/mocha/node_modules/jade/lib/nodes/each.js
  121. +35 −0 node_modules/mocha/node_modules/jade/lib/nodes/filter.js
  122. +20 −0 node_modules/mocha/node_modules/jade/lib/nodes/index.js
  123. +32 −0 node_modules/mocha/node_modules/jade/lib/nodes/literal.js
  124. +36 −0 node_modules/mocha/node_modules/jade/lib/nodes/mixin.js
  125. +25 −0 node_modules/mocha/node_modules/jade/lib/nodes/node.js
  126. +95 −0 node_modules/mocha/node_modules/jade/lib/nodes/tag.js
  127. +36 −0 node_modules/mocha/node_modules/jade/lib/nodes/text.js
  128. +710 −0 node_modules/mocha/node_modules/jade/lib/parser.js
  129. +174 −0 node_modules/mocha/node_modules/jade/lib/runtime.js
  130. +19 −0 node_modules/mocha/node_modules/jade/lib/self-closing.js
  131. +49 −0 node_modules/mocha/node_modules/jade/lib/utils.js
  132. +2 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig
  133. +5 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej
  134. +2 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore
  135. +21 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/LICENSE
  136. +54 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/README.markdown
  137. +6 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js
  138. +6 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig
  139. +19 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej
  140. +79 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/index.js
  141. +32 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json
  142. +38 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/chmod.js
  143. +37 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/clobber.js
  144. +28 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js
  145. +32 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm.js
  146. +39 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm_sync.js
  147. +41 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/race.js
  148. +32 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/rel.js
  149. +27 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js
  150. +28 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask.js
  151. +27 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask_sync.js
  152. +44 −0 node_modules/mocha/node_modules/jade/package.json
  153. +179 −0 node_modules/mocha/node_modules/jade/runtime.js
  154. +1 −0 node_modules/mocha/node_modules/jade/runtime.min.js
  155. +7 −0 node_modules/mocha/node_modules/jade/test.jade
  156. +5 −0 node_modules/mocha/node_modules/jade/testing/head.jade
  157. +22 −0 node_modules/mocha/node_modules/jade/testing/index.jade
  158. +11 −0 node_modules/mocha/node_modules/jade/testing/index.js
  159. +6 −0 node_modules/mocha/node_modules/jade/testing/layout.jade
  160. +7 −0 node_modules/mocha/node_modules/jade/testing/user.jade
  161. +27 −0 node_modules/mocha/node_modules/jade/testing/user.js
  162. +2 −0 node_modules/mocha/node_modules/mkdirp/.gitignore.orig
  163. +5 −0 node_modules/mocha/node_modules/mkdirp/.gitignore.rej
  164. +2 −0 node_modules/mocha/node_modules/mkdirp/.npmignore
  165. +4 −0 node_modules/mocha/node_modules/mkdirp/.travis.yml
  166. +21 −0 node_modules/mocha/node_modules/mkdirp/LICENSE
  167. +61 −0 node_modules/mocha/node_modules/mkdirp/README.markdown
  168. +6 −0 node_modules/mocha/node_modules/mkdirp/examples/pow.js
  169. +6 −0 node_modules/mocha/node_modules/mkdirp/examples/pow.js.orig
  170. +19 −0 node_modules/mocha/node_modules/mkdirp/examples/pow.js.rej
  171. +94 −0 node_modules/mocha/node_modules/mkdirp/index.js
  172. +32 −0 node_modules/mocha/node_modules/mkdirp/package.json
  173. +38 −0 node_modules/mocha/node_modules/mkdirp/test/chmod.js
  174. +37 −0 node_modules/mocha/node_modules/mkdirp/test/clobber.js
  175. +28 −0 node_modules/mocha/node_modules/mkdirp/test/mkdirp.js
  176. +32 −0 node_modules/mocha/node_modules/mkdirp/test/perm.js
  177. +39 −0 node_modules/mocha/node_modules/mkdirp/test/perm_sync.js
  178. +41 −0 node_modules/mocha/node_modules/mkdirp/test/race.js
  179. +32 −0 node_modules/mocha/node_modules/mkdirp/test/rel.js
  180. +25 −0 node_modules/mocha/node_modules/mkdirp/test/return.js
  181. +24 −0 node_modules/mocha/node_modules/mkdirp/test/return_sync.js
  182. +18 −0 node_modules/mocha/node_modules/mkdirp/test/root.js
  183. +32 −0 node_modules/mocha/node_modules/mkdirp/test/sync.js
  184. +28 −0 node_modules/mocha/node_modules/mkdirp/test/umask.js
  185. +32 −0 node_modules/mocha/node_modules/mkdirp/test/umask_sync.js
  186. +1 −0 node_modules/mocha/node_modules/ms/.npmignore
  187. +21 −0 node_modules/mocha/node_modules/ms/History.md
  188. +8 −0 node_modules/mocha/node_modules/ms/Makefile
  189. +24 −0 node_modules/mocha/node_modules/ms/README.md
  190. +7 −0 node_modules/mocha/node_modules/ms/component.json
  191. +81 −0 node_modules/mocha/node_modules/ms/ms.js
  192. +14 −0 node_modules/mocha/node_modules/ms/package.json
  193. +19 −0 node_modules/mocha/node_modules/ms/test/index.html
  194. +9,266 −0 node_modules/mocha/node_modules/ms/test/support/jquery.js
  195. +85 −0 node_modules/mocha/node_modules/ms/test/test.js
  196. +46 −0 node_modules/mocha/package.json
  197. +18 −0 node_modules/mocha/test.js
View
61 .gitignore
@@ -0,0 +1,61 @@
+lib-cov
+*.seed
+*.log
+*.node
+*.wafpickle-7
+*.lock-wscript
+*.csv
+*.dat
+*.out
+*.pid
+*.gz
+*.swp
+.DS_Store
+dump.rdb
+.jshintrc
+
+pids
+logs
+results
+
+/public/js/app.js
+/public/css/style.css
+npm-debug.log
+/config/version.json
+/config/local.json
+/client/config.js
+.build
+/docs
+
+
+/node_modules/googlemaps
+/node_modules/baptize
+/node_modules/boilerplate
+/node_modules/challenges
+/node_modules/calorie-calculator
+/node_modules/equipment
+/node_modules/interactions
+/node_modules/log-workout
+/node_modules/maps
+/node_modules/user
+/node_modules/tempest
+/node_modules/admin
+/node_modules/achievements
+/node_modules/workout-manager
+/node_modules/payment-api
+/node_modules/media
+/node_modules/action-pipeline
+/node_modules/geolib
+/node_modules/winston-pulse
+/node_modules/paymentApi
+/node_modules/legacy-api
+/node_modules/log-biometric
+/node_modules/gpx-parser
+/node_modules/wpl2
+/node_modules/soap
+/node_modules/sketch
+/node_modules/oauth
+/node_modules/ifit-mail
+/node_modules/static-map
+/node_modules/workout-translator
+
View
1 node_modules/.bin/_mocha
View
1 node_modules/.bin/mocha
View
6 node_modules/mocha/.npmignore
@@ -0,0 +1,6 @@
+test
+examples
+*.sock
+lib-cov
+editors
+support
View
5 node_modules/mocha/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - 0.4
+ - 0.6
+ - 0.8
View
457 node_modules/mocha/History.md
@@ -0,0 +1,457 @@
+
+1.6.0 / 2012-10-02
+==================
+
+ * add object diffs when `err.showDiff` is present
+ * add hiding of empty suites when pass/failures are toggled
+ * add faster `.length` checks to `checkGlobals()` before performing the filter
+
+1.5.0 / 2012-09-21
+==================
+
+ * add `ms()` to `.slow()` and `.timeout()`
+ * add `Mocha#checkLeaks()` to re-enable global leak checks
+ * add `this.slow()` option [aheckmann]
+ * add tab, CR, LF to error diffs for now
+ * add faster `.checkGlobals()` solution [guille]
+ * remove `fn.call()` from reduce util
+ * remove `fn.call()` from filter util
+ * fix forEach. Closes #582
+ * fix relaying of signals [TooTallNate]
+ * fix TAP reporter grep number
+
+1.4.2 / 2012-09-01
+==================
+
+ * add support to multiple `Mocha#globals()` calls, and strings
+ * add `mocha.reporter()` constructor support [jfirebaugh]
+ * add `mocha.timeout()`
+ * move query-string parser to utils.js
+ * move highlight code to utils.js
+ * fix third-party reporter support [exogen]
+ * fix client-side API to match node-side [jfirebaugh]
+ * fix mocha in iframe [joliss]
+
+1.4.1 / 2012-08-28
+==================
+
+ * add missing `Markdown` export
+ * fix `Mocha#grep()`, escape regexp strings
+ * fix reference error when `devicePixelRatio` is not defined. Closes #549
+
+1.4.0 / 2012-08-22
+==================
+
+ * add mkdir -p to `mocha init`. Closes #539
+ * add `.only()`. Closes #524
+ * add `.skip()`. Closes #524
+ * change str.trim() to use utils.trim(). Closes #533
+ * fix HTML progress indicator retina display
+ * fix url-encoding of click-to-grep HTML functionality
+
+1.3.2 / 2012-08-01
+==================
+
+ * fix exports double-execution regression. Closes #531
+
+1.3.1 / 2012-08-01
+==================
+
+ * add passes/failures toggling to HTML reporter
+ * add pending state to `xit()` and `xdescribe()` [Brian Moore]
+ * add the @charset "UTF-8"; to fix #522 with FireFox. [Jonathan Creamer]
+ * add border-bottom to #stats links
+ * add check for runnable in `Runner#uncaught()`. Closes #494
+ * add 0.4 and 0.6 back to travis.yml
+ * add `-E, --growl-errors` to growl on failures only
+ * add prefixes to debug() names. Closes #497
+ * add `Mocha#invert()` to js api
+ * change dot reporter to use sexy unicode dots
+ * fix error when clicking pending test in HTML reporter
+ * fix `make tm`
+
+1.3.0 / 2012-07-05
+==================
+
+ * add window scrolling to `HTML` reporter
+ * add v8 `--trace-*` option support
+ * add support for custom reports via `--reporter MODULE`
+ * add `--invert` switch to invert `--grep` matches
+ * fix export of `Nyan` reporter. Closes #495
+ * fix escaping of `HTML` suite titles. Closes #486
+ * fix `done()` called multiple times with an error test
+ * change `--grep` - regexp escape the input
+
+1.2.2 / 2012-06-28
+==================
+
+ * Added 0.8.0 support
+
+1.2.1 / 2012-06-25
+==================
+
+ * Added `this.test.error(err)` support to after each hooks. Closes #287
+ * Added: export top-level suite on global mocha object (mocha.suite). Closes #448
+ * Fixed `js` code block format error in markdown reporter
+ * Fixed deprecation warning when using `path.existsSync`
+ * Fixed --globals with wildcard
+ * Fixed chars in nyan when his head moves back
+ * Remove `--growl` from test/mocha.opts. Closes #289
+
+1.2.0 / 2012-06-17
+==================
+
+ * Added `nyan` reporter [Atsuya Takagi]
+ * Added `mocha init <path>` to copy client files
+ * Added "specify" synonym for "it" [domenic]
+ * Added global leak wildcard support [nathanbowser]
+ * Fixed runner emitter leak. closes #432
+ * Fixed omission of .js extension. Closes #454
+
+1.1.0 / 2012-05-30
+==================
+
+ * Added: check each `mocha(1)` arg for directories to walk
+ * Added `--recursive` [tricknotes]
+ * Added `context` for BDD [hokaccha]
+ * Added styling for new clickable titles
+ * Added clickable suite titles to HTML reporter
+ * Added warning when strings are thrown as errors
+ * Changed: green arrows again in HTML reporter styling
+ * Changed ul/li elements instead of divs for better copy-and-pasting [joliss]
+ * Fixed issue #325 - add better grep support to js api
+ * Fixed: save timer references to avoid Sinon interfering.
+
+1.0.3 / 2012-04-30
+==================
+
+ * Fixed string diff newlines
+ * Fixed: removed mocha.css target. Closes #401
+
+1.0.2 / 2012-04-25
+==================
+
+ * Added HTML reporter duration. Closes #47
+ * Fixed: one postMessage event listener [exogen]
+ * Fixed: allow --globals to be used multiple times. Closes #100 [brendannee]
+ * Fixed #158: removes jquery include from browser tests
+ * Fixed grep. Closes #372 [brendannee]
+ * Fixed #166 - When grepping don't display the empty suites
+ * Removed test/browser/style.css. Closes #385
+
+1.0.1 / 2012-04-04
+==================
+
+ * Fixed `.timeout()` in hooks
+ * Fixed: allow callback for `mocha.run()` in client version
+ * Fixed browser hook error display. Closes #361
+
+1.0.0 / 2012-03-24
+==================
+
+ * Added js API. Closes #265
+ * Added: initial run of tests with `--watch`. Closes #345
+ * Added: mark `location` as a global on the CS. Closes #311
+ * Added `markdown` reporter (github flavour)
+ * Added: scrolling menu to coverage.html. Closes #335
+ * Added source line to html report for Safari [Tyson Tate]
+ * Added "min" reporter, useful for `--watch` [Jakub Nešetřil]
+ * Added support for arbitrary compilers via . Closes #338 [Ian Young]
+ * Added Teamcity export to lib/reporters/index [Michael Riley]
+ * Fixed chopping of first char in error reporting. Closes #334 [reported by topfunky]
+ * Fixed terrible FF / Opera stack traces
+
+0.14.1 / 2012-03-06
+==================
+
+ * Added lib-cov to _.npmignore_
+ * Added reporter to `mocha.run([reporter])` as argument
+ * Added some margin-top to the HTML reporter
+ * Removed jQuery dependency
+ * Fixed `--watch`: purge require cache. Closes #266
+
+0.14.0 / 2012-03-01
+==================
+
+ * Added string diff support for terminal reporters
+
+0.13.0 / 2012-02-23
+==================
+
+ * Added preliminary test coverage support. Closes #5
+ * Added `HTMLCov` reporter
+ * Added `JSONCov` reporter [kunklejr]
+ * Added `xdescribe()` and `xit()` to the BDD interface. Closes #263 (docs * Changed: make json reporter output pretty json
+ * Fixed node-inspector support, swapped `--debug` for `debug` to match node.
+needed)
+Closes #247
+
+0.12.1 / 2012-02-14
+==================
+
+ * Added `npm docs mocha` support [TooTallNate]
+ * Added a `Context` object used for hook and test-case this. Closes #253
+ * Fixed `Suite#clone()` `.ctx` reference. Closes #262
+
+0.12.0 / 2012-02-02
+==================
+
+ * Added .coffee `--watch` support. Closes #242
+ * Added support to `--require` files relative to the CWD. Closes #241
+ * Added quick n dirty syntax highlighting. Closes #248
+ * Changed: made HTML progress indicator smaller
+ * Fixed xunit errors attribute [dhendo]
+
+0.10.2 / 2012-01-21
+==================
+
+ * Fixed suite count in reporter stats. Closes #222
+ * Fixed `done()` after timeout error reporting [Phil Sung]
+ * Changed the 0-based errors to 1
+
+0.10.1 / 2012-01-17
+==================
+
+ * Added support for node 0.7.x
+ * Fixed absolute path support. Closes #215 [kompiro]
+ * Fixed `--no-colors` option [Jussi Virtanen]
+ * Fixed Arial CSS typo in the correct file
+
+0.10.0 / 2012-01-13
+==================
+
+ * Added `-b, --bail` to exit on first exception [guillermo]
+ * Added support for `-gc` / `--expose-gc` [TooTallNate]
+ * Added `qunit`-inspired interface
+ * Added MIT LICENSE. Closes #194
+ * Added: `--watch` all .js in the CWD. Closes #139
+ * Fixed `self.test` reference in runner. Closes #189
+ * Fixed double reporting of uncaught exceptions after timeout. Closes #195
+
+0.8.2 / 2012-01-05
+==================
+
+ * Added test-case context support. Closes #113
+ * Fixed exit status. Closes #187
+ * Update commander. Closes #190
+
+0.8.1 / 2011-12-30
+==================
+
+ * Fixed reporting of uncaught exceptions. Closes #183
+ * Fixed error message defaulting [indutny]
+ * Changed mocha(1) from bash to node for windows [Nathan Rajlich]
+
+0.8.0 / 2011-12-28
+==================
+
+ * Added `XUnit` reporter [FeeFighters/visionmedia]
+ * Added `say(1)` notification support [Maciej Małecki]
+ * Changed: fail when done() is invoked with a non-Error. Closes #171
+ * Fixed `err.stack`, defaulting to message. Closes #180
+ * Fixed: `make tm` mkdir -p the dest. Closes #137
+ * Fixed mocha(1) --help bin name
+ * Fixed `-d` for `--debug` support
+
+0.7.1 / 2011-12-22
+==================
+
+ * Removed `mocha-debug(1)`, use `mocha --debug`
+ * Fixed CWD relative requires
+ * Fixed growl issue on windows [Raynos]
+ * Fixed: platform specific line endings [TooTallNate]
+ * Fixed: escape strings in HTML reporter. Closes #164
+
+0.7.0 / 2011-12-18
+==================
+
+ * Added support for IE{7,8} [guille]
+ * Changed: better browser nextTick implementation [guille]
+
+0.6.0 / 2011-12-18
+==================
+
+ * Added setZeroTimeout timeout for browser (nicer stack traces). Closes #153
+ * Added "view source" on hover for HTML reporter to make it obvious
+ * Changed: replace custom growl with growl lib
+ * Fixed duplicate reporting for HTML reporter. Closes #154
+ * Fixed silent hook errors in the HTML reporter. Closes #150
+
+0.5.0 / 2011-12-14
+==================
+
+ * Added: push node_modules directory onto module.paths for relative require Closes #93
+ * Added teamcity reporter [blindsey]
+ * Fixed: recover from uncaught exceptions for tests. Closes #94
+ * Fixed: only emit "test end" for uncaught within test, not hook
+
+0.4.0 / 2011-12-14
+==================
+
+ * Added support for test-specific timeouts via `this.timeout(0)`. Closes #134
+ * Added guillermo's client-side EventEmitter. Closes #132
+ * Added progress indicator to the HTML reporter
+ * Fixed slow browser tests. Closes #135
+ * Fixed "suite" color for light terminals
+ * Fixed `require()` leak spotted by [guillermo]
+
+0.3.6 / 2011-12-09
+==================
+
+ * Removed suite merging (for now)
+
+0.3.5 / 2011-12-08
+==================
+
+ * Added support for `window.onerror` [guillermo]
+ * Fixed: clear timeout on uncaught exceptions. Closes #131 [guillermo]
+ * Added `mocha.css` to PHONY list.
+ * Added `mocha.js` to PHONY list.
+
+0.3.4 / 2011-12-08
+==================
+
+ * Added: allow `done()` to be called with non-Error
+ * Added: return Runner from `mocha.run()`. Closes #126
+ * Fixed: run afterEach even on failures. Closes #125
+ * Fixed clobbering of current runnable. Closes #121
+
+0.3.3 / 2011-12-08
+==================
+
+ * Fixed hook timeouts. Closes #120
+ * Fixed uncaught exceptions in hooks
+
+0.3.2 / 2011-12-05
+==================
+
+ * Fixed weird reporting when `err.message` is not present
+
+0.3.1 / 2011-12-04
+==================
+
+ * Fixed hook event emitter leak. Closes #117
+ * Fixed: export `Spec` constructor. Closes #116
+
+0.3.0 / 2011-12-04
+==================
+
+ * Added `-w, --watch`. Closes #72
+ * Added `--ignore-leaks` to ignore global leak checking
+ * Added browser `?grep=pattern` support
+ * Added `--globals <names>` to specify accepted globals. Closes #99
+ * Fixed `mocha-debug(1)` on some systems. Closes #232
+ * Fixed growl total, use `runner.total`
+
+0.2.0 / 2011-11-30
+==================
+
+ * Added `--globals <names>` to specify accepted globals. Closes #99
+ * Fixed funky highlighting of messages. Closes #97
+ * Fixed `mocha-debug(1)`. Closes #232
+ * Fixed growl total, use runner.total
+
+0.1.0 / 2011-11-29
+==================
+
+ * Added `suiteSetup` and `suiteTeardown` to TDD interface [David Henderson]
+ * Added growl icons. Closes #84
+ * Fixed coffee-script support
+
+0.0.8 / 2011-11-25
+==================
+
+ * Fixed: use `Runner#total` for accurate reporting
+
+0.0.7 / 2011-11-25
+==================
+
+ * Added `Hook`
+ * Added `Runnable`
+ * Changed: `Test` is `Runnable`
+ * Fixed global leak reporting in hooks
+ * Fixed: > 2 calls to done() only report the error once
+ * Fixed: clear timer on failure. Closes #80
+
+0.0.6 / 2011-11-25
+==================
+
+ * Fixed return on immediate async error. Closes #80
+
+0.0.5 / 2011-11-24
+==================
+
+ * Fixed: make mocha.opts whitespace less picky [kkaefer]
+
+0.0.4 / 2011-11-24
+==================
+
+ * Added `--interfaces`
+ * Added `--reporters`
+ * Added `-c, --colors`. Closes #69
+ * Fixed hook timeouts
+
+0.0.3 / 2011-11-23
+==================
+
+ * Added `-C, --no-colors` to explicitly disable
+ * Added coffee-script support
+
+0.0.2 / 2011-11-22
+==================
+
+ * Fixed global leak detection due to Safari bind() change
+ * Fixed: escape html entities in Doc reporter
+ * Fixed: escape html entities in HTML reporter
+ * Fixed pending test support for HTML reporter. Closes #66
+
+0.0.1 / 2011-11-22
+==================
+
+ * Added `--timeout` second shorthand support, ex `--timeout 3s`.
+ * Fixed "test end" event for uncaughtExceptions. Closes #61
+
+0.0.1-alpha6 / 2011-11-19
+==================
+
+ * Added travis CI support (needs enabling when public)
+ * Added preliminary browser support
+ * Added `make mocha.css` target. Closes #45
+ * Added stack trace to TAP errors. Closes #52
+ * Renamed tearDown to teardown. Closes #49
+ * Fixed: cascading hooksc. Closes #30
+ * Fixed some colors for non-tty
+ * Fixed errors thrown in sync test-cases due to nextTick
+ * Fixed Base.window.width... again give precedence to 0.6.x
+
+0.0.1-alpha5 / 2011-11-17
+==================
+
+ * Added `doc` reporter. Closes #33
+ * Added suite merging. Closes #28
+ * Added TextMate bundle and `make tm`. Closes #20
+
+0.0.1-alpha4 / 2011-11-15
+==================
+
+ * Fixed getWindowSize() for 0.4.x
+
+0.0.1-alpha3 / 2011-11-15
+==================
+
+ * Added `-s, --slow <ms>` to specify "slow" test threshold
+ * Added `mocha-debug(1)`
+ * Added `mocha.opts` support. Closes #31
+ * Added: default [files] to _test/*.js_
+ * Added protection against multiple calls to `done()`. Closes #35
+ * Changed: bright yellow for slow Dot reporter tests
+
+0.0.1-alpha1 / 2011-11-08
+==================
+
+ * Missed this one :)
+
+0.0.1-alpha1 / 2011-11-08
+==================
+
+ * Initial release
View
22 node_modules/mocha/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 20011-2012 TJ Holowaychuk <tj@vision-media.ca>
+
+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.
View
120 node_modules/mocha/Makefile
@@ -0,0 +1,120 @@
+
+REPORTER ?= dot
+TM_DEST = ~/Library/Application\ Support/TextMate/Bundles
+TM_BUNDLE = JavaScript\ mocha.tmbundle
+SRC = $(shell find lib -name "*.js" -type f | sort)
+SUPPORT = $(wildcard support/*.js)
+
+all: mocha.js
+
+mocha.js: $(SRC) $(SUPPORT)
+ @node support/compile $(SRC)
+ @cat \
+ support/head.js \
+ _mocha.js \
+ support/tail.js \
+ support/foot.js \
+ > mocha.js
+
+clean:
+ rm -f mocha.js
+ rm -fr lib-cov
+ rm -f coverage.html
+
+test-cov: lib-cov
+ @COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
+
+lib-cov:
+ @rm -fr ./$@
+ @jscoverage lib $@
+
+test: test-unit
+
+test-all: test-bdd test-tdd test-qunit test-exports test-unit test-grep test-jsapi test-compilers
+
+test-jsapi:
+ @node test/jsapi
+
+test-unit:
+ @./bin/mocha \
+ --reporter $(REPORTER) \
+ test/acceptance/*.js \
+ test/*.js
+
+test-compilers:
+ @./bin/mocha \
+ --reporter $(REPORTER) \
+ --compilers coffee:coffee-script,foo:./test/compiler/foo \
+ test/acceptance/test.coffee \
+ test/acceptance/test.foo
+
+test-bdd:
+ @./bin/mocha \
+ --reporter $(REPORTER) \
+ --ui bdd \
+ test/acceptance/interfaces/bdd
+
+test-tdd:
+ @./bin/mocha \
+ --reporter $(REPORTER) \
+ --ui tdd \
+ test/acceptance/interfaces/tdd
+
+test-qunit:
+ @./bin/mocha \
+ --reporter $(REPORTER) \
+ --ui qunit \
+ test/acceptance/interfaces/qunit
+
+test-exports:
+ @./bin/mocha \
+ --reporter $(REPORTER) \
+ --ui exports \
+ test/acceptance/interfaces/exports
+
+test-grep:
+ @./bin/mocha \
+ --reporter $(REPORTER) \
+ --grep fast \
+ test/acceptance/misc/grep
+
+test-invert:
+ @./bin/mocha \
+ --reporter $(REPORTER) \
+ --grep slow \
+ --invert \
+ test/acceptance/misc/grep
+
+test-bail:
+ @./bin/mocha \
+ --reporter $(REPORTER) \
+ --bail \
+ test/acceptance/misc/bail
+
+non-tty:
+ @./bin/mocha \
+ --reporter dot \
+ test/acceptance/interfaces/bdd 2>&1 > /tmp/dot.out
+
+ @echo dot:
+ @cat /tmp/dot.out
+
+ @./bin/mocha \
+ --reporter list \
+ test/acceptance/interfaces/bdd 2>&1 > /tmp/list.out
+
+ @echo list:
+ @cat /tmp/list.out
+
+ @./bin/mocha \
+ --reporter spec \
+ test/acceptance/interfaces/bdd 2>&1 > /tmp/spec.out
+
+ @echo spec:
+ @cat /tmp/spec.out
+
+tm:
+ mkdir -p $(TM_DEST)
+ cp -fr editors/$(TM_BUNDLE) $(TM_DEST)
+
+.PHONY: test-cov test-jsapi test-compilers watch test test-all test-bdd test-tdd test-qunit test-exports test-unit non-tty test-grep tm clean
View
41 node_modules/mocha/Readme.md
@@ -0,0 +1,41 @@
+ [![Build Status](https://secure.travis-ci.org/visionmedia/mocha.png)](http://travis-ci.org/visionmedia/mocha)
+
+ [![Mocha test framework](http://f.cl.ly/items/3l1k0n2A1U3M1I1L210p/Screen%20Shot%202012-02-24%20at%202.21.43%20PM.png)](http://visionmedia.github.com/mocha)
+
+ Mocha is a simple, flexible, fun JavaScript test framework for node.js and the browser. For more information view the [documentation](http://visionmedia.github.com/mocha).
+
+## Contributors
+
+```
+project: mocha
+commits: 502
+files : 86
+authors:
+ 352 Tj Holowaychuk 70.1%
+ 98 TJ Holowaychuk 19.5%
+ 21 Guillermo Rauch 4.2%
+ 6 James Carr 1.2%
+ 4 Joshua Krall 0.8%
+ 3 Ben Lindsey 0.6%
+ 3 Nathan Rajlich 0.6%
+ 2 FARKAS Máté 0.4%
+ 2 Quang Van 0.4%
+ 1 Steve Mason 0.2%
+ 1 Yuest Wang 0.2%
+ 1 hokaccha 0.2%
+ 1 David Henderson 0.2%
+ 1 Fedor Indutny 0.2%
+ 1 Fredrik Lindin 0.2%
+ 1 Harry Brundage 0.2%
+ 1 Konstantin Käfer 0.2%
+ 1 Maciej Małecki 0.2%
+ 1 Raynos 0.2%
+ 1 Ryunosuke SATO 0.2%
+```
+
+## Links
+
+ - [Chai](https://github.com/chaijs/chai) - BDD, TDD, and assert for node & the browser
+ - [Should.js](http://github.com/visionmedia/should.js) - BDD style assertions for node
+ - [Expect.js](https://github.com/LearnBoost/expect.js) - BDD style assertions for node & the browser
+ - [Google Group](http://groups.google.com/group/mochajs)
View
4,793 node_modules/mocha/_mocha.js
4,793 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
417 node_modules/mocha/bin/_mocha
@@ -0,0 +1,417 @@
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var program = require('commander')
+ , exec = require('child_process').exec
+ , path = require('path')
+ , fs = require('fs')
+ , vm = require('vm')
+ , resolve = path.resolve
+ , exists = fs.existsSync || path.existsSync
+ , Mocha = require('../')
+ , utils = Mocha.utils
+ , reporters = Mocha.reporters
+ , interfaces = Mocha.interfaces
+ , Base = reporters.Base
+ , join = path.join
+ , basename = path.basename
+ , cwd = process.cwd()
+ , mocha = new Mocha;
+
+/**
+ * Save timer references to avoid Sinon interfering (see GH-237).
+ */
+
+var Date = global.Date
+ , setTimeout = global.setTimeout
+ , setInterval = global.setInterval
+ , clearTimeout = global.clearTimeout
+ , clearInterval = global.clearInterval;
+
+/**
+ * Files.
+ */
+
+var files = [];
+
+/**
+ * Globals.
+ */
+
+var globals = [];
+
+/**
+ * Images.
+ */
+
+var images = {
+ fail: __dirname + '/../images/error.png'
+ , pass: __dirname + '/../images/ok.png'
+};
+
+// options
+
+program
+ .version(JSON.parse(fs.readFileSync(__dirname + '/../package.json', 'utf8')).version)
+ .usage('[debug] [options] [files]')
+ .option('-r, --require <name>', 'require the given module')
+ .option('-R, --reporter <name>', 'specify the reporter to use', 'dot')
+ .option('-u, --ui <name>', 'specify user-interface (bdd|tdd|exports)', 'bdd')
+ .option('-g, --grep <pattern>', 'only run tests matching <pattern>')
+ .option('-i, --invert', 'inverts --grep matches')
+ .option('-t, --timeout <ms>', 'set test-case timeout in milliseconds [2000]')
+ .option('-s, --slow <ms>', '"slow" test threshold in milliseconds [75]')
+ .option('-w, --watch', 'watch files for changes')
+ .option('-c, --colors', 'force enabling of colors')
+ .option('-C, --no-colors', 'force disabling of colors')
+ .option('-G, --growl', 'enable growl notification support')
+ .option('-d, --debug', "enable node's debugger, synonym for node --debug")
+ .option('-b, --bail', "bail after first test failure")
+ .option('--recursive', 'include sub directories')
+ .option('--debug-brk', "enable node's debugger breaking on the first line")
+ .option('--globals <names>', 'allow the given comma-delimited global [names]', list, [])
+ .option('--ignore-leaks', 'ignore global variable leaks')
+ .option('--interfaces', 'display available interfaces')
+ .option('--reporters', 'display available reporters')
+ .option('--compilers <ext>:<module>,...', 'use the given module(s) to compile files', list, [])
+
+program.name = 'mocha';
+
+// init command
+
+program
+ .command('init <path>')
+ .description('initialize a client-side mocha setup at <path>')
+ .action(function(path){
+ var mkdir = require('mkdirp');
+ mkdir.sync(path);
+ var css = fs.readFileSync(join(__dirname, '..', 'mocha.css'));
+ var js = fs.readFileSync(join(__dirname, '..', 'mocha.js'));
+ var tmpl = fs.readFileSync(join(__dirname, '..', 'lib/template.html'));
+ fs.writeFileSync(join(path, 'mocha.css'), css);
+ fs.writeFileSync(join(path, 'mocha.js'), js);
+ fs.writeFileSync(join(path, 'tests.html'), tmpl);
+ process.exit(0);
+ });
+
+// --globals
+
+program.on('globals', function(val){
+ globals = globals.concat(list(val));
+});
+
+// --reporters
+
+program.on('reporters', function(){
+ console.log();
+ console.log(' dot - dot matrix');
+ console.log(' doc - html documentation');
+ console.log(' spec - hierarchical spec list');
+ console.log(' json - single json object');
+ console.log(' progress - progress bar');
+ console.log(' list - spec-style listing');
+ console.log(' tap - test-anything-protocol');
+ console.log(' landing - unicode landing strip');
+ console.log(' xunit - xunit reportert');
+ console.log(' teamcity - teamcity ci support');
+ console.log(' html-cov - HTML test coverage');
+ console.log(' json-cov - JSON test coverage');
+ console.log(' min - minimal reporter (great with --watch)');
+ console.log(' json-stream - newline delimited json events');
+ console.log(' markdown - markdown documentation (github flavour)');
+ console.log(' nyan - nyan cat!');
+ console.log();
+ process.exit();
+});
+
+// --interfaces
+
+program.on('interfaces', function(){
+ console.log('');
+ console.log(' bdd');
+ console.log(' tdd');
+ console.log(' qunit');
+ console.log(' exports');
+ console.log('');
+ process.exit();
+});
+
+// -r, --require
+
+module.paths.push(cwd, join(cwd, 'node_modules'));
+
+program.on('require', function(mod){
+ var abs = exists(mod)
+ || exists(mod + '.js');
+
+ if (abs) mod = join(cwd, mod);
+ require(mod);
+});
+
+// mocha.opts support
+
+try {
+ var opts = fs.readFileSync('test/mocha.opts', 'utf8')
+ .trim()
+ .split(/\s+/);
+
+ process.argv = process.argv
+ .slice(0, 2)
+ .concat(opts.concat(process.argv.slice(2)));
+} catch (err) {
+ // ignore
+}
+
+// parse args
+
+program.parse(process.argv);
+
+// infinite stack traces
+
+Error.stackTraceLimit = Infinity; // TODO: config
+
+// reporter
+
+mocha.reporter(program.reporter);
+
+// interface
+
+mocha.ui(program.ui);
+
+// load reporter
+
+try {
+ Reporter = require('../lib/reporters/' + program.reporter);
+} catch (err) {
+ try {
+ Reporter = require(program.reporter);
+ } catch (err) {
+ throw new Error('reporter "' + program.reporter + '" does not exist');
+ }
+}
+
+// --no-colors
+
+if (!program.colors) Base.useColors = false;
+
+// --colors
+
+if (~process.argv.indexOf('--colors') ||
+ ~process.argv.indexOf('-c')) {
+ Base.useColors = true;
+}
+
+// --slow <ms>
+
+if (program.slow) mocha.suite.slow(program.slow);
+
+// --timeout
+
+if (program.timeout) mocha.suite.timeout(program.timeout);
+
+// --bail
+
+mocha.suite.bail(program.bail);
+
+// --grep
+
+if (program.grep) mocha.grep(new RegExp(program.grep));
+
+// --invert
+
+if (program.invert) mocha.invert();
+
+// --ignore-leaks
+
+if (program.ignoreLeaks) mocha.ignoreLeaks();
+
+// --growl
+
+if (program.growl) mocha.growl();
+
+// --globals
+
+mocha.globals(globals);
+
+// custom compiler support
+
+var extensions = ['js'];
+program.compilers.forEach(function(c) {
+ var compiler = c.split(':')
+ , ext = compiler[0]
+ , mod = compiler[1];
+
+ if (mod[0] == '.') mod = join(process.cwd(), mod);
+ require(mod);
+ extensions.push(ext);
+});
+
+var re = new RegExp('\\.(' + extensions.join('|') + ')$');
+
+// files
+
+var files = []
+ , args = program.args;
+
+// default files to test/*.{js,coffee}
+
+if (!args.length) args.push('test');
+
+args.forEach(function(arg){
+ files = files.concat(lookupFiles(arg, program.recursive));
+});
+
+// resolve
+
+files = files.map(function(path){
+ return resolve(path);
+});
+
+// --watch
+
+if (program.watch) {
+ console.log();
+ hideCursor();
+ process.on('SIGINT', function(){
+ showCursor();
+ console.log('\n');
+ process.exit();
+ });
+
+ var frames = [
+ ' \u001b[96m◜ \u001b[90mwatching\u001b[0m'
+ , ' \u001b[96m◠ \u001b[90mwatching\u001b[0m'
+ , ' \u001b[96m◝ \u001b[90mwatching\u001b[0m'
+ , ' \u001b[96m◞ \u001b[90mwatching\u001b[0m'
+ , ' \u001b[96m◡ \u001b[90mwatching\u001b[0m'
+ , ' \u001b[96m◟ \u001b[90mwatching\u001b[0m'
+ ];
+
+ var watchFiles = utils.files(cwd);
+
+ function loadAndRun() {
+ mocha.files = files;
+ mocha.run(function(){
+ play(frames);
+ });
+ }
+
+ function purge() {
+ watchFiles.forEach(function(file){
+ delete require.cache[file];
+ });
+ }
+
+ loadAndRun();
+
+ utils.watch(watchFiles, function(){
+ purge();
+ stop()
+ mocha.suite = mocha.suite.clone();
+ mocha.ui(program.ui);
+ loadAndRun();
+ });
+
+ return;
+}
+
+// load
+
+mocha.files = files;
+mocha.run(process.exit);
+
+// enable growl notifications
+
+function growl(runner, reporter) {
+ var notify = require('growl');
+
+ runner.on('end', function(){
+ var stats = reporter.stats;
+ if (stats.failures) {
+ var msg = stats.failures + ' of ' + runner.total + ' tests failed';
+ notify(msg, { name: 'mocha', title: 'Failed', image: images.fail });
+ } else {
+ notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', {
+ name: 'mocha'
+ , title: 'Passed'
+ , image: images.pass
+ });
+ }
+ });
+}
+
+/**
+ * Parse list.
+ */
+
+function list(str) {
+ return str.split(/ *, */);
+}
+
+/**
+ * Hide the cursor.
+ */
+
+function hideCursor(){
+ process.stdout.write('\u001b[?25l');
+};
+
+/**
+ * Show the cursor.
+ */
+
+function showCursor(){
+ process.stdout.write('\u001b[?25h');
+};
+
+/**
+ * Stop play()ing.
+ */
+
+function stop() {
+ process.stdout.write('\u001b[2K');
+ clearInterval(play.timer);
+}
+
+/**
+ * Lookup file names at the given `path`.
+ */
+
+function lookupFiles(path, recursive) {
+ var files = [];
+
+ if (!exists(path)) path += '.js';
+ var stat = fs.statSync(path);
+ if (stat.isFile()) return path;
+
+ fs.readdirSync(path).forEach(function(file){
+ file = join(path, file);
+ var stat = fs.statSync(file);
+ if (stat.isDirectory()) {
+ if (recursive) files = files.concat(lookupFiles(file, recursive));
+ return
+ }
+ if (!stat.isFile() || !re.test(file) || basename(file)[0] == '.') return;
+ files.push(file);
+ });
+
+ return files;
+}
+
+/**
+ * Play the given array of strings.
+ */
+
+function play(arr, interval) {
+ var len = arr.length
+ , interval = interval || 100
+ , i = 0;
+
+ play.timer = setInterval(function(){
+ var str = arr[i++ % len];
+ process.stdout.write('\r' + str);
+ }, interval);
+}
View
47 node_modules/mocha/bin/mocha
@@ -0,0 +1,47 @@
+#!/usr/bin/env node
+
+/**
+ * This tiny wrapper file checks for known node flags and appends them
+ * when found, before invoking the "real" _mocha(1) executable.
+ */
+
+var spawn = require('child_process').spawn
+ , args = [ __dirname + '/_mocha' ];
+
+process.argv.slice(2).forEach(function (arg) {
+ switch (arg) {
+ case '-d':
+ args.unshift('--debug');
+ break;
+ case 'debug':
+ case '--debug':
+ case '--debug-brk':
+ args.unshift(arg);
+ break;
+ case '-gc':
+ case '--expose-gc':
+ args.unshift('--expose-gc');
+ break;
+ case '--gc-global':
+ case '--harmony':
+ case '--harmony-proxies':
+ case '--harmony-collections':
+ args.unshift(arg);
+ break;
+ default:
+ if (0 == arg.indexOf('--trace')) args.unshift(arg);
+ else args.push(arg);
+ break;
+ }
+});
+
+var proc = spawn(process.argv[0], args, { customFds: [0,1,2] });
+proc.on('exit', function (code, signal) {
+ process.on('exit', function(){
+ if (signal) {
+ process.kill(process.pid, signal);
+ } else {
+ process.exit(code);
+ }
+ });
+});
View
9 node_modules/mocha/component.json
@@ -0,0 +1,9 @@
+{
+ "name": "mocha",
+ "repo": "visionmedia/mocha",
+ "version": "1.6.0",
+ "description": "simple, flexible, fun test framework",
+ "keywords": ["test", "mocha", "bdd", "tdd"],
+ "styles": ["mocha.css"],
+ "scripts": []
+}
View
BIN node_modules/mocha/images/error.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN node_modules/mocha/images/ok.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
4 node_modules/mocha/index.js
@@ -0,0 +1,4 @@
+
+module.exports = process.env.COV
+ ? require('./lib-cov/mocha')
+ : require('./lib/mocha');
View
6 node_modules/mocha/lib/browser/debug.js
@@ -0,0 +1,6 @@
+
+module.exports = function(type){
+ return function(){
+
+ }
+};
View
0 node_modules/mocha/lib/browser/diff.js
No changes.
View
178 node_modules/mocha/lib/browser/events.js
@@ -0,0 +1,178 @@
+
+/**
+ * Module exports.
+ */
+
+exports.EventEmitter = EventEmitter;
+
+/**
+ * Check if `obj` is an array.
+ */
+
+function isArray(obj) {
+ return '[object Array]' == {}.toString.call(obj);
+}
+
+/**
+ * Event emitter constructor.
+ *
+ * @api public
+ */
+
+function EventEmitter(){};
+
+/**
+ * Adds a listener.
+ *
+ * @api public
+ */
+
+EventEmitter.prototype.on = function (name, fn) {
+ if (!this.$events) {
+ this.$events = {};
+ }
+
+ if (!this.$events[name]) {
+ this.$events[name] = fn;
+ } else if (isArray(this.$events[name])) {
+ this.$events[name].push(fn);
+ } else {
+ this.$events[name] = [this.$events[name], fn];
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.addListener = EventEmitter.prototype.on;
+
+/**
+ * Adds a volatile listener.
+ *
+ * @api public
+ */
+
+EventEmitter.prototype.once = function (name, fn) {
+ var self = this;
+
+ function on () {
+ self.removeListener(name, on);
+ fn.apply(this, arguments);
+ };
+
+ on.listener = fn;
+ this.on(name, on);
+
+ return this;
+};
+
+/**
+ * Removes a listener.
+ *
+ * @api public
+ */
+
+EventEmitter.prototype.removeListener = function (name, fn) {
+ if (this.$events && this.$events[name]) {
+ var list = this.$events[name];
+
+ if (isArray(list)) {
+ var pos = -1;
+
+ for (var i = 0, l = list.length; i < l; i++) {
+ if (list[i] === fn || (list[i].listener && list[i].listener === fn)) {
+ pos = i;
+ break;
+ }
+ }
+
+ if (pos < 0) {
+ return this;
+ }
+
+ list.splice(pos, 1);
+
+ if (!list.length) {
+ delete this.$events[name];
+ }
+ } else if (list === fn || (list.listener && list.listener === fn)) {
+ delete this.$events[name];
+ }
+ }
+
+ return this;
+};
+
+/**
+ * Removes all listeners for an event.
+ *
+ * @api public
+ */
+
+EventEmitter.prototype.removeAllListeners = function (name) {
+ if (name === undefined) {
+ this.$events = {};
+ return this;
+ }
+
+ if (this.$events && this.$events[name]) {
+ this.$events[name] = null;
+ }
+
+ return this;
+};
+
+/**
+ * Gets all listeners for a certain event.
+ *
+ * @api public
+ */
+
+EventEmitter.prototype.listeners = function (name) {
+ if (!this.$events) {
+ this.$events = {};
+ }
+
+ if (!this.$events[name]) {
+ this.$events[name] = [];
+ }
+
+ if (!isArray(this.$events[name])) {
+ this.$events[name] = [this.$events[name]];
+ }
+
+ return this.$events[name];
+};
+
+/**
+ * Emits an event.
+ *
+ * @api public
+ */
+
+EventEmitter.prototype.emit = function (name) {
+ if (!this.$events) {
+ return false;
+ }
+
+ var handler = this.$events[name];
+
+ if (!handler) {
+ return false;
+ }
+
+ var args = [].slice.call(arguments, 1);
+
+ if ('function' == typeof handler) {
+ handler.apply(this, args);
+ } else if (isArray(handler)) {
+ var listeners = handler.slice();
+
+ for (var i = 0, l = listeners.length; i < l; i++) {
+ listeners[i].apply(this, args);
+ }
+ } else {
+ return false;
+ }
+
+ return true;
+};
View
0 node_modules/mocha/lib/browser/fs.js
No changes.
View
0 node_modules/mocha/lib/browser/path.js
No changes.
View
125 node_modules/mocha/lib/browser/progress.js
@@ -0,0 +1,125 @@
+
+/**
+ * Expose `Progress`.
+ */
+
+module.exports = Progress;
+
+/**
+ * Initialize a new `Progress` indicator.
+ */
+
+function Progress() {
+ this.percent = 0;
+ this.size(0);
+ this.fontSize(11);
+ this.font('helvetica, arial, sans-serif');
+}
+
+/**
+ * Set progress size to `n`.
+ *
+ * @param {Number} n
+ * @return {Progress} for chaining
+ * @api public
+ */
+
+Progress.prototype.size = function(n){
+ this._size = n;
+ return this;
+};
+
+/**
+ * Set text to `str`.
+ *
+ * @param {String} str
+ * @return {Progress} for chaining
+ * @api public
+ */
+
+Progress.prototype.text = function(str){
+ this._text = str;
+ return this;
+};
+
+/**
+ * Set font size to `n`.
+ *
+ * @param {Number} n
+ * @return {Progress} for chaining
+ * @api public
+ */
+
+Progress.prototype.fontSize = function(n){
+ this._fontSize = n;
+ return this;
+};
+
+/**
+ * Set font `family`.
+ *
+ * @param {String} family
+ * @return {Progress} for chaining
+ */
+
+Progress.prototype.font = function(family){
+ this._font = family;
+ return this;
+};
+
+/**
+ * Update percentage to `n`.
+ *
+ * @param {Number} n
+ * @return {Progress} for chaining
+ */
+
+Progress.prototype.update = function(n){
+ this.percent = n;
+ return this;
+};
+
+/**
+ * Draw on `ctx`.
+ *
+ * @param {CanvasRenderingContext2d} ctx
+ * @return {Progress} for chaining
+ */
+
+Progress.prototype.draw = function(ctx){
+ var percent = Math.min(this.percent, 100)
+ , size = this._size
+ , half = size / 2
+ , x = half
+ , y = half
+ , rad = half - 1
+ , fontSize = this._fontSize;
+
+ ctx.font = fontSize + 'px ' + this._font;
+
+ var angle = Math.PI * 2 * (percent / 100);
+ ctx.clearRect(0, 0, size, size);
+
+ // outer circle
+ ctx.strokeStyle = '#9f9f9f';
+ ctx.beginPath();
+ ctx.arc(x, y, rad, 0, angle, false);
+ ctx.stroke();
+
+ // inner circle
+ ctx.strokeStyle = '#eee';
+ ctx.beginPath();
+ ctx.arc(x, y, rad - 1, 0, angle, true);
+ ctx.stroke();
+
+ // text
+ var text = this._text || (percent | 0) + '%'
+ , w = ctx.measureText(text).width;
+
+ ctx.fillText(
+ text
+ , x - w / 2 + 1
+ , y + fontSize / 2 - 1);
+
+ return this;
+};
View
8 node_modules/mocha/lib/browser/tty.js
@@ -0,0 +1,8 @@
+
+exports.isatty = function(){
+ return true;
+};
+
+exports.getWindowSize = function(){
+ return [window.innerHeight, window.innerWidth];
+};
View
69 node_modules/mocha/lib/context.js
@@ -0,0 +1,69 @@
+
+/**
+ * Expose `Context`.
+ */
+
+module.exports = Context;
+
+/**
+ * Initialize a new `Context`.
+ *
+ * @api private
+ */
+
+function Context(){}
+
+/**
+ * Set or get the context `Runnable` to `runnable`.
+ *
+ * @param {Runnable} runnable
+ * @return {Context}
+ * @api private
+ */
+
+Context.prototype.runnable = function(runnable){
+ if (0 == arguments.length) return this._runnable;
+ this.test = this._runnable = runnable;
+ return this;
+};
+
+/**
+ * Set test timeout `ms`.
+ *
+ * @param {Number} ms
+ * @return {Context} self
+ * @api private
+ */
+
+Context.prototype.timeout = function(ms){
+ this.runnable().timeout(ms);
+ return this;
+};
+
+/**
+ * Set test slowness threshold `ms`.
+ *
+ * @param {Number} ms
+ * @return {Context} self
+ * @api private
+ */
+
+Context.prototype.slow = function(ms){
+ this.runnable().slow(ms);
+ return this;
+};
+
+/**
+ * Inspect the context void of `._runnable`.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Context.prototype.inspect = function(){
+ return JSON.stringify(this, function(key, val){
+ if ('_runnable' == key) return;
+ if ('test' == key) return;
+ return val;
+ }, 2);
+};
View
50 node_modules/mocha/lib/hook.js
@@ -0,0 +1,50 @@
+
+/**
+ * Module dependencies.
+ */
+
+var Runnable = require('./runnable');
+
+/**
+ * Expose `Hook`.
+ */
+
+module.exports = Hook;
+
+/**
+ * Initialize a new `Hook` with the given `title` and callback `fn`.
+ *
+ * @param {String} title
+ * @param {Function} fn
+ * @api private
+ */
+
+function Hook(title, fn) {
+ Runnable.call(this, title, fn);
+ this.type = 'hook';
+}
+
+/**
+ * Inherit from `Runnable.prototype`.
+ */
+
+Hook.prototype.__proto__ = Runnable.prototype;
+
+/**
+ * Get or set the test `err`.
+ *
+ * @param {Error} err
+ * @return {Error}
+ * @api public
+ */
+
+Hook.prototype.error = function(err){
+ if (0 == arguments.length) {
+ var err = this._error;
+ this._error = null;
+ return err;
+ }
+
+ this._error = err;
+};
+
View
133 node_modules/mocha/lib/interfaces/bdd.js
@@ -0,0 +1,133 @@
+
+/**
+ * Module dependencies.
+ */
+
+var Suite = require('../suite')
+ , Test = require('../test');
+
+/**
+ * BDD-style interface:
+ *
+ * describe('Array', function(){
+ * describe('#indexOf()', function(){
+ * it('should return -1 when not present', function(){
+ *
+ * });
+ *
+ * it('should return the index when present', function(){
+ *
+ * });
+ * });
+ * });
+ *
+ */
+
+module.exports = function(suite){
+ var suites = [suite];
+
+ suite.on('pre-require', function(context, file, mocha){
+
+ /**
+ * Execute before running tests.
+ */
+
+ context.before = function(fn){
+ suites[0].beforeAll(fn);
+ };
+
+ /**
+ * Execute after running tests.
+ */
+
+ context.after = function(fn){
+ suites[0].afterAll(fn);
+ };
+
+ /**
+ * Execute before each test case.
+ */
+
+ context.beforeEach = function(fn){
+ suites[0].beforeEach(fn);
+ };
+
+ /**
+ * Execute after each test case.
+ */
+
+ context.afterEach = function(fn){
+ suites[0].afterEach(fn);
+ };
+
+ /**
+ * Describe a "suite" with the given `title`
+ * and callback `fn` containing nested suites
+ * and/or tests.
+ */
+
+ context.describe = context.context = function(title, fn){
+ var suite = Suite.create(suites[0], title);
+ suites.unshift(suite);
+ fn();
+ suites.shift();
+ return suite;
+ };
+
+ /**
+ * Pending describe.
+ */
+
+ context.xdescribe =
+ context.xcontext =
+ context.describe.skip = function(title, fn){
+ var suite = Suite.create(suites[0], title);
+ suite.pending = true;
+ suites.unshift(suite);
+ fn();
+ suites.shift();
+ };
+
+ /**
+ * Exclusive suite.
+ */
+
+ context.describe.only = function(title, fn){
+ var suite = context.describe(title, fn);
+ mocha.grep(suite.fullTitle());
+ };
+
+ /**
+ * Describe a specification or test-case
+ * with the given `title` and callback `fn`
+ * acting as a thunk.
+ */
+
+ context.it = context.specify = function(title, fn){
+ var suite = suites[0];
+ if (suite.pending) var fn = null;
+ var test = new Test(title, fn);
+ suite.addTest(test);
+ return test;
+ };
+
+ /**
+ * Exclusive test-case.
+ */
+
+ context.it.only = function(title, fn){
+ var test = context.it(title, fn);
+ mocha.grep(test.fullTitle());
+ };
+
+ /**
+ * Pending test case.
+ */
+
+ context.xit =
+ context.xspecify =
+ context.it.skip = function(title){
+ context.it(title);
+ };
+ });
+};
View
60 node_modules/mocha/lib/interfaces/exports.js
@@ -0,0 +1,60 @@
+
+/**
+ * Module dependencies.
+ */
+
+var Suite = require('../suite')
+ , Test = require('../test');
+
+/**
+ * TDD-style interface:
+ *
+ * exports.Array = {
+ * '#indexOf()': {
+ * 'should return -1 when the value is not present': function(){
+ *
+ * },
+ *
+ * 'should return the correct index when the value is present': function(){
+ *
+ * }
+ * }
+ * };
+ *
+ */
+
+module.exports = function(suite){
+ var suites = [suite];
+
+ suite.on('require', visit);
+
+ function visit(obj) {
+ var suite;
+ for (var key in obj) {
+ if ('function' == typeof obj[key]) {
+ var fn = obj[key];
+ switch (key) {
+ case 'before':
+ suites[0].beforeAll(fn);
+ break;
+ case 'after':
+ suites[0].afterAll(fn);
+ break;
+ case 'beforeEach':
+ suites[0].beforeEach(fn);
+ break;
+ case 'afterEach':
+ suites[0].afterEach(fn);
+ break;
+ default:
+ suites[0].addTest(new Test(key, fn));
+ }
+ } else {
+ var suite = Suite.create(suites[0], key);
+ suites.unshift(suite);
+ visit(obj[key]);
+ suites.shift();
+ }
+ }
+ }
+};
View
5 node_modules/mocha/lib/interfaces/index.js
@@ -0,0 +1,5 @@
+
+exports.bdd = require('./bdd');
+exports.tdd = require('./tdd');
+exports.qunit = require('./qunit');
+exports.exports = require('./exports');
View
91 node_modules/mocha/lib/interfaces/qunit.js
@@ -0,0 +1,91 @@
+
+/**
+ * Module dependencies.
+ */
+
+var Suite = require('../suite')
+ , Test = require('../test');
+
+/**
+ * QUnit-style interface:
+ *
+ * suite('Array');
+ *
+ * test('#length', function(){
+ * var arr = [1,2,3];
+ * ok(arr.length == 3);
+ * });
+ *
+ * test('#indexOf()', function(){
+ * var arr = [1,2,3];
+ * ok(arr.indexOf(1) == 0);
+ * ok(arr.indexOf(2) == 1);
+ * ok(arr.indexOf(3) == 2);
+ * });
+ *
+ * suite('String');
+ *
+ * test('#length', function(){
+ * ok('foo'.length == 3);
+ * });
+ *
+ */
+
+module.exports = function(suite){
+ var suites = [suite];
+
+ suite.on('pre-require', function(context){
+
+ /**
+ * Execute before running tests.
+ */
+
+ context.before = function(fn){
+ suites[0].beforeAll(fn);
+ };
+
+ /**
+ * Execute after running tests.
+ */
+
+ context.after = function(fn){
+ suites[0].afterAll(fn);
+ };
+
+ /**
+ * Execute before each test case.
+ */
+
+ context.beforeEach = function(fn){
+ suites[0].beforeEach(fn);
+ };
+
+ /**
+ * Execute after each test case.
+ */
+
+ context.afterEach = function(fn){
+ suites[0].afterEach(fn);
+ };
+
+ /**
+ * Describe a "suite" with the given `title`.
+ */
+
+ context.suite = function(title){
+ if (suites.length > 1) suites.shift();
+ var suite = Suite.create(suites[0], title);
+ suites.unshift(suite);
+ };
+
+ /**
+ * Describe a specification or test-case
+ * with the given `title` and callback `fn`
+ * acting as a thunk.
+ */
+
+ context.test = function(title, fn){
+ suites[0].addTest(new Test(title, fn));
+ };
+ });
+};
View
115 node_modules/mocha/lib/interfaces/tdd.js
@@ -0,0 +1,115 @@
+
+/**
+ * Module dependencies.
+ */
+
+var Suite = require('../suite')
+ , Test = require('../test');
+
+/**
+ * TDD-style interface:
+ *
+ * suite('Array', function(){
+ * suite('#indexOf()', function(){
+ * suiteSetup(function(){
+ *
+ * });
+ *
+ * test('should return -1 when not present', function(){
+ *
+ * });
+ *
+ * test('should return the index when present', function(){
+ *
+ * });
+ *
+ * suiteTeardown(function(){
+ *
+ * });
+ * });
+ * });
+ *
+ */