Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

first commit

  • Loading branch information...
commit d3adfe9ed7321c636d39370f86a14059f681e3be 1 parent 306444a
@weepy authored
Showing with 46,560 additions and 0 deletions.
  1. BIN  .DS_Store
  2. +2 −0  .gitignore
  3. 0  History.md
  4. +16 −0 Makefile
  5. +18 −0 component.json
  6. +84 −0 index.js
  7. +1 −0  node_modules/.bin/_mocha
  8. +1 −0  node_modules/.bin/mocha
  9. +6 −0 node_modules/mocha/.npmignore
  10. +5 −0 node_modules/mocha/.travis.yml
  11. +472 −0 node_modules/mocha/History.md
  12. +22 −0 node_modules/mocha/LICENSE
  13. +126 −0 node_modules/mocha/Makefile
  14. +42 −0 node_modules/mocha/Readme.md
  15. +4,880 −0 node_modules/mocha/_mocha.js
  16. +422 −0 node_modules/mocha/bin/_mocha
  17. +47 −0 node_modules/mocha/bin/mocha
  18. +9 −0 node_modules/mocha/component.json
  19. BIN  node_modules/mocha/images/error.png
  20. BIN  node_modules/mocha/images/ok.png
  21. +4 −0 node_modules/mocha/index.js
  22. +6 −0 node_modules/mocha/lib/browser/debug.js
  23. 0  node_modules/mocha/lib/browser/diff.js
  24. +178 −0 node_modules/mocha/lib/browser/events.js
  25. 0  node_modules/mocha/lib/browser/fs.js
  26. 0  node_modules/mocha/lib/browser/path.js
  27. +125 −0 node_modules/mocha/lib/browser/progress.js
  28. +8 −0 node_modules/mocha/lib/browser/tty.js
  29. +69 −0 node_modules/mocha/lib/context.js
  30. +50 −0 node_modules/mocha/lib/hook.js
  31. +133 −0 node_modules/mocha/lib/interfaces/bdd.js
  32. +60 −0 node_modules/mocha/lib/interfaces/exports.js
  33. +5 −0 node_modules/mocha/lib/interfaces/index.js
  34. +91 −0 node_modules/mocha/lib/interfaces/qunit.js
  35. +123 −0 node_modules/mocha/lib/interfaces/tdd.js
  36. +301 −0 node_modules/mocha/lib/mocha.js
  37. +81 −0 node_modules/mocha/lib/ms.js
  38. +381 −0 node_modules/mocha/lib/reporters/base.js
  39. +56 −0 node_modules/mocha/lib/reporters/doc.js
  40. +62 −0 node_modules/mocha/lib/reporters/dot.js
  41. +51 −0 node_modules/mocha/lib/reporters/html-cov.js
  42. +255 −0 node_modules/mocha/lib/reporters/html.js
  43. +19 −0 node_modules/mocha/lib/reporters/index.js
  44. +153 −0 node_modules/mocha/lib/reporters/json-cov.js
  45. +61 −0 node_modules/mocha/lib/reporters/json-stream.js
  46. +70 −0 node_modules/mocha/lib/reporters/json.js
  47. +97 −0 node_modules/mocha/lib/reporters/landing.js
  48. +64 −0 node_modules/mocha/lib/reporters/list.js
  49. +92 −0 node_modules/mocha/lib/reporters/markdown.js
  50. +38 −0 node_modules/mocha/lib/reporters/min.js
  51. +259 −0 node_modules/mocha/lib/reporters/nyan.js
  52. +86 −0 node_modules/mocha/lib/reporters/progress.js
  53. +87 −0 node_modules/mocha/lib/reporters/spec.js
  54. +63 −0 node_modules/mocha/lib/reporters/tap.js
  55. +65 −0 node_modules/mocha/lib/reporters/teamcity.js
  56. +50 −0 node_modules/mocha/lib/reporters/templates/coverage.jade
  57. +13 −0 node_modules/mocha/lib/reporters/templates/menu.jade
  58. +34 −0 node_modules/mocha/lib/reporters/templates/script.html
  59. +307 −0 node_modules/mocha/lib/reporters/templates/style.html
  60. +115 −0 node_modules/mocha/lib/reporters/xunit.js
  61. +213 −0 node_modules/mocha/lib/runnable.js
  62. +532 −0 node_modules/mocha/lib/runner.js
  63. +296 −0 node_modules/mocha/lib/suite.js
  64. +17 −0 node_modules/mocha/lib/template.html
  65. +32 −0 node_modules/mocha/lib/test.js
  66. +282 −0 node_modules/mocha/lib/utils.js
  67. +227 −0 node_modules/mocha/mocha.css
  68. +4,994 −0 node_modules/mocha/mocha.js
  69. +1 −0  node_modules/mocha/node_modules/.bin/jade
  70. +4 −0 node_modules/mocha/node_modules/commander/.npmignore
  71. +4 −0 node_modules/mocha/node_modules/commander/.travis.yml
  72. +107 −0 node_modules/mocha/node_modules/commander/History.md
  73. +7 −0 node_modules/mocha/node_modules/commander/Makefile
  74. +262 −0 node_modules/mocha/node_modules/commander/Readme.md
  75. +2 −0  node_modules/mocha/node_modules/commander/index.js
  76. +1,026 −0 node_modules/mocha/node_modules/commander/lib/commander.js
  77. +34 −0 node_modules/mocha/node_modules/commander/package.json
  78. +4 −0 node_modules/mocha/node_modules/debug/.npmignore
  79. +47 −0 node_modules/mocha/node_modules/debug/History.md
  80. +4 −0 node_modules/mocha/node_modules/debug/Makefile
  81. +130 −0 node_modules/mocha/node_modules/debug/Readme.md
  82. +120 −0 node_modules/mocha/node_modules/debug/debug.component.js
  83. +116 −0 node_modules/mocha/node_modules/debug/debug.js
  84. +19 −0 node_modules/mocha/node_modules/debug/example/app.js
  85. +24 −0 node_modules/mocha/node_modules/debug/example/browser.html
  86. +10 −0 node_modules/mocha/node_modules/debug/example/wildcards.js
  87. +22 −0 node_modules/mocha/node_modules/debug/example/worker.js
  88. +1 −0  node_modules/mocha/node_modules/debug/head.js
  89. +2 −0  node_modules/mocha/node_modules/debug/index.js
  90. +135 −0 node_modules/mocha/node_modules/debug/lib/debug.js
  91. +30 −0 node_modules/mocha/node_modules/debug/package.json
  92. +4 −0 node_modules/mocha/node_modules/debug/tail.js
  93. +31 −0 node_modules/mocha/node_modules/diff/LICENSE
  94. +94 −0 node_modules/mocha/node_modules/diff/README.md
  95. +287 −0 node_modules/mocha/node_modules/diff/diff.js
  96. +89 −0 node_modules/mocha/node_modules/diff/index.html
  97. +42 −0 node_modules/mocha/node_modules/diff/package.json
  98. +81 −0 node_modules/mocha/node_modules/diff/style.css
  99. +616 −0 node_modules/mocha/node_modules/diff/test/diffTest.js
  100. +58 −0 node_modules/mocha/node_modules/growl/History.md
  101. +99 −0 node_modules/mocha/node_modules/growl/Readme.md
  102. +232 −0 node_modules/mocha/node_modules/growl/lib/growl.js
  103. +13 −0 node_modules/mocha/node_modules/growl/package.json
  104. +20 −0 node_modules/mocha/node_modules/growl/test.js
  105. +15 −0 node_modules/mocha/node_modules/jade/.npmignore
  106. +22 −0 node_modules/mocha/node_modules/jade/LICENSE
  107. +147 −0 node_modules/mocha/node_modules/jade/bin/jade
  108. +4 −0 node_modules/mocha/node_modules/jade/index.js
  109. +3,586 −0 node_modules/mocha/node_modules/jade/jade.js
  110. +510 −0 node_modules/mocha/node_modules/jade/jade.md
  111. +2 −0  node_modules/mocha/node_modules/jade/jade.min.js
  112. +642 −0 node_modules/mocha/node_modules/jade/lib/compiler.js
  113. +18 −0 node_modules/mocha/node_modules/jade/lib/doctypes.js
  114. +97 −0 node_modules/mocha/node_modules/jade/lib/filters.js
  115. +28 −0 node_modules/mocha/node_modules/jade/lib/inline-tags.js
  116. +237 −0 node_modules/mocha/node_modules/jade/lib/jade.js
  117. +771 −0 node_modules/mocha/node_modules/jade/lib/lexer.js
  118. +77 −0 node_modules/mocha/node_modules/jade/lib/nodes/attrs.js
  119. +33 −0 node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js
  120. +121 −0 node_modules/mocha/node_modules/jade/lib/nodes/block.js
  121. +43 −0 node_modules/mocha/node_modules/jade/lib/nodes/case.js
  122. +35 −0 node_modules/mocha/node_modules/jade/lib/nodes/code.js
  123. +32 −0 node_modules/mocha/node_modules/jade/lib/nodes/comment.js
  124. +29 −0 node_modules/mocha/node_modules/jade/lib/nodes/doctype.js
  125. +35 −0 node_modules/mocha/node_modules/jade/lib/nodes/each.js
  126. +35 −0 node_modules/mocha/node_modules/jade/lib/nodes/filter.js
  127. +20 −0 node_modules/mocha/node_modules/jade/lib/nodes/index.js
  128. +32 −0 node_modules/mocha/node_modules/jade/lib/nodes/literal.js
  129. +36 −0 node_modules/mocha/node_modules/jade/lib/nodes/mixin.js
  130. +25 −0 node_modules/mocha/node_modules/jade/lib/nodes/node.js
  131. +95 −0 node_modules/mocha/node_modules/jade/lib/nodes/tag.js
  132. +36 −0 node_modules/mocha/node_modules/jade/lib/nodes/text.js
  133. +710 −0 node_modules/mocha/node_modules/jade/lib/parser.js
  134. +174 −0 node_modules/mocha/node_modules/jade/lib/runtime.js
  135. +19 −0 node_modules/mocha/node_modules/jade/lib/self-closing.js
  136. +49 −0 node_modules/mocha/node_modules/jade/lib/utils.js
  137. +2 −0  node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig
  138. +5 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej
  139. +2 −0  node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore
  140. +21 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/LICENSE
  141. +54 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/README.markdown
  142. +6 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js
  143. +6 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig
  144. +19 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej
  145. +79 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/index.js
  146. +32 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json
  147. +38 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/chmod.js
  148. +37 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/clobber.js
  149. +28 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js
  150. +32 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm.js
  151. +39 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm_sync.js
  152. +41 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/race.js
  153. +32 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/rel.js
  154. +27 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js
  155. +28 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask.js
  156. +27 −0 node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask_sync.js
  157. +44 −0 node_modules/mocha/node_modules/jade/package.json
  158. +179 −0 node_modules/mocha/node_modules/jade/runtime.js
  159. +1 −0  node_modules/mocha/node_modules/jade/runtime.min.js
  160. +7 −0 node_modules/mocha/node_modules/jade/test.jade
  161. +5 −0 node_modules/mocha/node_modules/jade/testing/head.jade
  162. +22 −0 node_modules/mocha/node_modules/jade/testing/index.jade
  163. +11 −0 node_modules/mocha/node_modules/jade/testing/index.js
  164. +6 −0 node_modules/mocha/node_modules/jade/testing/layout.jade
  165. +7 −0 node_modules/mocha/node_modules/jade/testing/user.jade
  166. +27 −0 node_modules/mocha/node_modules/jade/testing/user.js
  167. +2 −0  node_modules/mocha/node_modules/mkdirp/.gitignore.orig
  168. +5 −0 node_modules/mocha/node_modules/mkdirp/.gitignore.rej
  169. +2 −0  node_modules/mocha/node_modules/mkdirp/.npmignore
  170. +4 −0 node_modules/mocha/node_modules/mkdirp/.travis.yml
  171. +21 −0 node_modules/mocha/node_modules/mkdirp/LICENSE
  172. +61 −0 node_modules/mocha/node_modules/mkdirp/README.markdown
  173. +6 −0 node_modules/mocha/node_modules/mkdirp/examples/pow.js
  174. +6 −0 node_modules/mocha/node_modules/mkdirp/examples/pow.js.orig
  175. +19 −0 node_modules/mocha/node_modules/mkdirp/examples/pow.js.rej
  176. +94 −0 node_modules/mocha/node_modules/mkdirp/index.js
  177. +32 −0 node_modules/mocha/node_modules/mkdirp/package.json
  178. +38 −0 node_modules/mocha/node_modules/mkdirp/test/chmod.js
  179. +37 −0 node_modules/mocha/node_modules/mkdirp/test/clobber.js
  180. +28 −0 node_modules/mocha/node_modules/mkdirp/test/mkdirp.js
  181. +32 −0 node_modules/mocha/node_modules/mkdirp/test/perm.js
  182. +39 −0 node_modules/mocha/node_modules/mkdirp/test/perm_sync.js
  183. +41 −0 node_modules/mocha/node_modules/mkdirp/test/race.js
  184. +32 −0 node_modules/mocha/node_modules/mkdirp/test/rel.js
  185. +25 −0 node_modules/mocha/node_modules/mkdirp/test/return.js
  186. +24 −0 node_modules/mocha/node_modules/mkdirp/test/return_sync.js
  187. +18 −0 node_modules/mocha/node_modules/mkdirp/test/root.js
  188. +32 −0 node_modules/mocha/node_modules/mkdirp/test/sync.js
  189. +28 −0 node_modules/mocha/node_modules/mkdirp/test/umask.js
  190. +32 −0 node_modules/mocha/node_modules/mkdirp/test/umask_sync.js
  191. +1 −0  node_modules/mocha/node_modules/ms/.npmignore
  192. +21 −0 node_modules/mocha/node_modules/ms/History.md
  193. +8 −0 node_modules/mocha/node_modules/ms/Makefile
  194. +24 −0 node_modules/mocha/node_modules/ms/README.md
  195. +7 −0 node_modules/mocha/node_modules/ms/component.json
  196. +81 −0 node_modules/mocha/node_modules/ms/ms.js
  197. +14 −0 node_modules/mocha/node_modules/ms/package.json
  198. +19 −0 node_modules/mocha/node_modules/ms/test/index.html
  199. +9,266 −0 node_modules/mocha/node_modules/ms/test/support/jquery.js
  200. +85 −0 node_modules/mocha/node_modules/ms/test/test.js
  201. +46 −0 node_modules/mocha/package.json
  202. +10 −0 node_modules/mocha/test.js
  203. +3 −0  node_modules/should/.gitmodules
  204. +1 −0  node_modules/should/.npmignore
  205. +145 −0 node_modules/should/History.md
  206. +6 −0 node_modules/should/Makefile
  207. +390 −0 node_modules/should/Readme.md
  208. +65 −0 node_modules/should/examples/runner.js
  209. +2 −0  node_modules/should/index.js
  210. +91 −0 node_modules/should/lib/eql.js
  211. +729 −0 node_modules/should/lib/should.js
  212. +35 −0 node_modules/should/package.json
  213. +102 −0 node_modules/should/test/exist.test.js
  214. +637 −0 node_modules/should/test/should.test.js
  215. +8 −0 package.json
  216. BIN  test/.DS_Store
  217. +22 −0 test/index.html
  218. +203 −0 test/mocha.css
  219. +4,906 −0 test/mocha.js
  220. +161 −0 test/test.attr.js
