Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bundling tap yet again to make a patch to yamlish #99.

  • Loading branch information...
commit 960c425d502aad57780b709f10cf2f76141da7ba 1 parent b7d6520
@airportyh authored
Showing with 22,909 additions and 0 deletions.
  1. 0  node_modules/tap/.npmignore
  2. +11 −0 node_modules/tap/AUTHORS
  3. +23 −0 node_modules/tap/LICENSE
  4. +82 −0 node_modules/tap/README.md
  5. +19 −0 node_modules/tap/bin/tap-http.js
  6. +33 −0 node_modules/tap/bin/tap-reader.js
  7. +132 −0 node_modules/tap/bin/tap.js
  8. +15 −0 node_modules/tap/coverage-example/lib/bar.js
  9. +15 −0 node_modules/tap/coverage-example/lib/foo.js
  10. +20 −0 node_modules/tap/coverage-example/test/bar.test.js
  11. +29 −0 node_modules/tap/coverage-example/test/baz.test.js
  12. +20 −0 node_modules/tap/coverage-example/test/foo.test.js
  13. +1 −0  node_modules/tap/example/lib/math.js
  14. +237 −0 node_modules/tap/example/test/test-example.js
  15. +16 −0 node_modules/tap/lib/main.js
  16. +444 −0 node_modules/tap/lib/tap-assert.js
  17. +63 −0 node_modules/tap/lib/tap-browser-harness.js
  18. +243 −0 node_modules/tap/lib/tap-consumer.js
  19. +78 −0 node_modules/tap/lib/tap-cov-html.js
  20. +68 −0 node_modules/tap/lib/tap-global-harness.js
  21. +221 −0 node_modules/tap/lib/tap-harness.js
  22. +130 −0 node_modules/tap/lib/tap-producer.js
  23. +71 −0 node_modules/tap/lib/tap-results.js
  24. +453 −0 node_modules/tap/lib/tap-runner.js
  25. +109 −0 node_modules/tap/lib/tap-test.js
  26. +1 −0  node_modules/tap/node_modules/.bin/nopt
  27. +4 −0 node_modules/tap/node_modules/buffer-equal/.travis.yml
  28. +62 −0 node_modules/tap/node_modules/buffer-equal/README.markdown
  29. +14 −0 node_modules/tap/node_modules/buffer-equal/example/eq.js
  30. +13 −0 node_modules/tap/node_modules/buffer-equal/index.js
  31. +36 −0 node_modules/tap/node_modules/buffer-equal/package.json
  32. +35 −0 node_modules/tap/node_modules/buffer-equal/test/eq.js
  33. +55 −0 node_modules/tap/node_modules/deep-equal/README.markdown
  34. +11 −0 node_modules/tap/node_modules/deep-equal/example/cmp.js
  35. +84 −0 node_modules/tap/node_modules/deep-equal/index.js
  36. +38 −0 node_modules/tap/node_modules/deep-equal/package.json
  37. +18 −0 node_modules/tap/node_modules/deep-equal/test/cmp.js
  38. +4 −0 node_modules/tap/node_modules/difflet/.travis.yml
  39. +116 −0 node_modules/tap/node_modules/difflet/README.markdown
  40. +6 −0 node_modules/tap/node_modules/difflet/example/cmp_array.js
  41. +6 −0 node_modules/tap/node_modules/difflet/example/cmp_object.js
  42. +18 −0 node_modules/tap/node_modules/difflet/example/colors.js
  43. +12 −0 node_modules/tap/node_modules/difflet/example/comma_first.js
  44. +15 −0 node_modules/tap/node_modules/difflet/example/diff.js
  45. +34 −0 node_modules/tap/node_modules/difflet/example/html.js
  46. +4 −0 node_modules/tap/node_modules/difflet/example/string.js
  47. +371 −0 node_modules/tap/node_modules/difflet/index.js
  48. +1 −0  node_modules/tap/node_modules/difflet/node_modules/traverse/.npmignore
  49. +3 −0  node_modules/tap/node_modules/difflet/node_modules/traverse/.travis.yml
  50. +24 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/LICENSE
  51. +258 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/README.markdown
  52. +16 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/examples/json.js
  53. +15 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/examples/leaves.js
  54. +8 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/examples/negative.js
  55. +10 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/examples/scrub.js
  56. +38 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/examples/stringify.js
  57. +9 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/fail.js
  58. +310 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/index.js
  59. +44 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/package.json
  60. +117 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/circular.js
  61. +37 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/date.js
  62. +240 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/equal.js
  63. +11 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/error.js
  64. +15 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/has.js
  65. +17 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/instance.js
  66. +43 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/interface.js
  67. +49 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/json.js
  68. +31 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/keys.js
  69. +22 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/leaves.js
  70. +96 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/lib/deep_equal.js
  71. +300 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/mutability.js
  72. +21 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/negative.js
  73. +11 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/obj.js
  74. +37 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/siblings.js
  75. +44 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/stop.js
  76. +36 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/stringify.js
  77. +36 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/subexpr.js
  78. +56 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/test/super_deep.js
  79. +22 −0 node_modules/tap/node_modules/difflet/node_modules/traverse/testling/leaves.js
  80. +44 −0 node_modules/tap/node_modules/difflet/package.json
  81. +80 −0 node_modules/tap/node_modules/difflet/test/html.js
  82. +51 −0 node_modules/tap/node_modules/inherits/README.md
  83. +29 −0 node_modules/tap/node_modules/inherits/inherits.js
  84. +25 −0 node_modules/tap/node_modules/inherits/package.json
  85. +2 −0  node_modules/tap/node_modules/mkdirp/.npmignore
  86. +4 −0 node_modules/tap/node_modules/mkdirp/.travis.yml
  87. +21 −0 node_modules/tap/node_modules/mkdirp/LICENSE
  88. +61 −0 node_modules/tap/node_modules/mkdirp/README.markdown
  89. +6 −0 node_modules/tap/node_modules/mkdirp/examples/pow.js
  90. +82 −0 node_modules/tap/node_modules/mkdirp/index.js
  91. +32 −0 node_modules/tap/node_modules/mkdirp/package.json
  92. +38 −0 node_modules/tap/node_modules/mkdirp/test/chmod.js
  93. +37 −0 node_modules/tap/node_modules/mkdirp/test/clobber.js
  94. +28 −0 node_modules/tap/node_modules/mkdirp/test/mkdirp.js
  95. +32 −0 node_modules/tap/node_modules/mkdirp/test/perm.js
  96. +39 −0 node_modules/tap/node_modules/mkdirp/test/perm_sync.js
  97. +41 −0 node_modules/tap/node_modules/mkdirp/test/race.js
  98. +32 −0 node_modules/tap/node_modules/mkdirp/test/rel.js
  99. +25 −0 node_modules/tap/node_modules/mkdirp/test/return.js
  100. +24 −0 node_modules/tap/node_modules/mkdirp/test/return_sync.js
  101. +18 −0 node_modules/tap/node_modules/mkdirp/test/root.js
  102. +32 −0 node_modules/tap/node_modules/mkdirp/test/sync.js
  103. +28 −0 node_modules/tap/node_modules/mkdirp/test/umask.js
  104. +32 −0 node_modules/tap/node_modules/mkdirp/test/umask_sync.js
  105. 0  node_modules/tap/node_modules/nopt/.npmignore
  106. +23 −0 node_modules/tap/node_modules/nopt/LICENSE
  107. +210 −0 node_modules/tap/node_modules/nopt/README.md
  108. +44 −0 node_modules/tap/node_modules/nopt/bin/nopt.js
  109. +30 −0 node_modules/tap/node_modules/nopt/examples/my-program.js
  110. +555 −0 node_modules/tap/node_modules/nopt/lib/nopt.js
  111. +23 −0 node_modules/tap/node_modules/nopt/node_modules/abbrev/README.md
  112. +106 −0 node_modules/tap/node_modules/nopt/node_modules/abbrev/lib/abbrev.js
  113. +20 −0 node_modules/tap/node_modules/nopt/node_modules/abbrev/package.json
  114. +31 −0 node_modules/tap/node_modules/nopt/package.json
  115. +56 −0 node_modules/tap/node_modules/runforcover/README.markdown
  116. +127 −0 node_modules/tap/node_modules/runforcover/index.js
  117. +1 −0  node_modules/tap/node_modules/runforcover/node_modules/bunker/.npmignore
  118. +4 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/.travis.yml
  119. +82 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/README.markdown
  120. +51 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/example/prof.js
  121. +18 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/example/tiny.js
  122. +31 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/example/top/run.js
  123. +18 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/example/top/src.js
  124. +116 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/index.js
  125. +1 −0  node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/.npmignore
  126. +4 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/.travis.yml
  127. +187 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/README.markdown
  128. +8 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/example/microwave.js
  129. +4,832 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/example/web/bs.js
  130. +14 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/example/web/index.html
  131. +17 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/example/web/main.js
  132. +12 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/example/web/server.js
  133. +7 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/example/wrap.js
  134. +208 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/index.js
  135. +1 −0  node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin/uglifyjs
  136. +1 −0  ...ules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/.npmignore
  137. +24 −0 ...modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/LICENSE
  138. +237 −0 ...tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/README.markdown
  139. +16 −0 ...ap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/examples/json.js
  140. +15 −0 .../node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/examples/leaves.js
  141. +8 −0 ...ode_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/examples/negative.js
  142. +10 −0 ...p/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/examples/scrub.js
  143. +38 −0 ...de_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/examples/stringify.js
  144. +267 −0 ...odules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/index.js
  145. +10 −0 ...modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/main.js
  146. +23 −0 ...es/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/package.json
  147. +115 −0 ...ap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/circular.js
  148. +35 −0 ...es/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/date.js
  149. +220 −0 ...s/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/equal.js
  150. +17 −0 ...ap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/instance.js
  151. +42 −0 ...p/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/interface.js
  152. +47 −0 ...es/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/json.js
  153. +29 −0 ...es/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/keys.js
  154. +21 −0 .../tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/leaves.js
  155. +92 −0 ...e_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/lib/deep_equal.js
  156. +252 −0 .../node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/mutability.js
  157. +20 −0 ...ap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/negative.js
  158. +15 −0 ...les/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/obj.js
  159. +35 −0 ...ap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/siblings.js
  160. +41 −0 ...es/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/stop.js
  161. +36 −0 ...p/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/stringify.js
  162. +34 −0 ...tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/subexpr.js
  163. +55 −0 .../node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/super_deep.js
  164. +4 −0 ...les/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/.npmignore
  165. +1,026 −0 ...es/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/README.html
  166. +571 −0 ...les/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/README.org
  167. +317 −0 ...s/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/bin/uglifyjs
  168. +75 −0 ...s/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/docstyle.css
  169. +75 −0 .../node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/lib/object-ast.js
  170. +1,339 −0 ...ap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/lib/parse-js.js
  171. +2,001 −0 ...tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/lib/process.js
  172. +51 −0 ...ode_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/lib/squeeze-more.js
  173. +21 −0 ...s/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/package.json
  174. +24 −0 .../tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/package.json~
  175. +28 −0 ...p/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/beautify.js
  176. +403 −0 ...node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/testparser.js
  177. +1 −0  ...cover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/array1.js
  178. +1 −0  ...cover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/array2.js
  179. +1 −0  ...cover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/array3.js
  180. +1 −0  ...cover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/array4.js
  181. +1 −0  ...r/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/assignment.js
  182. +1 −0  ...node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/concatstring.js
  183. +1 −0  ...rcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/const.js
  184. +1 −0  ...node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js
  185. +1 −0  ...node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/forstatement.js
  186. +1 −0  ...nforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/if.js
  187. +1 −0  ...ver/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js
  188. +1 −0  ...er/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js
  189. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue10.js
  190. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue11.js
  191. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue13.js
  192. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue14.js
  193. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue16.js
  194. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue17.js
  195. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue20.js
  196. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue21.js
  197. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue25.js
  198. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue27.js
  199. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue28.js
  200. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue29.js
  201. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue30.js
  202. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue34.js
  203. +1 −0  ...cover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue4.js
  204. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue48.js
  205. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue50.js
  206. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue53.js
  207. +1 −0  ...er/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js
  208. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue68.js
  209. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue69.js
  210. +1 −0  ...cover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue9.js
  211. +1 −0  ...cover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/mangle.js
  212. +1 −0  .../node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/null_string.js
  213. +1 −0  ...ode_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js
  214. +1 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/var.js
  215. +1 −0  ...r/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/whitespace.js
  216. +1 −0  ...orcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/with.js
  217. +3 −0  ...nforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/array1.js
  218. +4 −0 ...nforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/array2.js
  219. +4 −0 ...nforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/array3.js
  220. +6 −0 ...nforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/array4.js
  221. +20 −0 ...cover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/assignment.js
  222. +3 −0  ...ver/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/concatstring.js
  223. +5 −0 ...unforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/const.js
  224. +4 −0 ...ver/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js
  225. +10 −0 ...ver/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/forstatement.js
  226. +6 −0 ...s/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/if.js
  227. +9 −0 ...orcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/ifreturn.js
  228. +16 −0 ...rcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js
  229. +1 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue10.js
  230. +3 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue11.js
  231. +1 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue13.js
  232. +1 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue14.js
  233. +1 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue16.js
  234. +4 −0 ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue17.js
  235. +1 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue20.js
  236. +6 −0 ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue21.js
  237. +7 −0 ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue25.js
  238. +1 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue27.js
  239. +3 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue28.js
  240. +1 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue29.js
  241. +3 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue30.js
  242. +3 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue34.js
  243. +3 −0  ...nforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue4.js
  244. +1 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue48.js
  245. +9 −0 ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue50.js
  246. +1 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue53.js
  247. +3 −0  ...rcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue54.1.js
  248. +5 −0 ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue68.js
  249. +1 −0  ...forcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue69.js
  250. +4 −0 ...nforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue9.js
  251. +5 −0 ...nforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/mangle.js
  252. +1 −0  ...over/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/null_string.js
  253. +3 −0  ...er/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/strict-equals.js
  254. +3 −0  .../runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/var.js
  255. +21 −0 ...cover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/whitespace.js
  256. +2 −0  ...runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/with.js
  257. +55 −0 ...de_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/scripts.js
  258. +33 −0 ...s/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/tmp/hoist.js
  259. +97 −0 .../node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/tmp/instrument.js
  260. +138 −0 ...node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/tmp/instrument2.js
  261. +30 −0 ...es/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/tmp/test.js
  262. +17 −0 ...s/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/uglify-js.js
  263. +46 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/package.json
  264. +31 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/test/ast.js
  265. +52 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/test/err.js
  266. +9 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/test/fail.js
  267. +60 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/test/fail/src.js
  268. +92 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/test/label.js
  269. +34 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/test/microwave.js
  270. +27 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/test/parent.js
  271. +159 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/test/wrap.js
  272. +40 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/package.json
  273. +36 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/test/cover.js
  274. +29 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/test/return.js
  275. +6 −0 node_modules/tap/node_modules/runforcover/node_modules/bunker/test/src/cover.js
  276. +37 −0 node_modules/tap/node_modules/runforcover/package.json
  277. +1 −0  node_modules/tap/node_modules/runforcover/test/index.js
  278. +50 −0 node_modules/tap/node_modules/runforcover/test/interface.js
  279. +7 −0 node_modules/tap/node_modules/runforcover/test/src/coverage.js
  280. +27 −0 node_modules/tap/node_modules/slide/README.md
  281. +1 −0  node_modules/tap/node_modules/slide/index.js
  282. +65 −0 node_modules/tap/node_modules/slide/lib/async-map-ordered.js
  283. +56 −0 node_modules/tap/node_modules/slide/lib/async-map.js
  284. +16 −0 node_modules/tap/node_modules/slide/lib/bind-actor.js
  285. +20 −0 node_modules/tap/node_modules/slide/lib/chain.js
  286. +3 −0  node_modules/tap/node_modules/slide/lib/slide.js
  287. BIN  node_modules/tap/node_modules/slide/nodejs-controlling-flow.pdf
  288. +30 −0 node_modules/tap/node_modules/slide/package.json
  289. +19 −0 node_modules/tap/node_modules/yamlish/LICENSE
  290. +20 −0 node_modules/tap/node_modules/yamlish/README.md
  291. +30 −0 node_modules/tap/node_modules/yamlish/package.json
  292. +260 −0 node_modules/tap/node_modules/yamlish/yamlish.js
  293. +60 −0 node_modules/tap/package.json
  294. +36 −0 node_modules/tap/test-disabled/bailout.js
  295. +1 −0  node_modules/tap/test-disabled/foo.js
  296. +16 −0 node_modules/tap/test-disabled/t.js
  297. +11 −0 node_modules/tap/test/buffer_compare.js
  298. +32 −0 node_modules/tap/test/common.js
  299. +43 −0 node_modules/tap/test/deep.js
  300. +12 −0 node_modules/tap/test/end-exception/t.js
Sorry, we could not display the entire diff because too many files (316) changed.
View
0  node_modules/tap/.npmignore
No changes.
View
11 node_modules/tap/AUTHORS
@@ -0,0 +1,11 @@
+# contributors sorted by whether or not they're me
+Isaac Z. Schlueter <i@izs.me>
+baudehlo <helpme+github@gmail.com>
+James Halliday <mail@substack.net>
+Jason Smith (air) <jhs@iriscouch.com>
+Pedro P. Candel <kusorbox@gmail.com>
+Stein Martin Hustad <stein@hustad.com>
+Trent Mick <trentm@gmail.com>
+Corey Richardson <kb1pkl@aim.com>
+Raynos <raynos2@gmail.com>
+Siddharth Mahendraker <siddharth_mahen@me.com>
View
23 node_modules/tap/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+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
82 node_modules/tap/README.md
@@ -0,0 +1,82 @@
+This is a mix-and-match set of utilities that you can use to write test
+harnesses and frameworks that communicate with one another using the
+Test Anything Protocol.
+
+If you don't yet know what TAP is, [you better ask
+somebody](http://testanything.org/).
+
+Default Usage:
+
+1. Make a directory. Maybe call it 'test'. That'd be nice and obvious.
+2. Put a bunch of test scripts in there. If they're node programs, then
+ they should be ".js". Anything else is assumed to be some kind of shell
+ script, which should have a shebang line.
+3. `npm install tap`
+4. `tap ./tests`
+
+The output will be TAP-compliant.
+
+For extra special bonus points, you can do something like this:
+
+ var test = require("tap").test
+ test("make sure the thingie is a thing", function (t) {
+ t.equal(thingie, "thing", "thingie should be thing")
+ t.type(thingie, "string", "type of thingie is string")
+ t.ok(true, "this is always true")
+ t.notOk(false, "this is never true")
+ t.test("a child test", function (t) {
+ t.equal(this, superEasy, "right!?")
+ t.similar(7, 2, "ever notice 7 is kinda like 2?", {todo: true})
+ t.test("so skippable", {skip: true}, function (t) {
+ t.plan(1) // only one test in this block
+ t.ok(true, "but when the flag changes, it'll pass")
+ // no need to end, since we had a plan.
+ })
+ t.end()
+ })
+ t.ok(99, "can also skip individual assertions", {skip: true})
+ // end lets it know it's over.
+ t.end()
+ })
+ test("another one", function (t) {
+ t.plan(1)
+ t.ok(true, "It's ok to plan, and also end. Watch.")
+ t.end() // but it must match the plan!
+ })
+
+Node-tap is actually a collection of several modules, any of which may be
+mixed and matched however you please.
+
+If you don't like this test framework, and think you can do much much
+better, *I strongly encourage you to do so!* If you use this library,
+however, at least to output TAP-compliant results when `process.env.TAP`
+is set, then the data coming out of your framework will be much more
+consumable by machines.
+
+You can also use this to build programs that *consume* the TAP data, so
+this is very useful for CI systems and such.
+
+* tap-assert: A collection of assert functions that return TAP result
+ objects.
+* tap-consumer: A stream interface for consuming TAP data.
+* tap-producer: A class that produces a TAP stream by taking in result
+ objects.
+* tap-results: A class for keeping track of TAP result objects as they
+ pass by, counting up skips, passes, fails, and so on.
+* tap-runner: A program that runs through a directory running all the
+ tests in it. (Tests which may or may not be TAP-outputting tests. But
+ it's better if they are.)
+* tap-test: A class for actually running tests.
+* tap-harness: A class that runs tests. (Tests are also Harnesses,
+ which is how sub-tests run.)
+* tap-global-harness: A default harness that provides the top-level
+ support for running TAP tests.
+
+## Experimental Code Coverage with runforcover & bunker:
+
+```
+TAP_COV=1 tap ./tests [--cover=./lib,foo.js] [--cover-dir=./coverage]
+```
+
+This feature is experimental, and will most likely change somewhat
+before being finalized. Feedback welcome.
View
19 node_modules/tap/bin/tap-http.js
@@ -0,0 +1,19 @@
+#!/usr/bin/env node
+
+// just an example, really
+// Run with `node tap-http.js path/to/tests/`
+
+var argv = process.argv.slice(2)
+ , path = require("path")
+ , Runner = require("../lib/tap-runner")
+
+ , http = require("http")
+ , server = http.createServer(function (req, res) {
+ // it'd be nice to return a non-200 if the tests fail, but we don't
+ // know the status until it's done, so that would mean not being able
+ // to pipe the output
+ res.writeHead(200, {'content-type': 'text/plain'})
+ new Runner(argv, null).pipe(res)
+ })
+
+server.listen(1337)
View
33 node_modules/tap/bin/tap-reader.js
@@ -0,0 +1,33 @@
+#!/usr/bin/env node
+
+// read a tap stream from stdin.
+
+var TapConsumer = require("../lib/tap-consumer")
+ , TapProducer = require("../lib/tap-producer")
+
+var tc = new TapConsumer
+ , tp = new TapProducer
+
+//process.stdin.pipe(tc)
+process.stdin.on("data", function (c) {
+ c = c + ""
+ // console.error(JSON.stringify(c).substr(0, 100))
+ tc.write(c)
+})
+process.stdin.on("end", function () { tc.end() })
+process.stdin.resume()
+//tc.pipe(tp)
+tc.on("data", function (c) {
+ tp.write(c)
+})
+tc.on("end", function () { tp.end() })
+
+tp.on("data", function (c) {
+ console.error(["output write", c])
+ process.stdout.write(c)
+})
+
+tp.on("end", function (er, total, ok) {
+ if (er) throw er
+ process.exit(total - ok)
+})
View
132 node_modules/tap/bin/tap.js
@@ -0,0 +1,132 @@
+#!/usr/bin/env node
+
+var argv = process.argv.slice(2)
+ , path = require("path")
+ , Runner = require("../lib/tap-runner")
+
+ , nopt = require("nopt")
+
+ , knownOpts =
+ { cover: [path, false]
+ , "cover-dir": path
+ , stderr: Boolean
+ , stdout: Boolean
+ , diag: Boolean
+ , version: Boolean
+ , tap: Boolean
+ , timeout: Number
+ , gc: Boolean
+ }
+
+ , shorthands =
+ // debugging 1: show stderr
+ { d: ["--stderr"]
+ // debugging 2: show stderr and tap
+ , dd: ["--stderr", "--tap"]
+ // debugging 3: show stderr, tap, AND always show diagnostics.
+ , ddd: ["--stderr", "--tap", "--diag"]
+ , "expose-gc": ["--gc"]
+ , g: ["--gc"]
+ , e: ["--stderr"]
+ , t: ["--timeout"]
+ , o: ["--tap"]
+ , c: ["--cover"]
+ , v: ["--version"]
+ , "?": ["--help"]
+ , h: ["--help"]
+ }
+
+ , defaults =
+ { cover: "./lib"
+ , "cover-dir": "./coverage"
+ , stderr: process.env.TAP_STDERR
+ , tap: process.env.TAP
+ , diag: process.env.TAP_DIAG
+ , timeout: +process.env.TAP_TIMEOUT || 30
+ , gc: false
+ , version: false
+ , help: false }
+
+ , options = nopt(knownOpts, shorthands)
+
+if (options.version) {
+ console.log(require("../package.json").version)
+ process.exit(0)
+}
+
+if (options.help) {
+ console.log(function(){/*
+
+Usage:
+ tap <options> <files>
+
+ Run the files as tap tests, parse the output, and report the results
+
+Options:
+
+ --stderr Print standard error output of tests to standard error.
+ --tap Print raw tap output.
+ --diag Print diagnostic output for passed tests, as well as failed.
+ (Implies --tap)
+ --gc Expose the garbage collector to tests.
+ --timeout Maximum time to wait for a subtest, in seconds. Default: 30
+ --version Print the version of node tap.
+ --help Print this help.
+
+Please report bugs! https://github.com/isaacs/node-tap/issues
+
+*/}.toString().split(/\n/).slice(1, -1).join("\n"))
+ process.exit(0)
+}
+
+
+Object.keys(defaults).forEach(function (k) {
+ if (!options.hasOwnProperty(k)) options[k] = defaults[k]
+})
+
+// other tests that might rely on these
+if (options.diag) process.env.TAP_DIAG = true
+if (options.tap) process.env.TAP = true
+if (options.timeout) process.env.TAP_TIMEOUT = options.timeout
+
+var r = new Runner(options)
+ , TapProducer = require("../lib/tap-producer")
+
+if (options.tap || options.diag) {
+ r.pipe(process.stdout)
+} else {
+ r.on("file", function (file, results, details) {
+ var s = (details.ok ? "" : "not ") + "ok "+results.name
+ , n = details.pass + "/" + details.testsTotal
+ , dots = new Array(Math.max(1, 60 - s.length - n.length)).join(".")
+ console.log("%s %s %s", s, dots, n)
+ if (details.ok) {
+ if (details.skip) {
+ console.log(" skipped: %s", details.skipTotal)
+ }
+ } else {
+ // console.error(details)
+ console.log(" Command: %s", results.command)
+ console.log(" " + TapProducer.encode(details.list)
+ .split(/\n/).join("\n "))
+ }
+ })
+ r.on("end", function () {
+ //console.log(r)
+ var s = "total"
+ , n = r.results.pass + "/" + r.results.testsTotal
+ , dots = new Array(60 - s.length - n.length).join(".")
+ , ok = r.results.ok ? "ok" : "not ok"
+ console.log("%s %s %s\n\n%s", s, dots, n, ok)
+ if (r.doCoverage) {
+ console.error( "\nCoverage: %s\n"
+ , path.resolve(r.coverageOutDir, "index.html") )
+ }
+ })
+}
+
+
+
+r.on("end", function () {
+ process.exit(r.results.tests - r.results.pass)
+})
View
15 node_modules/tap/coverage-example/lib/bar.js
@@ -0,0 +1,15 @@
+var Bar = module.exports = function(str) {
+ this.bar = str;
+ this.str = str;
+};
+
+Bar.prototype.foo = function() {
+ var self = this;
+ return self.bar;
+};
+
+Bar.prototype.baz = function() {
+ var self = this;
+ return self.str;
+};
+
View
15 node_modules/tap/coverage-example/lib/foo.js
@@ -0,0 +1,15 @@
+var Foo = module.exports = function(str) {
+ this.foo = str;
+ this.str = str;
+};
+
+Foo.prototype.bar = function() {
+ var self = this;
+ return self.foo;
+};
+
+Foo.prototype.baz = function() {
+ var self = this;
+ return self.str;
+};
+
View
20 node_modules/tap/coverage-example/test/bar.test.js
@@ -0,0 +1,20 @@
+var test = require('tap').test,
+ Bar = require('../lib/bar'),
+ bar;
+
+test('setup', function(t) {
+ bar = new Bar('baz');
+ t.ok(bar);
+ t.end();
+});
+
+test('bar', function(t) {
+ t.equal('baz', bar.foo());
+ t.end();
+});
+
+test('teardown', function(t) {
+ t.ok(true);
+ t.end();
+});
+
View
29 node_modules/tap/coverage-example/test/baz.test.js
@@ -0,0 +1,29 @@
+var test = require('tap').test,
+ Foo = require('../lib/foo'),
+ Bar = require('../lib/bar'),
+ foo, bar;
+
+test('setup', function(t) {
+ foo = new Foo('baz');
+ t.ok(foo);
+ bar = new Bar('baz');
+ t.ok(bar);
+ t.end();
+});
+
+test('baz from Foo', function(t) {
+ t.equal('baz', foo.baz());
+ t.end();
+});
+
+test('baz from Bar', function(t) {
+ t.equal('baz', bar.baz());
+ t.end();
+});
+
+
+test('teardown', function(t) {
+ t.ok(true);
+ t.end();
+});
+
View
20 node_modules/tap/coverage-example/test/foo.test.js
@@ -0,0 +1,20 @@
+var test = require('tap').test,
+ Foo = require('../lib/foo'),
+ foo;
+
+test('setup', function(t) {
+ foo = new Foo('baz');
+ t.ok(foo);
+ t.end();
+});
+
+test('bar', function(t) {
+ t.equal('baz', foo.bar());
+ t.end();
+});
+
+test('teardown', function(t) {
+ t.ok(true);
+ t.end();
+});
+
View
1  node_modules/tap/example/lib/math.js
@@ -0,0 +1 @@
+module.exports = Math
View
237 node_modules/tap/example/test/test-example.js
@@ -0,0 +1,237 @@
+var tap = require("tap")
+ , test = tap.test
+ , plan = tap.plan
+ , math
+
+test("load sut", function (t) {
+ math = require("../lib/math")
+ t.ok(math, "object loaded")
+ t.end()
+})
+
+test("validate constants", function (t) {
+ t.equal(math.LN10, 2.302585092994046, "ln 10")
+ t.equal(math.PI, 3.141592653589793, "pi")
+ t.equal(math.E, 2.718281828459045, "e")
+ t.equal(math.LOG10E, 0.4342944819032518, "log 10 e")
+ t.equal(math.SQRT2, 1.4142135623730951, "sqrt 2")
+ t.equal(math.SQRT1_2, 0.7071067811865476, "sqrt 1/2")
+ t.equal(math.LN2, 0.6931471805599453, "ln2")
+ t.end()
+})
+
+test("using this", function (t) {
+ // this also works.
+ this.equal(t, this, "call in scope of test obj")
+ this.end()
+})
+
+// test setTimeout, just a trivial example.
+test("setTimeout", function (t) {
+ var start = Date.now()
+ setTimeout(function () {
+ t.ok(Date.now() >= start + 50, "timeout fired after delay")
+ t.end()
+ }, 50)
+})
+
+// another way to do the same, using a plan.
+// this is more robust, but annoying when you have a long list
+// of tests for something. For async stuff, it's generally better,
+// since there's a higher risk of the control flowing off to lala land.
+test("setTimeout planned", function (t) {
+ t.plan(1)
+ var start = Date.now()
+ setTimeout(function () {
+ t.ok(Date.now() >= start + 50, "timeout fired after delay")
+ }, 50)
+})
+
+// plans also are good for cases where things may fire in a non-deterministic
+// order, since it won't be as obvious when everything is done.
+test("setTimeout parallel", function (t) {
+ t.plan(2)
+ var start = Date.now()
+ setTimeout(function A () {
+ t.ok(Date.now() >= start + 50, "timeout A fired after delay")
+ }, 50)
+ setTimeout(function B () {
+ t.ok(Date.now() >= start + 50, "timeout B fired after delay")
+ }, 50)
+})
+
+// something slightly less hello worldy
+test("async test", function (t) {
+ t.plan(4)
+ var fs = require("fs")
+ t.ok(fs, "fs library should load")
+ var rs = fs.createReadStream(__filename)
+ t.ok(rs, "read stream should start fine.")
+ rs.on("open", function (fd) {
+ t.type(fd, "number", "file descriptor should be a number")
+ t.equal(fd, rs.fd, "fd should match stream fd")
+ })
+})
+
+// you can bail out of the entire everything if something is just
+// Not Right (db not installed, etc.)
+test("tarp", function (parent) {
+ if (7 === 5) {
+ parent.bailout("math is broken")
+ }
+ // bailout bubbles up a bit like "error" events
+ // if unhandled, then the parent will bail, as well.
+ parent.test("child bailouts", function (child) {
+ child.on("bailout", function (s) {
+ parent.fail("children shouldn't bail.")
+ })
+ child.bailout("try to bail out, but instead just fail a test")
+ })
+
+ parent.test("child bailout 2", function (child) {
+ child.bailout("this one will bail out")
+ })
+})
+
+// tests marked "todo" can fail without counting against the overall score
+// never ever ever write tests to "verify" incorrect behavior!
+test("unfinished test", function (t) {
+ t.equal(math.cos(math.PI), -1, "cos(PI)")
+ t.equal(math.sin(math.PI), 0, "sin(PI)")
+ t.equal(math.face, "your face", "math.face should be your face # TODO")
+ t.end()
+})
+
+// tests can have children.
+test("http server", function (t) {
+ // one test plus 4 children.
+ t.plan(5)
+
+ var http = require("http")
+ , PORT = 12346
+
+ t.ok(http, "http module should load")
+ var server
+
+ t.test("set up server", function (t) {
+ t.plan(2)
+ server = http.createServer(function (req, res) {
+ t.comment("Request: "+req.url)
+ res.writeHead(200, {})
+ res.end(req.method + " " + req.url)
+ })
+ t.ok(server, "createServer should create a server")
+ server.listen(PORT, t.cb("listen should fire callback"))
+ })
+
+ // set the "parallel" flag on this one.
+ // That signals the harness to proceed immediately to the next test,
+ // and run them in parallel.
+ // Default behavior is to wait for each test to complete before proceeding
+ // to the next one.
+ // The first not-parallel test encountered will cause it to wait for that
+ // test, as well as all the parallel tests before it.
+ // A, B', C', D', E (where ' means "parallel")
+ // Runs A, and then B, C, and D in parallel, and then E.
+ t.test("testing POST", {parallel: true}, function (t) {
+ t.plan(1)
+ http.request("POST", { method: "POST"
+ , host: "localhost"
+ , path: "/foo"
+ , port: PORT }).on("response", function (res) {
+ t.bufferStream(res, function (s) { t.equal(s, "POST /foo") })
+ }).end()
+ })
+
+ t.test("testing GET", {parallel: true}, function (t) {
+ t.plan(1)
+ http.request("POST", { method: "GET"
+ , host: "localhost"
+ , path: "/foo"
+ , port: PORT }).on("response", function (res) {
+ t.bufferStream(res, function (s) { t.equal(s, "GET /foo") })
+ }).end()
+ })
+
+ // wrap in a test so that if this throws, it'll log as a failed test.
+ t.test("teardown", function (t) {
+ server.close()
+ t.end()
+ })
+})
+
+// yo dawg!
+test("meta-tests", function (t) {
+ t.plan(5)
+
+ // t.fails() wraps a child test and succeeds if it fails.
+ t.fails(t.test("this should fail", function (t) {
+ t.ok(false, "assert false")
+ t.end()
+ }))
+
+ // t.timesOut() wraps a child test and succeeds if it times out.
+ // if t.end() is called, or if a plan is completed, then it fails.
+ // set the timeout really low so that it will not take forever.
+ t.timesOut(t.test("this should timeout", { timeout: 1 }, function (t) {
+ t.ok(true, "assert true")
+ // t.end() never called.
+ }))
+
+ // t.incomplete() wraps a child test and succeeds if it ends before
+ // the plan is finished.
+ t.incomplete(t.test("this should be incomplete", function (t) {
+ t.plan(100)
+ t.ok(true, "assert true")
+ // calling end prematurely.
+ t.end()
+ }))
+
+ // t.bailsOut() wraps a child test and succeeds if it calls bailout()
+ t.bailsOut(t.test("this should bailout", function (t) {
+ t.bailout("oh noes, bailing out!")
+ }))
+
+ // low-level analysis of subtests
+ t.test("verifying test success/failure expectations", function (t) {
+ t.once("end", function () {
+ var res = t.results
+ , is = t.equal
+ // hijack!
+ t.clear()
+ is(res.ok, false, "ok")
+
+ is(res.bailedOut, false, "bailed out")
+
+ is(res.skip, 2, "skips")
+ is(res.skipPass, 1, "skip that passed")
+ is(res.skipFail, 1, "skip that failed")
+
+ is(res.todo, 2, "todos")
+ is(res.todoPass, 1, "todo that passed")
+ is(res.todoFail, 1, "todo that failed")
+
+ is(res.failTotal, 3, "failures total")
+ is(res.fail, 1, "relevant failure")
+
+ is(res.passTotal, 3, "passes total")
+ is(res.pass, 1, "relevant pass")
+
+ is(res.testsTotal, 6, "total tests")
+ is(res.tests, 2, "should be 2 relevant tests")
+
+ t.end()
+ })
+
+ // run the metatest.
+ // *this* is the actual SUT in this case.
+ t.ok(false, "failing todo #todo")
+ // can also set #todo or #skip explicitly
+ t.ok(true, "succeeding todo", {todo: true})
+ t.ok(false, "failing skip #skip", {skip: true})
+ t.ok(true, "suceeding skip #skip")
+ t.ok(false, "failing test")
+ t.ok(true, "succeeding test")
+ t.end()
+ })
+})
View
16 node_modules/tap/lib/main.js
@@ -0,0 +1,16 @@
+
+var GlobalHarness = require("./tap-global-harness")
+
+// this lets you do stuff like:
+// var test = require("tap").test
+// test(...)
+// to run stuff in the global harness.
+exports = module.exports = new GlobalHarness()
+
+exports.createProducer = exports.Producer = require("./tap-producer")
+exports.createConsumer = exports.Consumer = require("./tap-consumer")
+exports.yamlish = require("yamlish")
+exports.createTest = exports.Test = require("./tap-test")
+exports.createHarness = exports.Harness = require("./tap-harness")
+exports.createRunner = exports.Runner = require("./tap-runner")
+exports.assert = require("./tap-assert")
View
444 node_modules/tap/lib/tap-assert.js
@@ -0,0 +1,444 @@
+// an assert module that returns tappable data for each assertion.
+var difflet = require('difflet')
+ , deepEqual = require('deep-equal')
+ , bufferEqual = require('buffer-equal')
+
+module.exports = assert
+
+var syns = {}
+ , id = 1
+
+function assert (ok, message, extra) {
+ if (extra && extra.skip) return assert.skip(message, extra)
+
+ //console.error("assert %j", [ok, message, extra])
+ //if (extra && extra.skip) return assert.skip(message, extra)
+ //console.error("assert", [ok, message, extra])
+ ok = !!ok
+ var res = { id : id ++, ok: ok }
+
+ var caller = getCaller(extra && extra.error)
+ if (extra && extra.error) {
+ res.type = extra.error.name
+ res.message = extra.error.message
+ res.code = extra.error.code
+ || extra.error.type
+ res.errno = extra.error.errno
+ delete extra.error
+ }
+ if (caller.file) {
+ res.file = caller.file
+ res.line = +caller.line
+ res.column = +caller.column
+ }
+ res.stack = caller.stack
+
+ res.name = message || "(unnamed assert)"
+
+ if (extra) Object.keys(extra).forEach(function (k) {
+ if (!res.hasOwnProperty(k)) res[k] = extra[k]
+ })
+
+ // strings and objects are hard to diff by eye
+ if (!ok &&
+ res.hasOwnProperty("found") &&
+ res.hasOwnProperty("wanted") &&
+ res.found !== res.wanted) {
+ if (typeof res.wanted !== typeof res.found ||
+ typeof res.wanted === "object" && (!res.found || !res.wanted)) {
+ res.type = { found: typeof found
+ , wanted: typeof wanted }
+ } else if (typeof res.wanted === "string") {
+ res.diff = diffString(res.found, res.wanted)
+ } else if (typeof res.wanted === "object") {
+ res.diff = diffObject(res.found, res.wanted)
+ }
+ }
+
+ //console.error("assert return", res)
+
+ return res
+}
+assert.ok = assert
+syns.ok = [ "true", "assert" ]
+
+
+function notOk (ok, message, extra) {
+ return assert(!ok, message, extra)
+}
+assert.notOk = notOk
+syns.notOk = [ "false", "notok" ]
+
+function error (er, message, extra) {
+ if (!er) {
+ // just like notOk(er)
+ return assert(!er, message, extra)
+ }
+ message = message || er.message
+ extra = extra || {}
+ extra.error = er
+ return assert.fail(message, extra)
+}
+assert.error = error
+syns.error = [ "ifError", "ifErr", "iferror" ]
+
+
+function pass (message, extra) {
+ return assert(true, message, extra)
+}
+assert.pass = pass
+
+function fail (message, extra) {
+ //console.error("assert.fail", [message, extra])
+ //if (extra && extra.skip) return assert.skip(message, extra)
+ return assert(false, message, extra)
+}
+assert.fail = fail
+
+function skip (message, extra) {
+ //console.error("assert.skip", message, extra)
+ if (!extra) extra = {}
+ return { id: id ++, skip: true, name: message || "" }
+}
+assert.skip = skip
+
+function throws (fn, wanted, message, extra) {
+ if (typeof wanted === "string") {
+ extra = message
+ message = wanted
+ wanted = null
+ }
+
+ if (extra && extra.skip) return assert.skip(message, extra)
+
+ var found = null
+ try {
+ fn()
+ } catch (e) {
+ found = { name: e.name, message: e.message }
+ }
+
+ extra = extra || {}
+
+ extra.found = found
+ if (wanted) {
+ wanted = { name: wanted.name, message: wanted.message }
+ extra.wanted = wanted
+ }
+
+ if (!message) {
+ message = "Expected to throw"
+ if (wanted) message += ": "+wanted.name + " " + wanted.message
+ }
+
+ return (wanted) ? assert.similar(found, wanted, message, extra)
+ : assert.ok(found, message, extra)
+}
+assert.throws = throws
+
+
+function doesNotThrow (fn, message, extra) {
+ if (extra && extra.skip) return assert.skip(message, extra)
+ var found = null
+ try {
+ fn()
+ } catch (e) {
+ found = {name: e.name, message: e.message}
+ }
+ message = message || "Should not throw"
+
+ return assert.equal(found, null, message, extra)
+}
+assert.doesNotThrow = doesNotThrow
+
+
+function equal (a, b, message, extra) {
+ if (extra && extra.skip) return assert.skip(message, extra)
+ extra = extra || {}
+ message = message || "should be equal"
+ extra.found = a
+ extra.wanted = b
+ return assert(a === b, message, extra)
+}
+assert.equal = equal
+syns.equal = ["equals"
+ ,"isEqual"
+ ,"is"
+ ,"strictEqual"
+ ,"strictEquals"]
+
+
+function equivalent (a, b, message, extra) {
+ if (extra && extra.skip) return assert.skip(message, extra)
+ var extra = extra || {}
+ message = message || "should be equivalent"
+ extra.found = a
+ extra.wanted = b
+
+ if (Buffer.isBuffer(a) && Buffer.isBuffer(b)) {
+ return assert(bufferEqual(a, b), message, extra)
+ } else {
+ return assert(deepEqual(a, b), message, extra)
+ }
+}
+assert.equivalent = equivalent
+syns.equivalent = ["isEquivalent"
+ ,"looseEqual"
+ ,"looseEquals"
+ ,"isDeeply"
+ ,"same"
+ ,"deepEqual"
+ ,"deepEquals"]
+
+
+function inequal (a, b, message, extra) {
+ if (extra && extra.skip) return assert.skip(message, extra)
+ extra = extra || {}
+ message = message || "should not be equal"
+ extra.found = a
+ extra.doNotWant = b
+ return assert(a !== b, message, extra)
+}
+assert.inequal = inequal
+syns.inequal = ["notEqual"
+ ,"notEquals"
+ ,"notStrictEqual"
+ ,"notStrictEquals"
+ ,"isNotEqual"
+ ,"isNot"
+ ,"not"
+ ,"doesNotEqual"
+ ,"isInequal"]
+
+
+function inequivalent (a, b, message, extra) {
+ if (extra && extra.skip) return assert.skip(message, extra)
+ extra = extra || {}
+ message = message || "should not be equivalent"
+ extra.found = a
+ extra.doNotWant = b
+
+ if (Buffer.isBuffer(a) && Buffer.isBuffer(b)) {
+ return assert(!bufferEqual(a, b), message, extra)
+ } else {
+ return assert(!deepEqual(a, b), message, extra)
+ }
+}
+assert.inequivalent = inequivalent
+syns.inequivalent = ["notEquivalent"
+ ,"notDeepEqual"
+ ,"notDeeply"
+ ,"notSame"
+ ,"isNotDeepEqual"
+ ,"isNotDeeply"
+ ,"isNotEquivalent"
+ ,"isInequivalent"]
+
+function similar (a, b, message, extra, flip) {
+ if (extra && extra.skip) return assert.skip(message, extra)
+ // test that a has all the fields in b
+ message = message || "should be similar"
+
+ if (typeof a === "string" &&
+ (Object.prototype.toString.call(b) === "[object RegExp]")) {
+ extra = extra || {}
+ extra.pattern = b
+ extra.string = a
+ var ok = a.match(b)
+ extra.match = ok
+ if (flip) ok = !ok
+ return assert.ok(ok, message, extra)
+ }
+
+ var isObj = assert(a && typeof a === "object", message, extra)
+ if (!isObj.ok) {
+ // not an object
+ if (a == b) isObj.ok = true
+ if (flip) isObj.ok = !isObj.ok
+ return isObj
+ }
+
+ var eq = flip ? inequivalent : equivalent
+ return eq(selectFields(a, b), b, message, extra)
+}
+assert.similar = similar
+syns.similar = ["isSimilar"
+ ,"has"
+ ,"hasFields"
+ ,"like"
+ ,"isLike"]
+
+function dissimilar (a, b, message, extra) {
+ if (extra && extra.skip) return assert.skip(message, extra)
+ message = message || "should be dissimilar"
+ return similar(a, b, message, extra, true)
+}
+assert.dissimilar = dissimilar
+syns.dissimilar = ["unsimilar"
+ ,"notSimilar"
+ ,"unlike"
+ ,"isUnlike"
+ ,"notLike"
+ ,"isNotLike"
+ ,"doesNotHave"
+ ,"isNotSimilar"
+ ,"isDissimilar"]
+
+function type (thing, t, message, extra) {
+ if (extra && extra.skip) return assert.skip(message, extra)
+ var name = t
+ if (typeof name === "function") name = name.name || "(anonymous ctor)"
+ //console.error("name=%s", name)
+ message = message || "type is "+name
+ var type = typeof thing
+ //console.error("type=%s", type)
+ if (!thing && type === "object") type = "null"
+ if (type === "object" && t !== "object") {
+ if (typeof t === "function") {
+ //console.error("it is a function!")
+ extra = extra || {}
+ extra.found = Object.getPrototypeOf(thing).constructor.name
+ extra.wanted = name
+ //console.error(thing instanceof t, name)
+ return assert.ok(thing instanceof t, message, extra)
+ }
+
+ //console.error("check prototype chain")
+ // check against classnames or objects in prototype chain, as well.
+ // type(new Error("asdf"), "Error")
+ // type(Object.create(foo), foo)
+ var p = thing
+ while (p = Object.getPrototypeOf(p)) {
+ if (p === t || p.constructor && p.constructor.name === t) {
+ type = name
+ break
+ }
+ }
+ }
+ //console.error(type, name, type === name)
+ return assert.equal(type, name, message, extra)
+}
+assert.type = type
+syns.type = ["isa"]
+
+// synonyms are helpful.
+Object.keys(syns).forEach(function (c) {
+ syns[c].forEach(function (s) {
+ Object.defineProperty(assert, s, { value: assert[c], enumerable: false })
+ })
+})
+
+// helpers below
+
+function selectFields (a, b) {
+ // get the values in A of the fields in B
+ var ret = Array.isArray(b) ? [] : {}
+ Object.keys(b).forEach(function (k) {
+ if (!a.hasOwnProperty(k)) return
+ var v = b[k]
+ , av = a[k]
+ if (v && av && typeof v === "object" && typeof av === "object"
+ && !(v instanceof Date)
+ && !(v instanceof RegExp)
+ && !(v instanceof String)
+ && !(v instanceof Boolean)
+ && !(v instanceof Number)
+ && !(Array.isArray(v))) {
+ ret[k] = selectFields(av, v)
+ } else ret[k] = av
+ })
+ return ret
+}
+
+function sortObject (obj) {
+ if (typeof obj !== 'object' || Array.isArray(obj) || obj === null) {
+ return obj
+ }
+
+ return Object.keys(obj).sort().reduce(function (acc, key) {
+ acc[key] = sortObject(obj[key])
+ return acc
+ }, {})
+}
+
+function stringify (a) {
+ return JSON.stringify(sortObject(a), (function () {
+ var seen = []
+ , keys = []
+ return function (key, val) {
+ var s = seen.indexOf(val)
+ if (s !== -1) {
+ return "[Circular: "+keys[s]+"]"
+ }
+ if (val && typeof val === "object" || typeof val === "function") {
+ seen.push(val)
+ keys.push(val["!"] || val.name || key || "<root>")
+ if (typeof val === "function") {
+ return val.toString().split(/\n/)[0]
+ } else if (typeof val.toUTCString === "function") {
+ return val.toUTCString()
+ }
+ }
+ return val
+ }})())
+}
+
+function diffString (f, w) {
+ if (w === f) return null
+ var p = 0
+ , l = w.length
+ while (p < l && w.charAt(p) === f.charAt(p)) p ++
+ w = stringify(w).substr(1).replace(/"$/, "")
+ f = stringify(f).substr(1).replace(/"$/, "")
+ return diff(f, w, p)
+}
+
+function diffObject (f, w) {
+ return difflet({ indent : 2, comment : true }).compare(w, f)
+}
+
+function diff (f, w, p) {
+ if (w === f) return null
+ var i = p || 0 // it's going to be at least p. JSON can only be bigger.
+ , l = w.length
+ while (i < l && w.charAt(i) === f.charAt(i)) i ++
+ var pos = Math.max(0, i - 20)
+ w = w.substr(pos, 40)
+ f = f.substr(pos, 40)
+ var pointer = i - pos
+ return "FOUND: "+f+"\n"
+ + "WANTED: "+w+"\n"
+ + (new Array(pointer + 9).join(" "))
+ + "^ (at position = "+p+")"
+}
+
+function getCaller (er) {
+ // get the first file/line that isn't this file.
+ if (!er) er = new Error
+ var stack = er.stack || ""
+ stack = stack.split(/\n/)
+ for (var i = 1, l = stack.length; i < l; i ++) {
+ var s = stack[i].match(/\(([^):]+):([0-9]+):([0-9]+)\)$/)
+ if (!s) continue
+ var file = s[1]
+ , line = +s[2]
+ , col = +s[3]
+ if (file.indexOf(__dirname) === 0) continue
+ if (file.match(/tap-test\/test.js$/)) continue
+ else break
+ }
+ var res = {}
+ if (file && file !== __filename && !file.match(/tap-test\/test.js$/)) {
+ res.file = file
+ res.line = line
+ res.column = col
+ }
+
+ res.stack = stack.slice(1).map(function (s) {
+ return s.replace(/^\s*at\s*/, "")
+ })
+
+ return res
+}
+
+
View
63 node_modules/tap/lib/tap-browser-harness.js
@@ -0,0 +1,63 @@
+// this is just a harness that pipes to stdout.
+// It's the default one.
+module.exports = BrowserHarness
+
+var BrowserHarness = global.TAP_Browser_Harness
+ , inherits = require("inherits")
+ , Results = require("./tap-results")
+ , Harness = require("./tap-harness")
+ , Test = require("./tap-test")
+
+inherits(BrowserHarness, Harness)
+function BrowserHarness (outPipe) {
+ //console.error("calling BrowserHarness")
+ if (browserHarness) return browserHarness
+ if (!(this instanceof BrowserHarness)) {
+ return browserHarness = new BrowserHarness
+ }
+ browserHarness = global.TAP_Browser_Harness = this
+ BrowserHarness.super.call(this, Test)
+
+ if (outPipe) this.output.pipe(outPipe)
+
+ this.test = this.test.bind(this)
+
+ this.plan = this.plan.bind(this)
+
+ var output = this.output
+ this.on("childEnd", function (child) {
+ //console.error("childEnd in global harness")
+ //console.error(child.results)
+ // write out the stuff for this child.
+ //console.error("child.conf", child.conf)
+ output.write(child.conf.name || "(unnamed test)")
+ // maybe write some other stuff about the number of tests in this
+ // thing, etc. I dunno.
+ //console.error("child results", child.results)
+ this.results.list.forEach(function (res) {
+ //delete res.error
+ //console.error("child resuilt", res)
+ output.write(res)
+ })
+ //console.error("wrote child results")
+ this.results.list.length = 0
+ })
+
+ var streamEnded = false
+ this.on("end", function () {
+ //console.error("global ending the stream")
+ if (!streamEnded) {
+ this.results.list.forEach(function (res) {
+ output.write(res)
+ })
+ this.results.list.length = 0
+ output.end()
+ streamEnded = true
+ }
+ })
+
+ // TODO: handle global errors
+ // process.on("unhandledException", function (e) {
+ // this.bailout("unhandled exception: " + e.message)
+ // })
+}
View
243 node_modules/tap/lib/tap-consumer.js
@@ -0,0 +1,243 @@
+module.exports = TapConsumer
+
+// pipe a stream into this that's emitting tap-formatted data,
+// and it'll emit "data" events with test objects or comment strings
+// and an "end" event with the final results.
+
+var yamlish = require("yamlish")
+ , Results = require("./tap-results")
+ , inherits = require("inherits")
+
+TapConsumer.decode = TapConsumer.parse = function (str) {
+ var tc = new TapConsumer
+ , list = []
+ tc.on("data", function (res) {
+ list.push(res)
+ })
+ tc.end(str)
+ tc.results.list = list
+ return tc.results
+}
+
+inherits(TapConsumer, require("stream").Stream)
+function TapConsumer () {
+ if (!(this instanceof TapConsumer)) {
+ return new TapConsumer
+ }
+
+ TapConsumer.super.call(this)
+ this.results = new Results
+ this.readable = this.writable = true
+
+ this.on("data", function (res) {
+ if (typeof res === "object") this.results.add(res)
+ })
+
+ this._plan = null
+ this._buffer = ""
+ this._indent = []
+ this._current = null
+ this._actualCount = 0
+ this._passed = []
+ this._failed = []
+ //console.error("TapConsumer ctor done")
+}
+
+TapConsumer.prototype.bailedOut = false
+
+TapConsumer.prototype.write = function (chunk) {
+ if (!this.writable) this.emit("error", new Error("not writable"))
+ if (this.bailedOut) return true
+
+ this._buffer = this._buffer + chunk
+ // split it up into lines.
+ var lines = this._buffer.split(/\r?\n/)
+ // ignore the last line, since it might be incomplete.
+ this._buffer = lines.pop()
+
+ for (var i = 0, l = lines.length; i < l; i ++) {
+ //console.error([i, lines[i]])
+ // see if it's indented.
+ var line = lines[i]
+ , spaces = (this._indent.length && !line.trim())
+ || line.match(/^\s/)
+ // at this level, only interested in fully undented stuff.
+ if (spaces) {
+ var c = i
+ while (c < l && (!lines[c].trim() || lines[c].match(/^\s/))) {
+ this._indent.push(lines[c++])
+ }
+ //console.error(c-i, "indented", this._indent, this._current)
+ i = c - 1
+ continue
+ }
+ // some kind of line. summary, ok, notok, comment, or garbage.
+ // this also finishes parsing any of the indented lines from before
+ this._parseLine(line)
+ }
+ return true
+}
+
+TapConsumer.prototype.end = function () {
+ // finish up any hanging indented sections or final buffer
+ if (this._buffer.match(/^\s/)) this._indent.push(this.buffer)
+ else this._parseLine(this._buffer)
+
+ if (!this.bailedOut &&
+ this._plan !== null &&
+ this.results.testsTotal !== this._plan) {
+ while (this._actualCount < this._plan) {
+ this.emit("data", {ok: false, name:"MISSING TEST",
+ id:this._actualCount ++ })
+ }
+ }
+
+ this._parseLine("")
+ this._buffer = ""
+ this.writable = false
+ this.emit("end", null, this._actualCount, this._passed)
+}
+
+TapConsumer.prototype._parseLine = function (line) {
+ if (this.bailedOut) return
+ //console.error("_parseLine", [line])
+ // if there are any indented lines, and there is a
+ // current object already, then they belong to it.
+ // if there is not a current object, then they're garbage.
+ if (this._current && this._indent.length) {
+ this._parseIndented()
+ }
+ this._indent.length = 0
+ if (this._current) {
+ if (this._current.ok) this._passed.push(this._current.id)
+ else this._failed.push(this._current.id)
+ this.emit("data", this._current)
+ }
+ this._current = null
+ line = line.trim()
+ if (!line) return
+ // try to see what kind of line this is.
+
+ var bo
+ if (bo = line.match(/^bail out!\s*(.*)$/i)) {
+ this.bailedOut = true
+ // this.emit("error", new Error(line))
+ this.emit("bailout", bo[1])
+ return
+ }
+
+ if (line.match(/^#/)) { // just a comment
+ line = line.replace(/^#+/, "").trim()
+ // console.error("outputting comment", [line])
+ if (line) this.emit("data", line)
+ return
+ }
+
+ var plan = line.match(/^([0-9]+)\.\.([0-9]+)(?:\s+#(.*))?$/)
+ if (plan) {
+ var start = +(plan[1])
+ , end = +(plan[2])
+ , comment = plan[3]
+
+ // TODO: maybe do something else with this?
+ // it might be something like: "1..0 #Skip because of reasons"
+ this._plan = end
+ this.emit("plan", end, comment)
+ // plan must come before or after all tests.
+ if (this._actualCount !== 0) {
+ this._sawPlan = true
+ }
+ return
+ }
+
+ if (line.match(/^(not )?ok(?:\s+([0-9]+))?/)) {
+ this._parseResultLine(line)
+ return
+ }
+
+ // garbage. emit as a comment.
+ //console.error("emitting", [line.trim()])
+ if (line.trim()) this.emit("data", line.trim())
+}
+
+TapConsumer.prototype._parseDirective = function (line) {
+ line = line.trim()
+ if (line.match(/^TODO\b/i)) {
+ return { todo:true, explanation: line.replace(/^TODO\s*/i, "") }
+ } else if (line.match(/^SKIP\b/i)) {
+ return { skip:true, explanation: line.replace(/^SKIP\s*/i, "") }
+ }
+}
+
+TapConsumer.prototype._parseResultLine = function (line) {
+ this._actualCount ++
+ if (this._sawPlan) {
+ this.emit("data", {ok: false, name:"plan in the middle of tests"
+ ,id:this._actualCount ++})
+ }
+ var parsed = line.match(/^(not )?ok(?: ([0-9]+))?(?:(?: - )?(.*))?$/)
+ , ok = !parsed[1]
+ , id = +(parsed[2] || this._actualCount)
+ , rest = parsed[3] || ""
+ , name
+ , res = { id:id, ok:ok }
+
+ // split on un-escaped # characters
+
+ //console.log("# "+JSON.stringify([name, rest]))
+ rest = rest.replace(/([^\\])((?:\\\\)*)#/g, "$1\n$2").split("\n")
+ name = rest.shift()
+ rest = rest.filter(function (r) { return r.trim() }).join("#")
+ //console.log("# "+JSON.stringify([name, rest]))
+
+ // now, let's see if there's a directive in there.
+ var dir = this._parseDirective(rest.trim())
+ if (!dir) name += rest ? "#" + rest : ""
+ else {
+ res.ok = true
+ if (dir.skip) res.skip = true
+ else if (dir.todo) res.todo = true
+ if (dir.explanation) res.explanation = dir.explanation
+ }
+ res.name = name
+
+ //console.error(line, [ok, id, name])
+ this._current = res
+}
+
+TapConsumer.prototype._parseIndented = function () {
+ // pull yamlish block out
+ var ind = this._indent
+ , ys
+ , ye
+ , yind
+ , diag
+ //console.error(ind, this._indent)
+ for (var i = 0, l = ind.length; i < l; i ++) {
+ var line = ind[i]
+ , lt = line.trim()
+ if (!ys) {
+ ys = line.match(/^(\s*)---(.*)$/)
+ if (ys) {
+ yind = ys[1]
+ diag = [ys[2]]
+ //console.error([line,ys, diag])
+ continue
+ } else if (lt) this.emit("data", lt)
+ } else if (ys && !ye) {
+ if (line === yind + "...") ye = true
+ else {
+ diag.push(line.substr(yind.length))
+ }
+ } else if (ys && ye && lt) this.emit("data", lt)
+ }
+ if (diag) {
+ //console.error('about to parse', diag)
+ diag = yamlish.decode(diag.join("\n"))
+ //console.error('parsed', diag)
+ Object.keys(diag).forEach(function (k) {
+ //console.error(this._current, k)
+ if (!this._current.hasOwnProperty(k)) this._current[k] = diag[k]
+ }, this)
+ }
+}
View
78 node_modules/tap/lib/tap-cov-html.js
@@ -0,0 +1,78 @@
+var fs = require('fs'),
+ path = require('path'),
+ asyncMap = require("slide").asyncMap,
+ util = require('util');
+
+var CovHtml = module.exports = function(cov_stats, cov_dir, cb) {
+ var index = [];
+
+ asyncMap(
+ Object.keys(cov_stats),
+ function(f, cb) {
+ var st = cov_stats[f],
+ missing_lines = st.missing.map(function(l) {
+ return l.number;
+ }),
+ out = '<!doctype html>\n<html lang="en">\n<head>\n ' +
+ '<meta charset="utf-8">\n <title>' +
+
+ f + ' (' + st.loc + ')</title>\n' +
+ '<style type="text/css">\n' +
+ 'li {\n' +
+ ' font-family: monospace;\n' +
+ ' white-space: pre;\n' +
+ '}\n' +
+ '</style>\n' +
+ '</head>\n<body>\n' +
+ '<h1>' + f + ' (' + st.loc + ')' + '</h1>' +
+ '<h2>Run: ' + (st.missing.length ? st.loc - st.missing.length : st.loc) + ', Missing: ' +
+ st.missing.length + ', Percentage: ' + st.percentage + '</h2>' +
+ '<h2>Source:</h2>\n' +
+ '<ol>\n' +
+ st.lines.map(function(line) {
+ var number = line.number,
+ color = (missing_lines.indexOf(number) !== -1) ? '#fcc' : '#cfc';
+ return '<li id="L' + line.number + '" style="background-color: ' + color +
+ ';">' + line.source.replace(/</g, "&lt;") + '</li>';
+ }).join('\n') +
+ '</ol>\n' +
+ '<h2>Data</h2>\n'+
+ '<pre>' + util.inspect(st, true, Infinity, false).replace(/</g, "&lt;") + '</pre></body>\n</html>';
+
+ fs.writeFile(
+ cov_dir + '/' +
+ f.replace(process.cwd() + '/', '').replace(/\//g, '+') + '.html',
+ out,
+ 'utf8',
+ function(err) {
+ if (err) {
+ throw err;
+ }
+ index.push(f);
+ cb();
+ });
+ },
+ function(err) {
+ if (err) {
+ throw err;
+ }
+ var out = '<!doctype html>\n<html lang="en">\n<head>\n ' +
+ '<meta charset="utf-8">\n <title>Coverage Index</title>\n</head>\n' +
+ '<body>\n<h1>Code Coverage Information</h1>\n<ul>' +
+ index.map(function(fname) {
+ return '<li><a href="' +
+ fname.replace(process.cwd() + '/', '').replace(/\//g, '+') + '.html' +
+ '">' + fname + '</a></li>';
+ }).join('\n') + '</ul>\n</body>\n</html>';
+
+ fs.writeFile(cov_dir + '/index.html', out, 'utf8', function(err) {
+ if (err) {
+ throw err;
+ }
+ cb();
+ });
+ }
+ );
+};
+
+
View
68 node_modules/tap/lib/tap-global-harness.js
@@ -0,0 +1,68 @@
+// this is just a harness that pipes to stdout.
+// It's the default one.
+module.exports = GlobalHarness
+
+var globalHarness = global.TAP_Global_Harness
+ , inherits = require("inherits")
+ , Results = require("./tap-results")
+ , Harness = require("./tap-harness")
+ , Test = require("./tap-test")
+
+inherits(GlobalHarness, Harness)
+function GlobalHarness () {
+ //console.error("calling GlobalHarness")
+ if (globalHarness) return globalHarness
+ if (!(this instanceof GlobalHarness)) {
+ return globalHarness = new GlobalHarness
+ }
+
+ globalHarness = global.TAP_Global_Harness = this
+ GlobalHarness.super.call(this, Test)
+
+ this.output.pipe(process.stdout)
+ //this.output.on("data", function () {
+ // process.nextTick(process.stdout.flush.bind(process.stdout))
+ //})
+
+ this.test = this.test.bind(this)
+
+ this.plan = this.plan.bind(this)
+
+ var output = this.output
+ this.on("childEnd", function (child) {
+ //console.error("childEnd in global harness")
+ //console.error(child.results)
+ // write out the stuff for this child.
+ //console.error("child.conf", child.conf)
+ output.write(child.conf.name || "(unnamed test)")
+ // maybe write some other stuff about the number of tests in this
+ // thing, etc. I dunno.
+ //console.error("child results", child.results)
+ this.results.list.forEach(function (res) {
+ //delete res.error
+ //console.error("child resuilt", res)
+ output.write(res)
+ })
+ //console.error("wrote child results")
+ this.results.list.length = 0
+ })
+
+ var streamEnded = false
+ this.on("end", function () {
+ //console.error("global ending the stream")
+ if (!streamEnded) {
+ this.results.list.forEach(function (res) {
+ output.write(res)
+ })
+ this.results.list.length = 0
+ output.end()
+ streamEnded = true
+ }
+ })
+
+ //this.on("end", this.output.end.bind(this.output))
+
+ process.on("unhandledException", function (e) {
+ this.bailout("unhandled exception: " + e.message)
+ })
+}
View
221 node_modules/tap/lib/tap-harness.js
@@ -0,0 +1,221 @@
+// a thing that runs tests.
+// Every "test" is also a harness. If they do not have a harness,
+// then they are attached to the defaut "global harness",
+// which writes its results to stdout.
+
+
+// TODO:
+// - Bailout should stop running any tests.
+// - "skip" in the test config obj should skip it.
+
+module.exports = Harness
+require("inherits")(Harness, require("events").EventEmitter)
+
+var Results = require("./tap-results")
+ , TapProducer = require("./tap-producer")
+ , assert = require("./tap-assert")
+
+function Harness (Test) {
+ if (!(this instanceof Harness)) return new Harness(Test)
+
+ //console.error("Test in "+this.constructor.name, Test)
+
+ this._Test = Test
+ this._plan = null
+ this._children = []
+ this._started = false
+
+ this._testCount = 0
+ this._planSum = 0
+
+ this.results = new Results()
+ // emit result events on the harness.
+ //this.results.on("result", function (res) {
+ // console.error("proxying result ev from res to harness")
+ // this.emit("result", res)
+ //}.bind(this))
+ var me = this
+ this.results.on("result", this.emit.bind(this, "result"))
+
+ var p = this.process.bind(this)
+ this.process = function () {
+ this._started = true
+ process.nextTick(p)
+ }
+
+ this.output = new TapProducer()
+ Harness.super.call(this)
+}
+
+// this function actually only gets called bound to
+// the Harness object, and on process.nextTick. Even if
+// passed as an event handler, everything *else* will
+// happen before it gets called.
+Harness.prototype.process = function () {
+ //console.error("harness process")
+ // "end" can emit multiple times, so only actually move on
+ // to the next test if the current one is actually over.
+ // TODO: multiple in-process tests, if all are marked "async"
+ if (this._current) {
+ if (!this._current._ended) return
+ // handle the current one before moving onto the next.
+ this.childEnd(this._current)
+ }
+ var skip = true
+ while (skip) {
+ //console.error("checking for skips")
+ var current = this._current = this._children.shift()
+ if (current) {
+ skip = current.conf.skip
+ if (skip) {
+ //console.error("add a failure for the skipping")
+ this.results.add(assert.fail(current.conf.name
+ ,{skip:true, diag:false}))
+ }
+ } else skip = false
+ }
+
+ // keep processing through skipped tests, instead of running them.
+ if (current && this._bailedOut) {
+ return this.process()
+ }
+
+ //console.error("got current?", !!current)
+ if (current) {
+ current.on("end", this.process)
+ current.emit("ready")
+ //console.error("emitted ready")
+ //console.error("_plan", this._plan, this.constructor.name)
+ } else {
+ //console.error("Harness process: no more left. ending")
+ if (this._endNice) {
+ this._endNice()
+ } else {
+ this.end()
+ }
+ }
+}
+
+Harness.prototype.end = function () {
+ if (this._children.length) {
+ return this.process()
+ }
+ //console.error("harness end", this.constructor.name)
+ if (this._bailedOut) return
+
+ // can't call .end() more than once.
+ if (this._ended) {
+ //console.error("adding failure for end calling")
+ this.results.add(assert.fail("end called more than once"))
+ }
+
+ // see if the plan is completed properly, if there was one.
+ if (this._plan !== null) {
+ var total = this._testCount
+ if (total !== this._plan) {
+ this.results.add(assert.equal(total, this._plan, "test count != plan"))
+ }
+ this._plan = total
+ }
+
+ //console.error("setting ended true", this.constructor.name)
+ this._ended = true
+ this.emit("end")
+}
+
+Harness.prototype.plan = function (p) {
+ //console.error("setting plan", new Error().stack)
+ if (this._plan !== null) {
+ //console.error("about to add failure for calling plan")
+ return this.results.add(assert.fail("plan set multiple times"))
+ }
+ this._plan = p
+ if (p === 0 || this.results.testsTotal) {
+ this.end()
+ }
+}
+
+Harness.prototype.childEnd = function (child) {
+ //console.error("childEnd")
+ this._testCount ++
+ this._planSum += child._plan
+ //console.error("adding set of child.results")
+ this.results.addSet(child.results)
+ this.emit("childEnd", child)
+ // was this planned?
+ if (this._plan === this._testCount) {
+ //console.error("plan", [this._plan, this._testCount])
+ return this.end()
+ }
+}
+
+function copyObj(o) {
+ var copied = {}
+ Object.keys(o).forEach(function (k) { copied[k] = o[k] })
+ return copied
+}
+
+Harness.prototype.test = function test (name, conf, cb) {
+ if (this._bailedOut) return
+
+ if (typeof conf === "function") cb = conf, conf = null
+ if (typeof name === "object") conf = name, name = null
+ if (typeof name === "function") cb = name, name = null
+
+ conf = (conf ? copyObj(conf) : {})
+ name = name || ""
+
+ //console.error("making test", [name, conf, cb])
+
+ // timeout: value in milliseconds. Defaults to 30s
+ // Set to Infinity to have no timeout.
+ if (isNaN(conf.timeout)) conf.timeout = 30000
+ var t = new this._Test(this, name, conf)
+ var self = this
+ if (cb) {
+ //console.error("attaching cb to ready event")
+ t.on("ready", function () {
+ if (!isNaN(conf.timeout) && isFinite(conf.timeout)) {
+ var timer = setTimeout(this.timeout.bind(this), conf.timeout)
+ var clear = function () {
+ clearTimeout(timer)
+ }
+ t.on("end", clear)
+ t.on("bailout", function (message) {
+ self.bailout(message)
+ clear()
+ })
+ }
<