View
BIN  .DS_Store
Binary file not shown
View
2  .gitignore
@@ -0,0 +1,2 @@
+components
+build
View
0  History.md
No changes.
View
16 Makefile
@@ -0,0 +1,16 @@
+
+build: components index.js
+ @component build --dev
+
+components: component.json
+ @component install --dev
+
+clean:
+ rm -fr build components template.js
+
+test:
+ @./node_modules/.bin/mocha \
+ --reporter spec \
+ --require should
+
+.PHONY: clean test
View
18 component.json
@@ -0,0 +1,18 @@
+{
+ "name": "attr",
+ "repo": "weepy/attr",
+ "description": "Simple property with get/set and events",
+ "version": "0.0.1",
+ "keywords": [],
+ "dependencies": {
+ "component/assert": "*",
+ "component/emitter": "*"
+ },
+ "development": {
+ "component/assert": "*"
+ },
+ "license": "MIT",
+ "scripts": [
+ "index.js"
+ ]
+}
View
84 index.js
@@ -0,0 +1,84 @@
+var Emitter = require('emitter')
+
+var methods = {
+ incr: function (val) {
+ return this(this.value + (val || 1))
+ },
+ toggle: function (val) {
+ return this(!this.value)
+ },
+ change: function(fn) {
+ if(fn) {
+ this.on('change', fn) // setup observer
+ }
+ else { // force the change
+ var val = this()
+ this.emit('change', val, this.old)
+ }
+
+ return this
+ },
+ toString: function() {
+ return "attr:"+JSON.stringify(this.value)
+ }
+}
+
+Emitter(methods)
+
+
+function createAttr(arg) {
+ function attr(v) {
+ if(arguments.length) {
+ attr.old = attr.value
+ attr.value = v
+ attr.emit('change', attr.value, attr.old)
+ }
+ return attr.value
+ }
+
+
+ for(var i in methods) attr[i] = methods[i]
+ // set to initial
+ attr.value = arg
+
+
+ return attr
+}
+
+createAttr.computed = function(fn) {
+ function cattr() {
+ cattr.old = cattr.value
+ cattr.value = fn()
+ cattr.emit('change', cattr.value, cattr.old)
+ return cattr.value
+ }
+
+
+ for(var i in methods) cattr[i] = methods[i]
+
+ cattr.value = fn()
+
+ // setup dependencies
+ cattr._depends = []
+
+
+ cattr.depends = function(deps) {
+ cattr._depends.forEach(function(dep) {
+ dep.off('change', changeFn)
+ })
+
+ cattr._depends = deps
+ deps.forEach(function(dep) {
+ dep.on('change', changeFn)
+ })
+ return cattr
+ }
+
+ function changeFn() {
+ cattr.change()
+ }
+
+ return cattr
+}
+
+module.exports = createAttr
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
472 node_modules/mocha/History.md
@@ -0,0 +1,472 @@
+
+1.7.0 / 2012-11-07
+==================
+
+ * add `--async-only` support to prevent false positives for missing `done()`
+ * add sorting by filename in code coverage
+ * add HTML 5 doctype to browser template.
+ * add play button to html reporter to rerun a single test
+ * add `this.timeout(ms)` as Suite#timeout(ms). Closes #599
+ * update growl dependency to 1.6.x
+ * fix encoding of test-case ?grep. Closes #637
+ * fix unicode chars on windows
+ * fix dom globals in Opera/IE. Closes #243
+ * fix markdown reporter a tags
+ * fix `this.timeout("5s")` support
+
+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) 2011-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
126 node_modules/mocha/Makefile
@@ -0,0 +1,126 @@
+
+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
+
+test-async-only:
+ @./bin/mocha \
+ --reporter $(REPORTER) \
+ --async-only \
+ test/acceptance/misc/asyncOnly
+
+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
42 node_modules/mocha/Readme.md
@@ -0,0 +1,42 @@
+ [![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
+
+ - [Konacha](https://github.com/jfirebaugh/konacha) -- for testing Rails applications with Mocha
+ - [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,880 node_modules/mocha/_mocha.js
@@ -0,0 +1,4880 @@
+
+// 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.charAt(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("browser/debug.js", function(module, exports, require){
+
+module.exports = function(type){
+ return function(){
+
+ }
+};
+}); // module: browser/debug.js
+
+require.register("browser/diff.js", function(module, exports, require){
+
+}); // module: browser/diff.js
+
+require.register("browser/events.js", function(module, exports, require){
+
+/**
+ * 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;
+};
+}); // module: browser/events.js
+
+require.register("browser/fs.js", function(module, exports, require){
+
+}); // module: browser/fs.js
+
+require.register("browser/path.js", function(module, exports, require){
+
+}); // module: browser/path.js
+
+require.register("browser/progress.js", function(module, exports, require){
+
+/**
+ * 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;
+};
+
+}); // module: browser/progress.js
+
+require.register("browser/tty.js", function(module, exports, require){
+
+exports.isatty = function(){
+ return true;
+};
+
+exports.getWindowSize = function(){
+ return [window.innerHeight, window.innerWidth];
+};
+}); // module: browser/tty.js
+
+require.register("context.js", function(module, exports, require){
+
+/**
+ * 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);
+};
+
+}); // module: context.js
+
+require.register("hook.js", function(module, exports, require){
+
+/**
+ * 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 = new Runnable;
+Hook.prototype.constructor = Hook;
+
+
+/**
+ * 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;
+};
+
+
+}); // module: hook.js
+
+require.register("interfaces/bdd.js", function(module, exports, require){
+
+/**
+ * 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.call(suite);
+ 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.call(suite);
+ 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);
+ };
+ });
+};
+
+}); // module: interfaces/bdd.js
+
+require.register("interfaces/exports.js", function(module, exports, require){
+
+/**
+ * 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();
+ }
+ }
+ }
+};
+}); // module: interfaces/exports.js
+
+require.register("interfaces/index.js", function(module, exports, require){
+
+exports.bdd = require('./bdd');
+exports.tdd = require('./tdd');
+exports.qunit = require('./qunit');
+exports.exports = require('./exports');
+
+}); // module: interfaces/index.js
+
+require.register("interfaces/qunit.js", function(module, exports, require){
+
+/**
+ * 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));
+ };
+ });
+};
+
+}); // module: interfaces/qunit.js
+
+require.register("interfaces/tdd.js", function(module, exports, require){
+
+/**
+ * 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(){
+ *
+ * });
+ * });
+ * });
+ *
+ */
+
+module.exports = function(suite){
+ var suites = [suite];
+
+ suite.on('pre-require', function(context, file, mocha){
+
+ /**
+ * Execute before each test case.
+ */
+
+ context.setup = function(fn){
+ suites[0].beforeEach(fn);
+ };
+
+ /**
+ * Execute after each test case.
+ */
+
+ context.teardown = function(fn){
+ suites[0].afterEach(fn);
+ };
+
+ /**
+ * Execute before the suite.
+ */
+
+ context.suiteSetup = function(fn){
+ suites[0].beforeAll(fn);
+ };
+
+ /**
+ * Execute after the suite.
+ */
+
+ context.suiteTeardown = function(fn){
+ suites[0].afterAll(fn);
+ };
+
+ /**
+ * Describe a "suite" with the given `title`
+ * and callback `fn` containing nested suites
+ * and/or tests.
+ */
+
+ context.suite = function(title, fn){
+ var suite = Suite.create(suites[0], title);
+ suites.unshift(suite);
+ fn.call(suite);
+ suites.shift();
+ return suite;
+ };
+
+ /**
+ * Exclusive test-case.
+ */
+
+ context.suite.only = function(title, fn){
+ var suite = context.suite(title, fn);
+ mocha.grep(suite.fullTitle());
+ };
+
+ /**
+ * Describe a specification or test-case
+ * with the given `title` and callback `fn`
+ * acting as a thunk.
+ */
+
+ context.test = function(title, fn){
+ var test = new Test(title, fn);
+ suites[0].addTest(test);
+ return test;
+ };
+
+ /**
+ * Exclusive test-case.
+ */
+
+ context.test.only = function(title, fn){
+ var test = context.test(title, fn);
+ mocha.grep(test.fullTitle());
+ };
+
+ /**
+ * Pending test case.
+ */
+
+ context.test.skip = function(title){
+ context.test(title);
+ };
+ });
+};
+
+}); // module: interfaces/tdd.js
+
+require.register("mocha.js", function(module, exports, require){
+/*!
+ * mocha
+ * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var path = require('browser/path')
+ , utils = require('./utils');
+
+/**
+ * Expose `Mocha`.
+ */
+
+exports = module.exports = Mocha;
+
+/**
+ * Expose internals.
+ */
+
+exports.utils = utils;
+exports.interfaces = require('./interfaces');
+exports.reporters = require('./reporters');
+exports.Runnable = require('./runnable');
+exports.Context = require('./context');
+exports.Runner = require('./runner');
+exports.Suite = require('./suite');
+exports.Hook = require('./hook');
+exports.Test = require('./test');
+
+/**
+ * Return image `name` path.
+ *
+ * @param {String} name
+ * @return {String}
+ * @api private
+ */
+
+function image(name) {
+ return __dirname + '/../images/' + name + '.png';
+}
+
+/**
+ * Setup mocha with `options`.
+ *
+ * Options:
+ *
+ * - `ui` name "bdd", "tdd", "exports" etc
+ * - `reporter` reporter instance, defaults to `mocha.reporters.Dot`
+ * - `globals` array of accepted globals
+ * - `timeout` timeout in milliseconds
+ * - `slow` milliseconds to wait before considering a test slow
+ * - `ignoreLeaks` ignore global leaks
+ * - `grep` string or regexp to filter tests with
+ *
+ * @param {Object} options
+ * @api public
+ */
+
+function Mocha(options) {
+ options = options || {};
+ this.files = [];
+ this.options = options;
+ this.grep(options.grep);
+ this.suite = new exports.Suite('', new exports.Context);
+ this.ui(options.ui);
+ this.reporter(options.reporter);
+ if (options.timeout) this.timeout(options.timeout);
+ if (options.slow) this.slow(options.slow);
+}
+
+/**
+ * Add test `file`.
+ *
+ * @param {String} file
+ * @api public
+ */
+
+Mocha.prototype.addFile = function(file){
+ this.files.push(file);
+ return this;
+};
+
+/**
+ * Set reporter to `reporter`, defaults to "dot".
+ *
+ * @param {String|Function} reporter name of a reporter or a reporter constructor
+ * @api public
+ */
+
+Mocha.prototype.reporter = function(reporter){
+ if ('function' == typeof reporter) {
+ this._reporter = reporter;
+ } else {
+ reporter = reporter || 'dot';
+ try {
+ this._reporter = require('./reporters/' + reporter);
+ } catch (err) {
+ this._reporter = require(reporter);
+ }
+ if (!this._reporter) throw new Error('invalid reporter "' + reporter + '"');
+ }
+ return this;
+};
+
+/**
+ * Set test UI `name`, defaults to "bdd".
+ *
+ * @param {String} bdd
+ * @api public
+ */
+
+Mocha.prototype.ui = function(name){
+ name = name || 'bdd';
+ this._ui = exports.interfaces[name];
+ if (!this._ui) throw new Error('invalid interface "' + name + '"');
+ this._ui = this._ui(this.suite);
+ return this;
+};
+
+/**
+ * Load registered files.
+ *
+ * @api private
+ */
+
+Mocha.prototype.loadFiles = function(fn){
+ var self = this;
+ var suite = this.suite;
+ var pending = this.files.length;
+ this.files.forEach(function(file){
+ file = path.resolve(file);
+ suite.emit('pre-require', global, file, self);
+ suite.emit('require', require(file), file, self);
+ suite.emit('post-require', global, file, self);
+ --pending || (fn && fn());
+ });
+};
+
+/**
+ * Enable growl support.
+ *
+ * @api private
+ */
+
+Mocha.prototype._growl = function(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: image('error') });
+ } else {
+ notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', {
+ name: 'mocha'
+ , title: 'Passed'
+ , image: image('ok')
+ });
+ }
+ });
+};
+
+/**
+ * Add regexp to grep, if `re` is a string it is escaped.
+ *
+ * @param {RegExp|String} re
+ * @return {Mocha}
+ * @api public
+ */
+
+Mocha.prototype.grep = function(re){
+ this.options.grep = 'string' == typeof re
+ ? new RegExp(utils.escapeRegexp(re))
+ : re;
+ return this;
+};
+
+/**
+ * Invert `.grep()` matches.
+ *
+ * @return {Mocha}
+ * @api public
+ */
+
+Mocha.prototype.invert = function(){
+ this.options.invert = true;
+ return this;
+};
+
+/**
+ * Ignore global leaks.
+ *
+ * @return {Mocha}
+ * @api public
+ */
+
+Mocha.prototype.ignoreLeaks = function(){
+ this.options.ignoreLeaks = true;
+ return this;
+};
+
+/**
+ * Enable global leak checking.
+ *
+ * @return {Mocha}
+ * @api public
+ */
+
+Mocha.prototype.checkLeaks = function(){
+ this.options.ignoreLeaks = false;
+ return this;
+};
+
+/**
+ * Enable growl support.
+ *
+ * @return {Mocha}
+ * @api public
+ */
+
+Mocha.prototype.growl = function(){
+ this.options.growl = true;
+ return this;
+};
+
+/**
+ * Ignore `globals` array or string.
+ *
+ * @param {Array|String} globals
+ * @return {Mocha}
+ * @api public
+ */
+
+Mocha.prototype.globals = function(globals){
+ this.options.globals = (this.options.globals || []).concat(globals);
+ return this;
+};
+
+/**
+ * Set the timeout in milliseconds.
+ *
+ * @param {Number} timeout
+ * @return {Mocha}
+ * @api public
+ */
+
+Mocha.prototype.timeout = function(timeout){
+ this.suite.timeout(timeout);
+ return this;
+};
+
+/**
+ * Set slowness threshold in milliseconds.
+ *
+ * @param {Number} slow
+ * @return {Mocha}
+ * @api public
+ */
+
+Mocha.prototype.slow = function(slow){
+ this.suite.slow(slow);
+ return this;
+};
+
+/**
+ * Makes all tests async (accepting a callback)
+ *
+ * @return {Mocha}
+ * @api public
+ */
+
+Mocha.prototype.asyncOnly = function(){
+ this.options.asyncOnly = true;
+ return this;
+};
+
+/**
+ * Run tests and invoke `fn()` when complete.
+ *
+ * @param {Function} fn
+ * @return {Runner}
+ * @api public
+ */
+
+Mocha.prototype.run = function(fn){
+ if (this.files.length) this.loadFiles();
+ var suite = this.suite;
+ var options = this.options;
+ var runner = new exports.Runner(suite);
+ var reporter = new this._reporter(runner);
+ runner.ignoreLeaks = options.ignoreLeaks;
+ runner.asyncOnly = options.asyncOnly;
+ if (options.grep) runner.grep(options.grep, options.invert);
+ if (options.globals) runner.globals(options.globals);
+ if (options.growl) this._growl(runner, reporter);
+ return runner.run(fn);
+};
+
+}); // module: mocha.js
+
+require.register("ms.js", function(module, exports, require){
+
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * @param {String|Number} val
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val){
+ if ('string' == typeof val) return parse(val);
+ return format(val);
+}
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ var m = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str);
+ if (!m) return;
+ var n = parseFloat(m[1]);
+ var type = (m[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'y':
+ return n * 31557600000;
+ case 'days':
+ case 'day':