wiki-plugin-allyabase 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2354) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +165 -0
  3. package/client/allyabase.js +58 -0
  4. package/factory.json +5 -0
  5. package/package.json +31 -0
  6. package/server/contracts.js +256 -0
  7. package/server/feeds.js +27 -0
  8. package/server/inventory.js +82 -0
  9. package/server/server.js +13 -0
  10. package/test/node_modules/.bin/_mocha +10 -0
  11. package/test/node_modules/.bin/flat +42 -0
  12. package/test/node_modules/.bin/glob +270 -0
  13. package/test/node_modules/.bin/he +148 -0
  14. package/test/node_modules/.bin/js-yaml +126 -0
  15. package/test/node_modules/.bin/mime +46 -0
  16. package/test/node_modules/.bin/mocha +142 -0
  17. package/test/node_modules/.bin/node-which +52 -0
  18. package/test/node_modules/.bin/uuid +2 -0
  19. package/test/node_modules/.package-lock.json +1984 -0
  20. package/test/node_modules/@isaacs/cliui/LICENSE.txt +14 -0
  21. package/test/node_modules/@isaacs/cliui/README.md +143 -0
  22. package/test/node_modules/@isaacs/cliui/build/index.cjs +317 -0
  23. package/test/node_modules/@isaacs/cliui/build/index.d.cts +43 -0
  24. package/test/node_modules/@isaacs/cliui/build/lib/index.js +302 -0
  25. package/test/node_modules/@isaacs/cliui/index.mjs +14 -0
  26. package/test/node_modules/@isaacs/cliui/package.json +86 -0
  27. package/test/node_modules/@noble/curves/LICENSE +21 -0
  28. package/test/node_modules/@noble/curves/README.md +1031 -0
  29. package/test/node_modules/@noble/curves/_shortw_utils.d.ts +62 -0
  30. package/test/node_modules/@noble/curves/_shortw_utils.d.ts.map +1 -0
  31. package/test/node_modules/@noble/curves/_shortw_utils.js +21 -0
  32. package/test/node_modules/@noble/curves/_shortw_utils.js.map +1 -0
  33. package/test/node_modules/@noble/curves/abstract/bls.d.ts +122 -0
  34. package/test/node_modules/@noble/curves/abstract/bls.d.ts.map +1 -0
  35. package/test/node_modules/@noble/curves/abstract/bls.js +288 -0
  36. package/test/node_modules/@noble/curves/abstract/bls.js.map +1 -0
  37. package/test/node_modules/@noble/curves/abstract/curve.d.ts +70 -0
  38. package/test/node_modules/@noble/curves/abstract/curve.d.ts.map +1 -0
  39. package/test/node_modules/@noble/curves/abstract/curve.js +160 -0
  40. package/test/node_modules/@noble/curves/abstract/curve.js.map +1 -0
  41. package/test/node_modules/@noble/curves/abstract/edwards.d.ts +89 -0
  42. package/test/node_modules/@noble/curves/abstract/edwards.d.ts.map +1 -0
  43. package/test/node_modules/@noble/curves/abstract/edwards.js +428 -0
  44. package/test/node_modules/@noble/curves/abstract/edwards.js.map +1 -0
  45. package/test/node_modules/@noble/curves/abstract/hash-to-curve.d.ts +58 -0
  46. package/test/node_modules/@noble/curves/abstract/hash-to-curve.d.ts.map +1 -0
  47. package/test/node_modules/@noble/curves/abstract/hash-to-curve.js +180 -0
  48. package/test/node_modules/@noble/curves/abstract/hash-to-curve.js.map +1 -0
  49. package/test/node_modules/@noble/curves/abstract/modular.d.ts +123 -0
  50. package/test/node_modules/@noble/curves/abstract/modular.d.ts.map +1 -0
  51. package/test/node_modules/@noble/curves/abstract/modular.js +439 -0
  52. package/test/node_modules/@noble/curves/abstract/modular.js.map +1 -0
  53. package/test/node_modules/@noble/curves/abstract/montgomery.d.ts +26 -0
  54. package/test/node_modules/@noble/curves/abstract/montgomery.d.ts.map +1 -0
  55. package/test/node_modules/@noble/curves/abstract/montgomery.js +158 -0
  56. package/test/node_modules/@noble/curves/abstract/montgomery.js.map +1 -0
  57. package/test/node_modules/@noble/curves/abstract/poseidon.d.ts +30 -0
  58. package/test/node_modules/@noble/curves/abstract/poseidon.d.ts.map +1 -0
  59. package/test/node_modules/@noble/curves/abstract/poseidon.js +113 -0
  60. package/test/node_modules/@noble/curves/abstract/poseidon.js.map +1 -0
  61. package/test/node_modules/@noble/curves/abstract/utils.d.ts +94 -0
  62. package/test/node_modules/@noble/curves/abstract/utils.d.ts.map +1 -0
  63. package/test/node_modules/@noble/curves/abstract/utils.js +313 -0
  64. package/test/node_modules/@noble/curves/abstract/utils.js.map +1 -0
  65. package/test/node_modules/@noble/curves/abstract/weierstrass.d.ts +236 -0
  66. package/test/node_modules/@noble/curves/abstract/weierstrass.d.ts.map +1 -0
  67. package/test/node_modules/@noble/curves/abstract/weierstrass.js +1069 -0
  68. package/test/node_modules/@noble/curves/abstract/weierstrass.js.map +1 -0
  69. package/test/node_modules/@noble/curves/bls12-381.d.ts +67 -0
  70. package/test/node_modules/@noble/curves/bls12-381.d.ts.map +1 -0
  71. package/test/node_modules/@noble/curves/bls12-381.js +1232 -0
  72. package/test/node_modules/@noble/curves/bls12-381.js.map +1 -0
  73. package/test/node_modules/@noble/curves/bn254.d.ts +9 -0
  74. package/test/node_modules/@noble/curves/bn254.d.ts.map +1 -0
  75. package/test/node_modules/@noble/curves/bn254.js +26 -0
  76. package/test/node_modules/@noble/curves/bn254.js.map +1 -0
  77. package/test/node_modules/@noble/curves/ed25519.d.ts +78 -0
  78. package/test/node_modules/@noble/curves/ed25519.d.ts.map +1 -0
  79. package/test/node_modules/@noble/curves/ed25519.js +446 -0
  80. package/test/node_modules/@noble/curves/ed25519.js.map +1 -0
  81. package/test/node_modules/@noble/curves/ed448.d.ts +67 -0
  82. package/test/node_modules/@noble/curves/ed448.d.ts.map +1 -0
  83. package/test/node_modules/@noble/curves/ed448.js +406 -0
  84. package/test/node_modules/@noble/curves/ed448.js.map +1 -0
  85. package/test/node_modules/@noble/curves/esm/_shortw_utils.d.ts +62 -0
  86. package/test/node_modules/@noble/curves/esm/_shortw_utils.d.ts.map +1 -0
  87. package/test/node_modules/@noble/curves/esm/_shortw_utils.js +17 -0
  88. package/test/node_modules/@noble/curves/esm/_shortw_utils.js.map +1 -0
  89. package/test/node_modules/@noble/curves/esm/abstract/bls.d.ts +122 -0
  90. package/test/node_modules/@noble/curves/esm/abstract/bls.d.ts.map +1 -0
  91. package/test/node_modules/@noble/curves/esm/abstract/bls.js +285 -0
  92. package/test/node_modules/@noble/curves/esm/abstract/bls.js.map +1 -0
  93. package/test/node_modules/@noble/curves/esm/abstract/curve.d.ts +70 -0
  94. package/test/node_modules/@noble/curves/esm/abstract/curve.d.ts.map +1 -0
  95. package/test/node_modules/@noble/curves/esm/abstract/curve.js +156 -0
  96. package/test/node_modules/@noble/curves/esm/abstract/curve.js.map +1 -0
  97. package/test/node_modules/@noble/curves/esm/abstract/edwards.d.ts +89 -0
  98. package/test/node_modules/@noble/curves/esm/abstract/edwards.d.ts.map +1 -0
  99. package/test/node_modules/@noble/curves/esm/abstract/edwards.js +425 -0
  100. package/test/node_modules/@noble/curves/esm/abstract/edwards.js.map +1 -0
  101. package/test/node_modules/@noble/curves/esm/abstract/hash-to-curve.d.ts +58 -0
  102. package/test/node_modules/@noble/curves/esm/abstract/hash-to-curve.d.ts.map +1 -0
  103. package/test/node_modules/@noble/curves/esm/abstract/hash-to-curve.js +173 -0
  104. package/test/node_modules/@noble/curves/esm/abstract/hash-to-curve.js.map +1 -0
  105. package/test/node_modules/@noble/curves/esm/abstract/modular.d.ts +123 -0
  106. package/test/node_modules/@noble/curves/esm/abstract/modular.d.ts.map +1 -0
  107. package/test/node_modules/@noble/curves/esm/abstract/modular.js +416 -0
  108. package/test/node_modules/@noble/curves/esm/abstract/modular.js.map +1 -0
  109. package/test/node_modules/@noble/curves/esm/abstract/montgomery.d.ts +26 -0
  110. package/test/node_modules/@noble/curves/esm/abstract/montgomery.d.ts.map +1 -0
  111. package/test/node_modules/@noble/curves/esm/abstract/montgomery.js +155 -0
  112. package/test/node_modules/@noble/curves/esm/abstract/montgomery.js.map +1 -0
  113. package/test/node_modules/@noble/curves/esm/abstract/poseidon.d.ts +30 -0
  114. package/test/node_modules/@noble/curves/esm/abstract/poseidon.d.ts.map +1 -0
  115. package/test/node_modules/@noble/curves/esm/abstract/poseidon.js +108 -0
  116. package/test/node_modules/@noble/curves/esm/abstract/poseidon.js.map +1 -0
  117. package/test/node_modules/@noble/curves/esm/abstract/utils.d.ts +94 -0
  118. package/test/node_modules/@noble/curves/esm/abstract/utils.d.ts.map +1 -0
  119. package/test/node_modules/@noble/curves/esm/abstract/utils.js +289 -0
  120. package/test/node_modules/@noble/curves/esm/abstract/utils.js.map +1 -0
  121. package/test/node_modules/@noble/curves/esm/abstract/weierstrass.d.ts +236 -0
  122. package/test/node_modules/@noble/curves/esm/abstract/weierstrass.d.ts.map +1 -0
  123. package/test/node_modules/@noble/curves/esm/abstract/weierstrass.js +1062 -0
  124. package/test/node_modules/@noble/curves/esm/abstract/weierstrass.js.map +1 -0
  125. package/test/node_modules/@noble/curves/esm/bls12-381.d.ts +67 -0
  126. package/test/node_modules/@noble/curves/esm/bls12-381.d.ts.map +1 -0
  127. package/test/node_modules/@noble/curves/esm/bls12-381.js +1229 -0
  128. package/test/node_modules/@noble/curves/esm/bls12-381.js.map +1 -0
  129. package/test/node_modules/@noble/curves/esm/bn254.d.ts +9 -0
  130. package/test/node_modules/@noble/curves/esm/bn254.d.ts.map +1 -0
  131. package/test/node_modules/@noble/curves/esm/bn254.js +23 -0
  132. package/test/node_modules/@noble/curves/esm/bn254.js.map +1 -0
  133. package/test/node_modules/@noble/curves/esm/ed25519.d.ts +78 -0
  134. package/test/node_modules/@noble/curves/esm/ed25519.d.ts.map +1 -0
  135. package/test/node_modules/@noble/curves/esm/ed25519.js +440 -0
  136. package/test/node_modules/@noble/curves/esm/ed25519.js.map +1 -0
  137. package/test/node_modules/@noble/curves/esm/ed448.d.ts +67 -0
  138. package/test/node_modules/@noble/curves/esm/ed448.d.ts.map +1 -0
  139. package/test/node_modules/@noble/curves/esm/ed448.js +401 -0
  140. package/test/node_modules/@noble/curves/esm/ed448.js.map +1 -0
  141. package/test/node_modules/@noble/curves/esm/index.d.ts +2 -0
  142. package/test/node_modules/@noble/curves/esm/index.d.ts.map +1 -0
  143. package/test/node_modules/@noble/curves/esm/index.js +3 -0
  144. package/test/node_modules/@noble/curves/esm/index.js.map +1 -0
  145. package/test/node_modules/@noble/curves/esm/jubjub.d.ts +9 -0
  146. package/test/node_modules/@noble/curves/esm/jubjub.d.ts.map +1 -0
  147. package/test/node_modules/@noble/curves/esm/jubjub.js +54 -0
  148. package/test/node_modules/@noble/curves/esm/jubjub.js.map +1 -0
  149. package/test/node_modules/@noble/curves/esm/p256.d.ts +105 -0
  150. package/test/node_modules/@noble/curves/esm/p256.d.ts.map +1 -0
  151. package/test/node_modules/@noble/curves/esm/p256.js +42 -0
  152. package/test/node_modules/@noble/curves/esm/p256.js.map +1 -0
  153. package/test/node_modules/@noble/curves/esm/p384.d.ts +105 -0
  154. package/test/node_modules/@noble/curves/esm/p384.d.ts.map +1 -0
  155. package/test/node_modules/@noble/curves/esm/p384.js +46 -0
  156. package/test/node_modules/@noble/curves/esm/p384.js.map +1 -0
  157. package/test/node_modules/@noble/curves/esm/p521.d.ts +105 -0
  158. package/test/node_modules/@noble/curves/esm/p521.d.ts.map +1 -0
  159. package/test/node_modules/@noble/curves/esm/p521.js +53 -0
  160. package/test/node_modules/@noble/curves/esm/p521.js.map +1 -0
  161. package/test/node_modules/@noble/curves/esm/package.json +4 -0
  162. package/test/node_modules/@noble/curves/esm/pasta.d.ts +5 -0
  163. package/test/node_modules/@noble/curves/esm/pasta.d.ts.map +1 -0
  164. package/test/node_modules/@noble/curves/esm/pasta.js +30 -0
  165. package/test/node_modules/@noble/curves/esm/pasta.js.map +1 -0
  166. package/test/node_modules/@noble/curves/esm/secp256k1.d.ts +93 -0
  167. package/test/node_modules/@noble/curves/esm/secp256k1.d.ts.map +1 -0
  168. package/test/node_modules/@noble/curves/esm/secp256k1.js +254 -0
  169. package/test/node_modules/@noble/curves/esm/secp256k1.js.map +1 -0
  170. package/test/node_modules/@noble/curves/index.d.ts +1 -0
  171. package/test/node_modules/@noble/curves/index.d.ts.map +1 -0
  172. package/test/node_modules/@noble/curves/index.js +3 -0
  173. package/test/node_modules/@noble/curves/index.js.map +1 -0
  174. package/test/node_modules/@noble/curves/jubjub.d.ts +9 -0
  175. package/test/node_modules/@noble/curves/jubjub.d.ts.map +1 -0
  176. package/test/node_modules/@noble/curves/jubjub.js +59 -0
  177. package/test/node_modules/@noble/curves/jubjub.js.map +1 -0
  178. package/test/node_modules/@noble/curves/p256.d.ts +105 -0
  179. package/test/node_modules/@noble/curves/p256.d.ts.map +1 -0
  180. package/test/node_modules/@noble/curves/p256.js +45 -0
  181. package/test/node_modules/@noble/curves/p256.js.map +1 -0
  182. package/test/node_modules/@noble/curves/p384.d.ts +105 -0
  183. package/test/node_modules/@noble/curves/p384.d.ts.map +1 -0
  184. package/test/node_modules/@noble/curves/p384.js +49 -0
  185. package/test/node_modules/@noble/curves/p384.js.map +1 -0
  186. package/test/node_modules/@noble/curves/p521.d.ts +105 -0
  187. package/test/node_modules/@noble/curves/p521.d.ts.map +1 -0
  188. package/test/node_modules/@noble/curves/p521.js +56 -0
  189. package/test/node_modules/@noble/curves/p521.js.map +1 -0
  190. package/test/node_modules/@noble/curves/package.json +159 -0
  191. package/test/node_modules/@noble/curves/pasta.d.ts +5 -0
  192. package/test/node_modules/@noble/curves/pasta.d.ts.map +1 -0
  193. package/test/node_modules/@noble/curves/pasta.js +33 -0
  194. package/test/node_modules/@noble/curves/pasta.js.map +1 -0
  195. package/test/node_modules/@noble/curves/secp256k1.d.ts +93 -0
  196. package/test/node_modules/@noble/curves/secp256k1.d.ts.map +1 -0
  197. package/test/node_modules/@noble/curves/secp256k1.js +257 -0
  198. package/test/node_modules/@noble/curves/secp256k1.js.map +1 -0
  199. package/test/node_modules/@noble/curves/src/_shortw_utils.ts +20 -0
  200. package/test/node_modules/@noble/curves/src/abstract/bls.ts +502 -0
  201. package/test/node_modules/@noble/curves/src/abstract/curve.ts +203 -0
  202. package/test/node_modules/@noble/curves/src/abstract/edwards.ts +514 -0
  203. package/test/node_modules/@noble/curves/src/abstract/hash-to-curve.ts +231 -0
  204. package/test/node_modules/@noble/curves/src/abstract/modular.ts +484 -0
  205. package/test/node_modules/@noble/curves/src/abstract/montgomery.ts +187 -0
  206. package/test/node_modules/@noble/curves/src/abstract/poseidon.ts +118 -0
  207. package/test/node_modules/@noble/curves/src/abstract/utils.ts +319 -0
  208. package/test/node_modules/@noble/curves/src/abstract/weierstrass.ts +1237 -0
  209. package/test/node_modules/@noble/curves/src/bls12-381.ts +1410 -0
  210. package/test/node_modules/@noble/curves/src/bn254.ts +22 -0
  211. package/test/node_modules/@noble/curves/src/ed25519.ts +505 -0
  212. package/test/node_modules/@noble/curves/src/ed448.ts +480 -0
  213. package/test/node_modules/@noble/curves/src/index.ts +1 -0
  214. package/test/node_modules/@noble/curves/src/jubjub.ts +58 -0
  215. package/test/node_modules/@noble/curves/src/p256.ts +48 -0
  216. package/test/node_modules/@noble/curves/src/p384.ts +52 -0
  217. package/test/node_modules/@noble/curves/src/p521.ts +68 -0
  218. package/test/node_modules/@noble/curves/src/package.json +3 -0
  219. package/test/node_modules/@noble/curves/src/pasta.ts +31 -0
  220. package/test/node_modules/@noble/curves/src/secp256k1.ts +274 -0
  221. package/test/node_modules/@noble/hashes/LICENSE +21 -0
  222. package/test/node_modules/@noble/hashes/README.md +558 -0
  223. package/test/node_modules/@noble/hashes/_assert.d.ts +24 -0
  224. package/test/node_modules/@noble/hashes/_assert.js +51 -0
  225. package/test/node_modules/@noble/hashes/_assert.js.map +1 -0
  226. package/test/node_modules/@noble/hashes/_blake.d.ts +28 -0
  227. package/test/node_modules/@noble/hashes/_blake.js +124 -0
  228. package/test/node_modules/@noble/hashes/_blake.js.map +1 -0
  229. package/test/node_modules/@noble/hashes/_md.d.ts +30 -0
  230. package/test/node_modules/@noble/hashes/_md.js +128 -0
  231. package/test/node_modules/@noble/hashes/_md.js.map +1 -0
  232. package/test/node_modules/@noble/hashes/_u64.d.ts +55 -0
  233. package/test/node_modules/@noble/hashes/_u64.js +85 -0
  234. package/test/node_modules/@noble/hashes/_u64.js.map +1 -0
  235. package/test/node_modules/@noble/hashes/argon2.d.ts +17 -0
  236. package/test/node_modules/@noble/hashes/argon2.js +303 -0
  237. package/test/node_modules/@noble/hashes/argon2.js.map +1 -0
  238. package/test/node_modules/@noble/hashes/blake2b.d.ts +54 -0
  239. package/test/node_modules/@noble/hashes/blake2b.js +192 -0
  240. package/test/node_modules/@noble/hashes/blake2b.js.map +1 -0
  241. package/test/node_modules/@noble/hashes/blake2s.d.ts +48 -0
  242. package/test/node_modules/@noble/hashes/blake2s.js +123 -0
  243. package/test/node_modules/@noble/hashes/blake2s.js.map +1 -0
  244. package/test/node_modules/@noble/hashes/blake3.d.ts +47 -0
  245. package/test/node_modules/@noble/hashes/blake3.js +243 -0
  246. package/test/node_modules/@noble/hashes/blake3.js.map +1 -0
  247. package/test/node_modules/@noble/hashes/crypto.d.ts +2 -0
  248. package/test/node_modules/@noble/hashes/crypto.js +5 -0
  249. package/test/node_modules/@noble/hashes/crypto.js.map +1 -0
  250. package/test/node_modules/@noble/hashes/cryptoNode.d.ts +2 -0
  251. package/test/node_modules/@noble/hashes/cryptoNode.js +10 -0
  252. package/test/node_modules/@noble/hashes/cryptoNode.js.map +1 -0
  253. package/test/node_modules/@noble/hashes/eskdf.d.ts +47 -0
  254. package/test/node_modules/@noble/hashes/eskdf.js +162 -0
  255. package/test/node_modules/@noble/hashes/eskdf.js.map +1 -0
  256. package/test/node_modules/@noble/hashes/esm/_assert.js +42 -0
  257. package/test/node_modules/@noble/hashes/esm/_assert.js.map +1 -0
  258. package/test/node_modules/@noble/hashes/esm/_blake.js +120 -0
  259. package/test/node_modules/@noble/hashes/esm/_blake.js.map +1 -0
  260. package/test/node_modules/@noble/hashes/esm/_md.js +122 -0
  261. package/test/node_modules/@noble/hashes/esm/_md.js.map +1 -0
  262. package/test/node_modules/@noble/hashes/esm/_u64.js +62 -0
  263. package/test/node_modules/@noble/hashes/esm/_u64.js.map +1 -0
  264. package/test/node_modules/@noble/hashes/esm/argon2.js +297 -0
  265. package/test/node_modules/@noble/hashes/esm/argon2.js.map +1 -0
  266. package/test/node_modules/@noble/hashes/esm/blake2b.js +189 -0
  267. package/test/node_modules/@noble/hashes/esm/blake2b.js.map +1 -0
  268. package/test/node_modules/@noble/hashes/esm/blake2s.js +119 -0
  269. package/test/node_modules/@noble/hashes/esm/blake2s.js.map +1 -0
  270. package/test/node_modules/@noble/hashes/esm/blake3.js +240 -0
  271. package/test/node_modules/@noble/hashes/esm/blake3.js.map +1 -0
  272. package/test/node_modules/@noble/hashes/esm/crypto.js +2 -0
  273. package/test/node_modules/@noble/hashes/esm/crypto.js.map +1 -0
  274. package/test/node_modules/@noble/hashes/esm/cryptoNode.js +7 -0
  275. package/test/node_modules/@noble/hashes/esm/cryptoNode.js.map +1 -0
  276. package/test/node_modules/@noble/hashes/esm/eskdf.js +155 -0
  277. package/test/node_modules/@noble/hashes/esm/eskdf.js.map +1 -0
  278. package/test/node_modules/@noble/hashes/esm/hkdf.js +72 -0
  279. package/test/node_modules/@noble/hashes/esm/hkdf.js.map +1 -0
  280. package/test/node_modules/@noble/hashes/esm/hmac.js +77 -0
  281. package/test/node_modules/@noble/hashes/esm/hmac.js.map +1 -0
  282. package/test/node_modules/@noble/hashes/esm/index.js +3 -0
  283. package/test/node_modules/@noble/hashes/esm/index.js.map +1 -0
  284. package/test/node_modules/@noble/hashes/esm/package.json +10 -0
  285. package/test/node_modules/@noble/hashes/esm/pbkdf2.js +86 -0
  286. package/test/node_modules/@noble/hashes/esm/pbkdf2.js.map +1 -0
  287. package/test/node_modules/@noble/hashes/esm/ripemd160.js +102 -0
  288. package/test/node_modules/@noble/hashes/esm/ripemd160.js.map +1 -0
  289. package/test/node_modules/@noble/hashes/esm/scrypt.js +224 -0
  290. package/test/node_modules/@noble/hashes/esm/scrypt.js.map +1 -0
  291. package/test/node_modules/@noble/hashes/esm/sha1.js +80 -0
  292. package/test/node_modules/@noble/hashes/esm/sha1.js.map +1 -0
  293. package/test/node_modules/@noble/hashes/esm/sha2.js +4 -0
  294. package/test/node_modules/@noble/hashes/esm/sha2.js.map +1 -0
  295. package/test/node_modules/@noble/hashes/esm/sha256.js +123 -0
  296. package/test/node_modules/@noble/hashes/esm/sha256.js.map +1 -0
  297. package/test/node_modules/@noble/hashes/esm/sha3-addons.js +356 -0
  298. package/test/node_modules/@noble/hashes/esm/sha3-addons.js.map +1 -0
  299. package/test/node_modules/@noble/hashes/esm/sha3.js +214 -0
  300. package/test/node_modules/@noble/hashes/esm/sha3.js.map +1 -0
  301. package/test/node_modules/@noble/hashes/esm/sha512.js +231 -0
  302. package/test/node_modules/@noble/hashes/esm/sha512.js.map +1 -0
  303. package/test/node_modules/@noble/hashes/esm/utils.js +187 -0
  304. package/test/node_modules/@noble/hashes/esm/utils.js.map +1 -0
  305. package/test/node_modules/@noble/hashes/hkdf.d.ts +27 -0
  306. package/test/node_modules/@noble/hashes/hkdf.js +78 -0
  307. package/test/node_modules/@noble/hashes/hkdf.js.map +1 -0
  308. package/test/node_modules/@noble/hashes/hmac.d.ts +26 -0
  309. package/test/node_modules/@noble/hashes/hmac.js +82 -0
  310. package/test/node_modules/@noble/hashes/hmac.js.map +1 -0
  311. package/test/node_modules/@noble/hashes/index.d.ts +1 -0
  312. package/test/node_modules/@noble/hashes/index.js +3 -0
  313. package/test/node_modules/@noble/hashes/index.js.map +1 -0
  314. package/test/node_modules/@noble/hashes/package.json +179 -0
  315. package/test/node_modules/@noble/hashes/pbkdf2.d.ts +16 -0
  316. package/test/node_modules/@noble/hashes/pbkdf2.js +91 -0
  317. package/test/node_modules/@noble/hashes/pbkdf2.js.map +1 -0
  318. package/test/node_modules/@noble/hashes/ripemd160.d.ts +25 -0
  319. package/test/node_modules/@noble/hashes/ripemd160.js +106 -0
  320. package/test/node_modules/@noble/hashes/ripemd160.js.map +1 -0
  321. package/test/node_modules/@noble/hashes/scrypt.d.ts +30 -0
  322. package/test/node_modules/@noble/hashes/scrypt.js +229 -0
  323. package/test/node_modules/@noble/hashes/scrypt.js.map +1 -0
  324. package/test/node_modules/@noble/hashes/sha1.d.ts +22 -0
  325. package/test/node_modules/@noble/hashes/sha1.js +83 -0
  326. package/test/node_modules/@noble/hashes/sha1.js.map +1 -0
  327. package/test/node_modules/@noble/hashes/sha2.d.ts +3 -0
  328. package/test/node_modules/@noble/hashes/sha2.js +13 -0
  329. package/test/node_modules/@noble/hashes/sha2.js.map +1 -0
  330. package/test/node_modules/@noble/hashes/sha256.d.ts +35 -0
  331. package/test/node_modules/@noble/hashes/sha256.js +126 -0
  332. package/test/node_modules/@noble/hashes/sha256.js.map +1 -0
  333. package/test/node_modules/@noble/hashes/sha3-addons.d.ts +154 -0
  334. package/test/node_modules/@noble/hashes/sha3-addons.js +360 -0
  335. package/test/node_modules/@noble/hashes/sha3-addons.js.map +1 -0
  336. package/test/node_modules/@noble/hashes/sha3.d.ts +98 -0
  337. package/test/node_modules/@noble/hashes/sha3.js +219 -0
  338. package/test/node_modules/@noble/hashes/sha3.js.map +1 -0
  339. package/test/node_modules/@noble/hashes/sha512.d.ts +67 -0
  340. package/test/node_modules/@noble/hashes/sha512.js +235 -0
  341. package/test/node_modules/@noble/hashes/sha512.js.map +1 -0
  342. package/test/node_modules/@noble/hashes/src/_assert.ts +51 -0
  343. package/test/node_modules/@noble/hashes/src/_blake.ts +134 -0
  344. package/test/node_modules/@noble/hashes/src/_md.ts +127 -0
  345. package/test/node_modules/@noble/hashes/src/_u64.ts +77 -0
  346. package/test/node_modules/@noble/hashes/src/argon2.ts +374 -0
  347. package/test/node_modules/@noble/hashes/src/blake2b.ts +205 -0
  348. package/test/node_modules/@noble/hashes/src/blake2s.ts +138 -0
  349. package/test/node_modules/@noble/hashes/src/blake3.ts +268 -0
  350. package/test/node_modules/@noble/hashes/src/crypto.ts +5 -0
  351. package/test/node_modules/@noble/hashes/src/cryptoNode.ts +7 -0
  352. package/test/node_modules/@noble/hashes/src/eskdf.ts +183 -0
  353. package/test/node_modules/@noble/hashes/src/hkdf.ts +79 -0
  354. package/test/node_modules/@noble/hashes/src/hmac.ts +81 -0
  355. package/test/node_modules/@noble/hashes/src/index.ts +1 -0
  356. package/test/node_modules/@noble/hashes/src/pbkdf2.ts +97 -0
  357. package/test/node_modules/@noble/hashes/src/ripemd160.ts +108 -0
  358. package/test/node_modules/@noble/hashes/src/scrypt.ts +241 -0
  359. package/test/node_modules/@noble/hashes/src/sha1.ts +80 -0
  360. package/test/node_modules/@noble/hashes/src/sha2.ts +3 -0
  361. package/test/node_modules/@noble/hashes/src/sha256.ts +129 -0
  362. package/test/node_modules/@noble/hashes/src/sha3-addons.ts +423 -0
  363. package/test/node_modules/@noble/hashes/src/sha3.ts +229 -0
  364. package/test/node_modules/@noble/hashes/src/sha512.ts +246 -0
  365. package/test/node_modules/@noble/hashes/src/utils.ts +256 -0
  366. package/test/node_modules/@noble/hashes/utils.d.ts +96 -0
  367. package/test/node_modules/@noble/hashes/utils.js +211 -0
  368. package/test/node_modules/@noble/hashes/utils.js.map +1 -0
  369. package/test/node_modules/@pkgjs/parseargs/.editorconfig +14 -0
  370. package/test/node_modules/@pkgjs/parseargs/CHANGELOG.md +147 -0
  371. package/test/node_modules/@pkgjs/parseargs/LICENSE +201 -0
  372. package/test/node_modules/@pkgjs/parseargs/README.md +413 -0
  373. package/test/node_modules/@pkgjs/parseargs/examples/is-default-value.js +25 -0
  374. package/test/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js +35 -0
  375. package/test/node_modules/@pkgjs/parseargs/examples/negate.js +43 -0
  376. package/test/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js +31 -0
  377. package/test/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs +41 -0
  378. package/test/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js +26 -0
  379. package/test/node_modules/@pkgjs/parseargs/index.js +396 -0
  380. package/test/node_modules/@pkgjs/parseargs/internal/errors.js +47 -0
  381. package/test/node_modules/@pkgjs/parseargs/internal/primordials.js +393 -0
  382. package/test/node_modules/@pkgjs/parseargs/internal/util.js +14 -0
  383. package/test/node_modules/@pkgjs/parseargs/internal/validators.js +89 -0
  384. package/test/node_modules/@pkgjs/parseargs/package.json +36 -0
  385. package/test/node_modules/@pkgjs/parseargs/utils.js +198 -0
  386. package/test/node_modules/@scure/base/LICENSE +21 -0
  387. package/test/node_modules/@scure/base/README.md +214 -0
  388. package/test/node_modules/@scure/base/index.ts +616 -0
  389. package/test/node_modules/@scure/base/lib/esm/index.d.ts +132 -0
  390. package/test/node_modules/@scure/base/lib/esm/index.d.ts.map +1 -0
  391. package/test/node_modules/@scure/base/lib/esm/index.js +489 -0
  392. package/test/node_modules/@scure/base/lib/esm/index.js.map +1 -0
  393. package/test/node_modules/@scure/base/lib/esm/package.json +1 -0
  394. package/test/node_modules/@scure/base/lib/index.d.ts +132 -0
  395. package/test/node_modules/@scure/base/lib/index.d.ts.map +1 -0
  396. package/test/node_modules/@scure/base/lib/index.js +496 -0
  397. package/test/node_modules/@scure/base/lib/index.js.map +1 -0
  398. package/test/node_modules/@scure/base/package.json +64 -0
  399. package/test/node_modules/@scure/bip32/LICENSE +21 -0
  400. package/test/node_modules/@scure/bip32/README.md +113 -0
  401. package/test/node_modules/@scure/bip32/index.ts +308 -0
  402. package/test/node_modules/@scure/bip32/lib/esm/index.js +269 -0
  403. package/test/node_modules/@scure/bip32/lib/esm/index.js.map +1 -0
  404. package/test/node_modules/@scure/bip32/lib/esm/package.json +4 -0
  405. package/test/node_modules/@scure/bip32/lib/index.d.ts +50 -0
  406. package/test/node_modules/@scure/bip32/lib/index.js +273 -0
  407. package/test/node_modules/@scure/bip32/lib/index.js.map +1 -0
  408. package/test/node_modules/@scure/bip32/package.json +75 -0
  409. package/test/node_modules/@scure/bip39/LICENSE +21 -0
  410. package/test/node_modules/@scure/bip39/README.md +101 -0
  411. package/test/node_modules/@scure/bip39/esm/index.js +134 -0
  412. package/test/node_modules/@scure/bip39/esm/package.json +3 -0
  413. package/test/node_modules/@scure/bip39/esm/wordlists/czech.js +2048 -0
  414. package/test/node_modules/@scure/bip39/esm/wordlists/english.js +2048 -0
  415. package/test/node_modules/@scure/bip39/esm/wordlists/french.js +2048 -0
  416. package/test/node_modules/@scure/bip39/esm/wordlists/italian.js +2048 -0
  417. package/test/node_modules/@scure/bip39/esm/wordlists/japanese.js +2048 -0
  418. package/test/node_modules/@scure/bip39/esm/wordlists/korean.js +2048 -0
  419. package/test/node_modules/@scure/bip39/esm/wordlists/portuguese.js +2048 -0
  420. package/test/node_modules/@scure/bip39/esm/wordlists/simplified-chinese.js +2048 -0
  421. package/test/node_modules/@scure/bip39/esm/wordlists/spanish.js +2048 -0
  422. package/test/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.js +2048 -0
  423. package/test/node_modules/@scure/bip39/index.d.ts +64 -0
  424. package/test/node_modules/@scure/bip39/index.js +143 -0
  425. package/test/node_modules/@scure/bip39/package.json +123 -0
  426. package/test/node_modules/@scure/bip39/src/index.ts +146 -0
  427. package/test/node_modules/@scure/bip39/wordlists/czech.d.ts +2 -0
  428. package/test/node_modules/@scure/bip39/wordlists/czech.js +2051 -0
  429. package/test/node_modules/@scure/bip39/wordlists/english.d.ts +2 -0
  430. package/test/node_modules/@scure/bip39/wordlists/english.js +2051 -0
  431. package/test/node_modules/@scure/bip39/wordlists/french.d.ts +2 -0
  432. package/test/node_modules/@scure/bip39/wordlists/french.js +2051 -0
  433. package/test/node_modules/@scure/bip39/wordlists/italian.d.ts +2 -0
  434. package/test/node_modules/@scure/bip39/wordlists/italian.js +2051 -0
  435. package/test/node_modules/@scure/bip39/wordlists/japanese.d.ts +2 -0
  436. package/test/node_modules/@scure/bip39/wordlists/japanese.js +2051 -0
  437. package/test/node_modules/@scure/bip39/wordlists/korean.d.ts +2 -0
  438. package/test/node_modules/@scure/bip39/wordlists/korean.js +2051 -0
  439. package/test/node_modules/@scure/bip39/wordlists/portuguese.d.ts +2 -0
  440. package/test/node_modules/@scure/bip39/wordlists/portuguese.js +2051 -0
  441. package/test/node_modules/@scure/bip39/wordlists/simplified-chinese.d.ts +2 -0
  442. package/test/node_modules/@scure/bip39/wordlists/simplified-chinese.js +2051 -0
  443. package/test/node_modules/@scure/bip39/wordlists/spanish.d.ts +2 -0
  444. package/test/node_modules/@scure/bip39/wordlists/spanish.js +2051 -0
  445. package/test/node_modules/@scure/bip39/wordlists/traditional-chinese.d.ts +2 -0
  446. package/test/node_modules/@scure/bip39/wordlists/traditional-chinese.js +2051 -0
  447. package/test/node_modules/ansi-colors/LICENSE +21 -0
  448. package/test/node_modules/ansi-colors/README.md +315 -0
  449. package/test/node_modules/ansi-colors/index.js +184 -0
  450. package/test/node_modules/ansi-colors/package.json +129 -0
  451. package/test/node_modules/ansi-colors/symbols.js +69 -0
  452. package/test/node_modules/ansi-colors/types/index.d.ts +235 -0
  453. package/test/node_modules/ansi-regex/index.d.ts +33 -0
  454. package/test/node_modules/ansi-regex/index.js +10 -0
  455. package/test/node_modules/ansi-regex/license +9 -0
  456. package/test/node_modules/ansi-regex/package.json +61 -0
  457. package/test/node_modules/ansi-regex/readme.md +60 -0
  458. package/test/node_modules/ansi-styles/index.d.ts +345 -0
  459. package/test/node_modules/ansi-styles/index.js +163 -0
  460. package/test/node_modules/ansi-styles/license +9 -0
  461. package/test/node_modules/ansi-styles/package.json +56 -0
  462. package/test/node_modules/ansi-styles/readme.md +152 -0
  463. package/test/node_modules/anymatch/LICENSE +15 -0
  464. package/test/node_modules/anymatch/README.md +87 -0
  465. package/test/node_modules/anymatch/index.d.ts +20 -0
  466. package/test/node_modules/anymatch/index.js +104 -0
  467. package/test/node_modules/anymatch/package.json +48 -0
  468. package/test/node_modules/argparse/CHANGELOG.md +216 -0
  469. package/test/node_modules/argparse/LICENSE +254 -0
  470. package/test/node_modules/argparse/README.md +84 -0
  471. package/test/node_modules/argparse/argparse.js +3707 -0
  472. package/test/node_modules/argparse/lib/sub.js +67 -0
  473. package/test/node_modules/argparse/lib/textwrap.js +440 -0
  474. package/test/node_modules/argparse/package.json +31 -0
  475. package/test/node_modules/asap/CHANGES.md +70 -0
  476. package/test/node_modules/asap/LICENSE.md +21 -0
  477. package/test/node_modules/asap/README.md +237 -0
  478. package/test/node_modules/asap/asap.js +65 -0
  479. package/test/node_modules/asap/browser-asap.js +66 -0
  480. package/test/node_modules/asap/browser-raw.js +223 -0
  481. package/test/node_modules/asap/package.json +58 -0
  482. package/test/node_modules/asap/raw.js +101 -0
  483. package/test/node_modules/assertion-error/LICENSE +21 -0
  484. package/test/node_modules/assertion-error/README.md +68 -0
  485. package/test/node_modules/assertion-error/index.d.ts +27 -0
  486. package/test/node_modules/assertion-error/index.js +60 -0
  487. package/test/node_modules/assertion-error/package.json +32 -0
  488. package/test/node_modules/asynckit/LICENSE +21 -0
  489. package/test/node_modules/asynckit/README.md +233 -0
  490. package/test/node_modules/asynckit/bench.js +76 -0
  491. package/test/node_modules/asynckit/index.js +6 -0
  492. package/test/node_modules/asynckit/lib/abort.js +29 -0
  493. package/test/node_modules/asynckit/lib/async.js +34 -0
  494. package/test/node_modules/asynckit/lib/defer.js +26 -0
  495. package/test/node_modules/asynckit/lib/iterate.js +75 -0
  496. package/test/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  497. package/test/node_modules/asynckit/lib/readable_parallel.js +25 -0
  498. package/test/node_modules/asynckit/lib/readable_serial.js +25 -0
  499. package/test/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  500. package/test/node_modules/asynckit/lib/state.js +37 -0
  501. package/test/node_modules/asynckit/lib/streamify.js +141 -0
  502. package/test/node_modules/asynckit/lib/terminator.js +29 -0
  503. package/test/node_modules/asynckit/package.json +63 -0
  504. package/test/node_modules/asynckit/parallel.js +43 -0
  505. package/test/node_modules/asynckit/serial.js +17 -0
  506. package/test/node_modules/asynckit/serialOrdered.js +75 -0
  507. package/test/node_modules/asynckit/stream.js +21 -0
  508. package/test/node_modules/balanced-match/.github/FUNDING.yml +2 -0
  509. package/test/node_modules/balanced-match/LICENSE.md +21 -0
  510. package/test/node_modules/balanced-match/README.md +97 -0
  511. package/test/node_modules/balanced-match/index.js +62 -0
  512. package/test/node_modules/balanced-match/package.json +48 -0
  513. package/test/node_modules/bdo-js/README.md +35 -0
  514. package/test/node_modules/bdo-js/bdo.cjs +165 -0
  515. package/test/node_modules/bdo-js/bdo.js +171 -0
  516. package/test/node_modules/bdo-js/package.json +24 -0
  517. package/test/node_modules/binary-extensions/binary-extensions.json +263 -0
  518. package/test/node_modules/binary-extensions/binary-extensions.json.d.ts +3 -0
  519. package/test/node_modules/binary-extensions/index.d.ts +14 -0
  520. package/test/node_modules/binary-extensions/index.js +1 -0
  521. package/test/node_modules/binary-extensions/license +10 -0
  522. package/test/node_modules/binary-extensions/package.json +40 -0
  523. package/test/node_modules/binary-extensions/readme.md +25 -0
  524. package/test/node_modules/brace-expansion/.github/FUNDING.yml +2 -0
  525. package/test/node_modules/brace-expansion/LICENSE +21 -0
  526. package/test/node_modules/brace-expansion/README.md +135 -0
  527. package/test/node_modules/brace-expansion/index.js +203 -0
  528. package/test/node_modules/brace-expansion/package.json +46 -0
  529. package/test/node_modules/braces/LICENSE +21 -0
  530. package/test/node_modules/braces/README.md +586 -0
  531. package/test/node_modules/braces/index.js +170 -0
  532. package/test/node_modules/braces/lib/compile.js +60 -0
  533. package/test/node_modules/braces/lib/constants.js +57 -0
  534. package/test/node_modules/braces/lib/expand.js +113 -0
  535. package/test/node_modules/braces/lib/parse.js +331 -0
  536. package/test/node_modules/braces/lib/stringify.js +32 -0
  537. package/test/node_modules/braces/lib/utils.js +122 -0
  538. package/test/node_modules/braces/package.json +77 -0
  539. package/test/node_modules/browser-stdout/LICENSE +5 -0
  540. package/test/node_modules/browser-stdout/README.md +40 -0
  541. package/test/node_modules/browser-stdout/index.js +25 -0
  542. package/test/node_modules/browser-stdout/package.json +15 -0
  543. package/test/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
  544. package/test/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
  545. package/test/node_modules/call-bind-apply-helpers/.nycrc +9 -0
  546. package/test/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
  547. package/test/node_modules/call-bind-apply-helpers/LICENSE +21 -0
  548. package/test/node_modules/call-bind-apply-helpers/README.md +62 -0
  549. package/test/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  550. package/test/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
  551. package/test/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  552. package/test/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
  553. package/test/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  554. package/test/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
  555. package/test/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  556. package/test/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
  557. package/test/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
  558. package/test/node_modules/call-bind-apply-helpers/index.js +15 -0
  559. package/test/node_modules/call-bind-apply-helpers/package.json +85 -0
  560. package/test/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
  561. package/test/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  562. package/test/node_modules/call-bind-apply-helpers/test/index.js +63 -0
  563. package/test/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  564. package/test/node_modules/call-bound/.eslintrc +13 -0
  565. package/test/node_modules/call-bound/.github/FUNDING.yml +12 -0
  566. package/test/node_modules/call-bound/.nycrc +9 -0
  567. package/test/node_modules/call-bound/CHANGELOG.md +42 -0
  568. package/test/node_modules/call-bound/LICENSE +21 -0
  569. package/test/node_modules/call-bound/README.md +53 -0
  570. package/test/node_modules/call-bound/index.d.ts +94 -0
  571. package/test/node_modules/call-bound/index.js +19 -0
  572. package/test/node_modules/call-bound/package.json +99 -0
  573. package/test/node_modules/call-bound/test/index.js +61 -0
  574. package/test/node_modules/call-bound/tsconfig.json +10 -0
  575. package/test/node_modules/camelcase/index.d.ts +103 -0
  576. package/test/node_modules/camelcase/index.js +113 -0
  577. package/test/node_modules/camelcase/license +9 -0
  578. package/test/node_modules/camelcase/package.json +44 -0
  579. package/test/node_modules/camelcase/readme.md +144 -0
  580. package/test/node_modules/chai/.prettierrc.json +10 -0
  581. package/test/node_modules/chai/CODEOWNERS +1 -0
  582. package/test/node_modules/chai/CODE_OF_CONDUCT.md +58 -0
  583. package/test/node_modules/chai/CONTRIBUTING.md +218 -0
  584. package/test/node_modules/chai/History.md +1059 -0
  585. package/test/node_modules/chai/LICENSE +21 -0
  586. package/test/node_modules/chai/README.md +154 -0
  587. package/test/node_modules/chai/ReleaseNotes.md +737 -0
  588. package/test/node_modules/chai/chai.js +4351 -0
  589. package/test/node_modules/chai/eslint.config.js +26 -0
  590. package/test/node_modules/chai/index.js +1 -0
  591. package/test/node_modules/chai/lib/chai/assertion.js +180 -0
  592. package/test/node_modules/chai/lib/chai/config.js +112 -0
  593. package/test/node_modules/chai/lib/chai/core/assertions.js +4157 -0
  594. package/test/node_modules/chai/lib/chai/interface/assert.js +3228 -0
  595. package/test/node_modules/chai/lib/chai/interface/expect.js +59 -0
  596. package/test/node_modules/chai/lib/chai/interface/should.js +227 -0
  597. package/test/node_modules/chai/lib/chai/utils/addChainableMethod.js +146 -0
  598. package/test/node_modules/chai/lib/chai/utils/addLengthGuard.js +73 -0
  599. package/test/node_modules/chai/lib/chai/utils/addMethod.js +66 -0
  600. package/test/node_modules/chai/lib/chai/utils/addProperty.js +70 -0
  601. package/test/node_modules/chai/lib/chai/utils/compareByInspect.js +26 -0
  602. package/test/node_modules/chai/lib/chai/utils/expectTypes.js +58 -0
  603. package/test/node_modules/chai/lib/chai/utils/flag.js +33 -0
  604. package/test/node_modules/chai/lib/chai/utils/getActual.js +20 -0
  605. package/test/node_modules/chai/lib/chai/utils/getMessage.js +52 -0
  606. package/test/node_modules/chai/lib/chai/utils/getOperator.js +58 -0
  607. package/test/node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js +24 -0
  608. package/test/node_modules/chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js +26 -0
  609. package/test/node_modules/chai/lib/chai/utils/getProperties.js +38 -0
  610. package/test/node_modules/chai/lib/chai/utils/index.js +118 -0
  611. package/test/node_modules/chai/lib/chai/utils/inspect.js +31 -0
  612. package/test/node_modules/chai/lib/chai/utils/isNaN.js +7 -0
  613. package/test/node_modules/chai/lib/chai/utils/isProxyEnabled.js +26 -0
  614. package/test/node_modules/chai/lib/chai/utils/objDisplay.js +47 -0
  615. package/test/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js +69 -0
  616. package/test/node_modules/chai/lib/chai/utils/overwriteMethod.js +90 -0
  617. package/test/node_modules/chai/lib/chai/utils/overwriteProperty.js +89 -0
  618. package/test/node_modules/chai/lib/chai/utils/proxify.js +157 -0
  619. package/test/node_modules/chai/lib/chai/utils/test.js +24 -0
  620. package/test/node_modules/chai/lib/chai/utils/transferFlags.js +48 -0
  621. package/test/node_modules/chai/lib/chai/utils/type-detect.js +20 -0
  622. package/test/node_modules/chai/lib/chai.js +66 -0
  623. package/test/node_modules/chai/package.json +67 -0
  624. package/test/node_modules/chai/register-assert.js +3 -0
  625. package/test/node_modules/chai/register-expect.js +3 -0
  626. package/test/node_modules/chai/register-should.js +3 -0
  627. package/test/node_modules/chai/web-test-runner.config.js +20 -0
  628. package/test/node_modules/chalk/index.d.ts +415 -0
  629. package/test/node_modules/chalk/license +9 -0
  630. package/test/node_modules/chalk/node_modules/supports-color/browser.js +5 -0
  631. package/test/node_modules/chalk/node_modules/supports-color/index.js +135 -0
  632. package/test/node_modules/chalk/node_modules/supports-color/license +9 -0
  633. package/test/node_modules/chalk/node_modules/supports-color/package.json +53 -0
  634. package/test/node_modules/chalk/node_modules/supports-color/readme.md +76 -0
  635. package/test/node_modules/chalk/package.json +68 -0
  636. package/test/node_modules/chalk/readme.md +341 -0
  637. package/test/node_modules/chalk/source/index.js +229 -0
  638. package/test/node_modules/chalk/source/templates.js +134 -0
  639. package/test/node_modules/chalk/source/util.js +39 -0
  640. package/test/node_modules/check-error/LICENSE +19 -0
  641. package/test/node_modules/check-error/README.md +144 -0
  642. package/test/node_modules/check-error/index.js +135 -0
  643. package/test/node_modules/check-error/package.json +66 -0
  644. package/test/node_modules/chokidar/LICENSE +21 -0
  645. package/test/node_modules/chokidar/README.md +308 -0
  646. package/test/node_modules/chokidar/index.js +973 -0
  647. package/test/node_modules/chokidar/lib/constants.js +66 -0
  648. package/test/node_modules/chokidar/lib/fsevents-handler.js +526 -0
  649. package/test/node_modules/chokidar/lib/nodefs-handler.js +654 -0
  650. package/test/node_modules/chokidar/package.json +70 -0
  651. package/test/node_modules/chokidar/types/index.d.ts +192 -0
  652. package/test/node_modules/cliui/CHANGELOG.md +139 -0
  653. package/test/node_modules/cliui/LICENSE.txt +14 -0
  654. package/test/node_modules/cliui/README.md +141 -0
  655. package/test/node_modules/cliui/build/index.cjs +302 -0
  656. package/test/node_modules/cliui/build/index.d.cts +43 -0
  657. package/test/node_modules/cliui/build/lib/index.js +287 -0
  658. package/test/node_modules/cliui/build/lib/string-utils.js +27 -0
  659. package/test/node_modules/cliui/index.mjs +13 -0
  660. package/test/node_modules/cliui/node_modules/ansi-regex/index.d.ts +37 -0
  661. package/test/node_modules/cliui/node_modules/ansi-regex/index.js +10 -0
  662. package/test/node_modules/cliui/node_modules/ansi-regex/license +9 -0
  663. package/test/node_modules/cliui/node_modules/ansi-regex/package.json +55 -0
  664. package/test/node_modules/cliui/node_modules/ansi-regex/readme.md +78 -0
  665. package/test/node_modules/cliui/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  666. package/test/node_modules/cliui/node_modules/emoji-regex/README.md +73 -0
  667. package/test/node_modules/cliui/node_modules/emoji-regex/es2015/index.js +6 -0
  668. package/test/node_modules/cliui/node_modules/emoji-regex/es2015/text.js +6 -0
  669. package/test/node_modules/cliui/node_modules/emoji-regex/index.d.ts +23 -0
  670. package/test/node_modules/cliui/node_modules/emoji-regex/index.js +6 -0
  671. package/test/node_modules/cliui/node_modules/emoji-regex/package.json +50 -0
  672. package/test/node_modules/cliui/node_modules/emoji-regex/text.js +6 -0
  673. package/test/node_modules/cliui/node_modules/string-width/index.d.ts +29 -0
  674. package/test/node_modules/cliui/node_modules/string-width/index.js +47 -0
  675. package/test/node_modules/cliui/node_modules/string-width/license +9 -0
  676. package/test/node_modules/cliui/node_modules/string-width/package.json +56 -0
  677. package/test/node_modules/cliui/node_modules/string-width/readme.md +50 -0
  678. package/test/node_modules/cliui/node_modules/strip-ansi/index.d.ts +17 -0
  679. package/test/node_modules/cliui/node_modules/strip-ansi/index.js +4 -0
  680. package/test/node_modules/cliui/node_modules/strip-ansi/license +9 -0
  681. package/test/node_modules/cliui/node_modules/strip-ansi/package.json +54 -0
  682. package/test/node_modules/cliui/node_modules/strip-ansi/readme.md +46 -0
  683. package/test/node_modules/cliui/node_modules/wrap-ansi/index.js +216 -0
  684. package/test/node_modules/cliui/node_modules/wrap-ansi/license +9 -0
  685. package/test/node_modules/cliui/node_modules/wrap-ansi/package.json +62 -0
  686. package/test/node_modules/cliui/node_modules/wrap-ansi/readme.md +91 -0
  687. package/test/node_modules/cliui/package.json +83 -0
  688. package/test/node_modules/color-convert/CHANGELOG.md +54 -0
  689. package/test/node_modules/color-convert/LICENSE +21 -0
  690. package/test/node_modules/color-convert/README.md +68 -0
  691. package/test/node_modules/color-convert/conversions.js +839 -0
  692. package/test/node_modules/color-convert/index.js +81 -0
  693. package/test/node_modules/color-convert/package.json +48 -0
  694. package/test/node_modules/color-convert/route.js +97 -0
  695. package/test/node_modules/color-name/LICENSE +8 -0
  696. package/test/node_modules/color-name/README.md +11 -0
  697. package/test/node_modules/color-name/index.js +152 -0
  698. package/test/node_modules/color-name/package.json +28 -0
  699. package/test/node_modules/combined-stream/License +19 -0
  700. package/test/node_modules/combined-stream/Readme.md +138 -0
  701. package/test/node_modules/combined-stream/lib/combined_stream.js +208 -0
  702. package/test/node_modules/combined-stream/package.json +25 -0
  703. package/test/node_modules/combined-stream/yarn.lock +17 -0
  704. package/test/node_modules/component-emitter/LICENSE +24 -0
  705. package/test/node_modules/component-emitter/Readme.md +74 -0
  706. package/test/node_modules/component-emitter/index.js +175 -0
  707. package/test/node_modules/component-emitter/package.json +28 -0
  708. package/test/node_modules/cookiejar/LICENSE +9 -0
  709. package/test/node_modules/cookiejar/cookiejar.js +281 -0
  710. package/test/node_modules/cookiejar/package.json +26 -0
  711. package/test/node_modules/cookiejar/readme.md +60 -0
  712. package/test/node_modules/cross-spawn/LICENSE +21 -0
  713. package/test/node_modules/cross-spawn/README.md +89 -0
  714. package/test/node_modules/cross-spawn/index.js +39 -0
  715. package/test/node_modules/cross-spawn/lib/enoent.js +59 -0
  716. package/test/node_modules/cross-spawn/lib/parse.js +91 -0
  717. package/test/node_modules/cross-spawn/lib/util/escape.js +47 -0
  718. package/test/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
  719. package/test/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
  720. package/test/node_modules/cross-spawn/package.json +73 -0
  721. package/test/node_modules/data-uri-to-buffer/README.md +88 -0
  722. package/test/node_modules/data-uri-to-buffer/dist/index.d.ts +15 -0
  723. package/test/node_modules/data-uri-to-buffer/dist/index.js +53 -0
  724. package/test/node_modules/data-uri-to-buffer/dist/index.js.map +1 -0
  725. package/test/node_modules/data-uri-to-buffer/package.json +62 -0
  726. package/test/node_modules/data-uri-to-buffer/src/index.ts +68 -0
  727. package/test/node_modules/debug/LICENSE +20 -0
  728. package/test/node_modules/debug/README.md +481 -0
  729. package/test/node_modules/debug/package.json +65 -0
  730. package/test/node_modules/debug/src/browser.js +272 -0
  731. package/test/node_modules/debug/src/common.js +292 -0
  732. package/test/node_modules/debug/src/index.js +10 -0
  733. package/test/node_modules/debug/src/node.js +263 -0
  734. package/test/node_modules/decamelize/index.d.ts +20 -0
  735. package/test/node_modules/decamelize/index.js +12 -0
  736. package/test/node_modules/decamelize/license +9 -0
  737. package/test/node_modules/decamelize/package.json +40 -0
  738. package/test/node_modules/decamelize/readme.md +51 -0
  739. package/test/node_modules/deep-eql/LICENSE +19 -0
  740. package/test/node_modules/deep-eql/README.md +93 -0
  741. package/test/node_modules/deep-eql/index.js +513 -0
  742. package/test/node_modules/deep-eql/package.json +73 -0
  743. package/test/node_modules/delayed-stream/License +19 -0
  744. package/test/node_modules/delayed-stream/Makefile +7 -0
  745. package/test/node_modules/delayed-stream/Readme.md +141 -0
  746. package/test/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  747. package/test/node_modules/delayed-stream/package.json +27 -0
  748. package/test/node_modules/dezalgo/LICENSE +15 -0
  749. package/test/node_modules/dezalgo/README.md +29 -0
  750. package/test/node_modules/dezalgo/dezalgo.js +22 -0
  751. package/test/node_modules/dezalgo/package.json +46 -0
  752. package/test/node_modules/diff/CONTRIBUTING.md +36 -0
  753. package/test/node_modules/diff/LICENSE +29 -0
  754. package/test/node_modules/diff/README.md +339 -0
  755. package/test/node_modules/diff/dist/diff.js +1730 -0
  756. package/test/node_modules/diff/dist/diff.min.js +1 -0
  757. package/test/node_modules/diff/lib/convert/dmp.js +32 -0
  758. package/test/node_modules/diff/lib/convert/xml.js +42 -0
  759. package/test/node_modules/diff/lib/diff/array.js +45 -0
  760. package/test/node_modules/diff/lib/diff/base.js +358 -0
  761. package/test/node_modules/diff/lib/diff/character.js +37 -0
  762. package/test/node_modules/diff/lib/diff/css.js +41 -0
  763. package/test/node_modules/diff/lib/diff/json.js +163 -0
  764. package/test/node_modules/diff/lib/diff/line.js +94 -0
  765. package/test/node_modules/diff/lib/diff/sentence.js +41 -0
  766. package/test/node_modules/diff/lib/diff/word.js +108 -0
  767. package/test/node_modules/diff/lib/index.es6.js +1699 -0
  768. package/test/node_modules/diff/lib/index.js +234 -0
  769. package/test/node_modules/diff/lib/index.mjs +1699 -0
  770. package/test/node_modules/diff/lib/patch/apply.js +238 -0
  771. package/test/node_modules/diff/lib/patch/create.js +276 -0
  772. package/test/node_modules/diff/lib/patch/merge.js +613 -0
  773. package/test/node_modules/diff/lib/patch/parse.js +167 -0
  774. package/test/node_modules/diff/lib/patch/reverse.js +63 -0
  775. package/test/node_modules/diff/lib/util/array.js +32 -0
  776. package/test/node_modules/diff/lib/util/distance-iterator.js +57 -0
  777. package/test/node_modules/diff/lib/util/params.js +24 -0
  778. package/test/node_modules/diff/package.json +89 -0
  779. package/test/node_modules/diff/release-notes.md +317 -0
  780. package/test/node_modules/diff/runtime.js +3 -0
  781. package/test/node_modules/dunder-proto/.eslintrc +5 -0
  782. package/test/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
  783. package/test/node_modules/dunder-proto/.nycrc +13 -0
  784. package/test/node_modules/dunder-proto/CHANGELOG.md +24 -0
  785. package/test/node_modules/dunder-proto/LICENSE +21 -0
  786. package/test/node_modules/dunder-proto/README.md +54 -0
  787. package/test/node_modules/dunder-proto/get.d.ts +5 -0
  788. package/test/node_modules/dunder-proto/get.js +30 -0
  789. package/test/node_modules/dunder-proto/package.json +76 -0
  790. package/test/node_modules/dunder-proto/set.d.ts +5 -0
  791. package/test/node_modules/dunder-proto/set.js +35 -0
  792. package/test/node_modules/dunder-proto/test/get.js +34 -0
  793. package/test/node_modules/dunder-proto/test/index.js +4 -0
  794. package/test/node_modules/dunder-proto/test/set.js +50 -0
  795. package/test/node_modules/dunder-proto/tsconfig.json +9 -0
  796. package/test/node_modules/eastasianwidth/README.md +32 -0
  797. package/test/node_modules/eastasianwidth/eastasianwidth.js +311 -0
  798. package/test/node_modules/eastasianwidth/package.json +18 -0
  799. package/test/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  800. package/test/node_modules/emoji-regex/README.md +137 -0
  801. package/test/node_modules/emoji-regex/RGI_Emoji.d.ts +5 -0
  802. package/test/node_modules/emoji-regex/RGI_Emoji.js +6 -0
  803. package/test/node_modules/emoji-regex/es2015/RGI_Emoji.d.ts +5 -0
  804. package/test/node_modules/emoji-regex/es2015/RGI_Emoji.js +6 -0
  805. package/test/node_modules/emoji-regex/es2015/index.d.ts +5 -0
  806. package/test/node_modules/emoji-regex/es2015/index.js +6 -0
  807. package/test/node_modules/emoji-regex/es2015/text.d.ts +5 -0
  808. package/test/node_modules/emoji-regex/es2015/text.js +6 -0
  809. package/test/node_modules/emoji-regex/index.d.ts +5 -0
  810. package/test/node_modules/emoji-regex/index.js +6 -0
  811. package/test/node_modules/emoji-regex/package.json +52 -0
  812. package/test/node_modules/emoji-regex/text.d.ts +5 -0
  813. package/test/node_modules/emoji-regex/text.js +6 -0
  814. package/test/node_modules/es-define-property/.eslintrc +13 -0
  815. package/test/node_modules/es-define-property/.github/FUNDING.yml +12 -0
  816. package/test/node_modules/es-define-property/.nycrc +9 -0
  817. package/test/node_modules/es-define-property/CHANGELOG.md +29 -0
  818. package/test/node_modules/es-define-property/LICENSE +21 -0
  819. package/test/node_modules/es-define-property/README.md +49 -0
  820. package/test/node_modules/es-define-property/index.d.ts +3 -0
  821. package/test/node_modules/es-define-property/index.js +14 -0
  822. package/test/node_modules/es-define-property/package.json +81 -0
  823. package/test/node_modules/es-define-property/test/index.js +56 -0
  824. package/test/node_modules/es-define-property/tsconfig.json +10 -0
  825. package/test/node_modules/es-errors/.eslintrc +5 -0
  826. package/test/node_modules/es-errors/.github/FUNDING.yml +12 -0
  827. package/test/node_modules/es-errors/CHANGELOG.md +40 -0
  828. package/test/node_modules/es-errors/LICENSE +21 -0
  829. package/test/node_modules/es-errors/README.md +55 -0
  830. package/test/node_modules/es-errors/eval.d.ts +3 -0
  831. package/test/node_modules/es-errors/eval.js +4 -0
  832. package/test/node_modules/es-errors/index.d.ts +3 -0
  833. package/test/node_modules/es-errors/index.js +4 -0
  834. package/test/node_modules/es-errors/package.json +80 -0
  835. package/test/node_modules/es-errors/range.d.ts +3 -0
  836. package/test/node_modules/es-errors/range.js +4 -0
  837. package/test/node_modules/es-errors/ref.d.ts +3 -0
  838. package/test/node_modules/es-errors/ref.js +4 -0
  839. package/test/node_modules/es-errors/syntax.d.ts +3 -0
  840. package/test/node_modules/es-errors/syntax.js +4 -0
  841. package/test/node_modules/es-errors/test/index.js +19 -0
  842. package/test/node_modules/es-errors/tsconfig.json +49 -0
  843. package/test/node_modules/es-errors/type.d.ts +3 -0
  844. package/test/node_modules/es-errors/type.js +4 -0
  845. package/test/node_modules/es-errors/uri.d.ts +3 -0
  846. package/test/node_modules/es-errors/uri.js +4 -0
  847. package/test/node_modules/es-object-atoms/.eslintrc +16 -0
  848. package/test/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
  849. package/test/node_modules/es-object-atoms/CHANGELOG.md +37 -0
  850. package/test/node_modules/es-object-atoms/LICENSE +21 -0
  851. package/test/node_modules/es-object-atoms/README.md +63 -0
  852. package/test/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  853. package/test/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  854. package/test/node_modules/es-object-atoms/ToObject.d.ts +7 -0
  855. package/test/node_modules/es-object-atoms/ToObject.js +10 -0
  856. package/test/node_modules/es-object-atoms/index.d.ts +3 -0
  857. package/test/node_modules/es-object-atoms/index.js +4 -0
  858. package/test/node_modules/es-object-atoms/isObject.d.ts +3 -0
  859. package/test/node_modules/es-object-atoms/isObject.js +6 -0
  860. package/test/node_modules/es-object-atoms/package.json +80 -0
  861. package/test/node_modules/es-object-atoms/test/index.js +38 -0
  862. package/test/node_modules/es-object-atoms/tsconfig.json +6 -0
  863. package/test/node_modules/es-set-tostringtag/.eslintrc +13 -0
  864. package/test/node_modules/es-set-tostringtag/.nycrc +9 -0
  865. package/test/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
  866. package/test/node_modules/es-set-tostringtag/LICENSE +21 -0
  867. package/test/node_modules/es-set-tostringtag/README.md +53 -0
  868. package/test/node_modules/es-set-tostringtag/index.d.ts +10 -0
  869. package/test/node_modules/es-set-tostringtag/index.js +35 -0
  870. package/test/node_modules/es-set-tostringtag/package.json +78 -0
  871. package/test/node_modules/es-set-tostringtag/test/index.js +85 -0
  872. package/test/node_modules/es-set-tostringtag/tsconfig.json +9 -0
  873. package/test/node_modules/escalade/dist/index.js +22 -0
  874. package/test/node_modules/escalade/dist/index.mjs +22 -0
  875. package/test/node_modules/escalade/index.d.mts +11 -0
  876. package/test/node_modules/escalade/index.d.ts +15 -0
  877. package/test/node_modules/escalade/license +9 -0
  878. package/test/node_modules/escalade/package.json +74 -0
  879. package/test/node_modules/escalade/readme.md +211 -0
  880. package/test/node_modules/escalade/sync/index.d.mts +9 -0
  881. package/test/node_modules/escalade/sync/index.d.ts +13 -0
  882. package/test/node_modules/escalade/sync/index.js +18 -0
  883. package/test/node_modules/escalade/sync/index.mjs +18 -0
  884. package/test/node_modules/escape-string-regexp/index.d.ts +18 -0
  885. package/test/node_modules/escape-string-regexp/index.js +13 -0
  886. package/test/node_modules/escape-string-regexp/license +9 -0
  887. package/test/node_modules/escape-string-regexp/package.json +38 -0
  888. package/test/node_modules/escape-string-regexp/readme.md +34 -0
  889. package/test/node_modules/ethereum-cryptography/LICENSE +21 -0
  890. package/test/node_modules/ethereum-cryptography/README.md +509 -0
  891. package/test/node_modules/ethereum-cryptography/aes.d.ts +2 -0
  892. package/test/node_modules/ethereum-cryptography/aes.js +97 -0
  893. package/test/node_modules/ethereum-cryptography/bip39/index.d.ts +1 -0
  894. package/test/node_modules/ethereum-cryptography/bip39/index.js +10 -0
  895. package/test/node_modules/ethereum-cryptography/bip39/wordlists/czech.d.ts +1 -0
  896. package/test/node_modules/ethereum-cryptography/bip39/wordlists/czech.js +5 -0
  897. package/test/node_modules/ethereum-cryptography/bip39/wordlists/english.d.ts +1 -0
  898. package/test/node_modules/ethereum-cryptography/bip39/wordlists/english.js +5 -0
  899. package/test/node_modules/ethereum-cryptography/bip39/wordlists/french.d.ts +1 -0
  900. package/test/node_modules/ethereum-cryptography/bip39/wordlists/french.js +5 -0
  901. package/test/node_modules/ethereum-cryptography/bip39/wordlists/italian.d.ts +1 -0
  902. package/test/node_modules/ethereum-cryptography/bip39/wordlists/italian.js +5 -0
  903. package/test/node_modules/ethereum-cryptography/bip39/wordlists/japanese.d.ts +1 -0
  904. package/test/node_modules/ethereum-cryptography/bip39/wordlists/japanese.js +5 -0
  905. package/test/node_modules/ethereum-cryptography/bip39/wordlists/korean.d.ts +1 -0
  906. package/test/node_modules/ethereum-cryptography/bip39/wordlists/korean.js +5 -0
  907. package/test/node_modules/ethereum-cryptography/bip39/wordlists/simplified-chinese.d.ts +1 -0
  908. package/test/node_modules/ethereum-cryptography/bip39/wordlists/simplified-chinese.js +5 -0
  909. package/test/node_modules/ethereum-cryptography/bip39/wordlists/spanish.d.ts +1 -0
  910. package/test/node_modules/ethereum-cryptography/bip39/wordlists/spanish.js +5 -0
  911. package/test/node_modules/ethereum-cryptography/bip39/wordlists/traditional-chinese.d.ts +1 -0
  912. package/test/node_modules/ethereum-cryptography/bip39/wordlists/traditional-chinese.js +5 -0
  913. package/test/node_modules/ethereum-cryptography/blake2b.d.ts +1 -0
  914. package/test/node_modules/ethereum-cryptography/blake2b.js +13 -0
  915. package/test/node_modules/ethereum-cryptography/esm/aes.js +93 -0
  916. package/test/node_modules/ethereum-cryptography/esm/bip39/index.js +1 -0
  917. package/test/node_modules/ethereum-cryptography/esm/bip39/wordlists/czech.js +1 -0
  918. package/test/node_modules/ethereum-cryptography/esm/bip39/wordlists/english.js +1 -0
  919. package/test/node_modules/ethereum-cryptography/esm/bip39/wordlists/french.js +1 -0
  920. package/test/node_modules/ethereum-cryptography/esm/bip39/wordlists/italian.js +1 -0
  921. package/test/node_modules/ethereum-cryptography/esm/bip39/wordlists/japanese.js +1 -0
  922. package/test/node_modules/ethereum-cryptography/esm/bip39/wordlists/korean.js +1 -0
  923. package/test/node_modules/ethereum-cryptography/esm/bip39/wordlists/simplified-chinese.js +1 -0
  924. package/test/node_modules/ethereum-cryptography/esm/bip39/wordlists/spanish.js +1 -0
  925. package/test/node_modules/ethereum-cryptography/esm/bip39/wordlists/traditional-chinese.js +1 -0
  926. package/test/node_modules/ethereum-cryptography/esm/blake2b.js +9 -0
  927. package/test/node_modules/ethereum-cryptography/esm/hdkey.js +1 -0
  928. package/test/node_modules/ethereum-cryptography/esm/index.js +2 -0
  929. package/test/node_modules/ethereum-cryptography/esm/keccak.js +10 -0
  930. package/test/node_modules/ethereum-cryptography/esm/package.json +3 -0
  931. package/test/node_modules/ethereum-cryptography/esm/pbkdf2.js +26 -0
  932. package/test/node_modules/ethereum-cryptography/esm/random.js +7 -0
  933. package/test/node_modules/ethereum-cryptography/esm/ripemd160.js +3 -0
  934. package/test/node_modules/ethereum-cryptography/esm/scrypt.js +12 -0
  935. package/test/node_modules/ethereum-cryptography/esm/secp256k1-compat.js +254 -0
  936. package/test/node_modules/ethereum-cryptography/esm/secp256k1.js +1 -0
  937. package/test/node_modules/ethereum-cryptography/esm/sha256.js +3 -0
  938. package/test/node_modules/ethereum-cryptography/esm/sha512.js +3 -0
  939. package/test/node_modules/ethereum-cryptography/esm/utils.js +47 -0
  940. package/test/node_modules/ethereum-cryptography/hdkey.d.ts +1 -0
  941. package/test/node_modules/ethereum-cryptography/hdkey.js +6 -0
  942. package/test/node_modules/ethereum-cryptography/index.d.ts +0 -0
  943. package/test/node_modules/ethereum-cryptography/index.js +2 -0
  944. package/test/node_modules/ethereum-cryptography/keccak.d.ts +11 -0
  945. package/test/node_modules/ethereum-cryptography/keccak.js +13 -0
  946. package/test/node_modules/ethereum-cryptography/package.json +369 -0
  947. package/test/node_modules/ethereum-cryptography/pbkdf2.d.ts +2 -0
  948. package/test/node_modules/ethereum-cryptography/pbkdf2.js +30 -0
  949. package/test/node_modules/ethereum-cryptography/random.d.ts +2 -0
  950. package/test/node_modules/ethereum-cryptography/random.js +11 -0
  951. package/test/node_modules/ethereum-cryptography/ripemd160.d.ts +1 -0
  952. package/test/node_modules/ethereum-cryptography/ripemd160.js +6 -0
  953. package/test/node_modules/ethereum-cryptography/scrypt.d.ts +4 -0
  954. package/test/node_modules/ethereum-cryptography/scrypt.js +16 -0
  955. package/test/node_modules/ethereum-cryptography/secp256k1-compat.d.ts +35 -0
  956. package/test/node_modules/ethereum-cryptography/secp256k1-compat.js +277 -0
  957. package/test/node_modules/ethereum-cryptography/secp256k1.d.ts +1 -0
  958. package/test/node_modules/ethereum-cryptography/secp256k1.js +5 -0
  959. package/test/node_modules/ethereum-cryptography/sha256.d.ts +1 -0
  960. package/test/node_modules/ethereum-cryptography/sha256.js +6 -0
  961. package/test/node_modules/ethereum-cryptography/sha512.d.ts +1 -0
  962. package/test/node_modules/ethereum-cryptography/sha512.js +6 -0
  963. package/test/node_modules/ethereum-cryptography/utils.d.ts +12 -0
  964. package/test/node_modules/ethereum-cryptography/utils.js +63 -0
  965. package/test/node_modules/fast-safe-stringify/.travis.yml +8 -0
  966. package/test/node_modules/fast-safe-stringify/CHANGELOG.md +17 -0
  967. package/test/node_modules/fast-safe-stringify/LICENSE +23 -0
  968. package/test/node_modules/fast-safe-stringify/benchmark.js +137 -0
  969. package/test/node_modules/fast-safe-stringify/index.d.ts +23 -0
  970. package/test/node_modules/fast-safe-stringify/index.js +229 -0
  971. package/test/node_modules/fast-safe-stringify/package.json +46 -0
  972. package/test/node_modules/fast-safe-stringify/readme.md +170 -0
  973. package/test/node_modules/fast-safe-stringify/test-stable.js +404 -0
  974. package/test/node_modules/fast-safe-stringify/test.js +397 -0
  975. package/test/node_modules/fetch-blob/LICENSE +21 -0
  976. package/test/node_modules/fetch-blob/README.md +106 -0
  977. package/test/node_modules/fetch-blob/file.d.ts +2 -0
  978. package/test/node_modules/fetch-blob/file.js +49 -0
  979. package/test/node_modules/fetch-blob/from.d.ts +26 -0
  980. package/test/node_modules/fetch-blob/from.js +100 -0
  981. package/test/node_modules/fetch-blob/index.d.ts +3 -0
  982. package/test/node_modules/fetch-blob/index.js +250 -0
  983. package/test/node_modules/fetch-blob/package.json +56 -0
  984. package/test/node_modules/fetch-blob/streams.cjs +51 -0
  985. package/test/node_modules/fill-range/LICENSE +21 -0
  986. package/test/node_modules/fill-range/README.md +237 -0
  987. package/test/node_modules/fill-range/index.js +248 -0
  988. package/test/node_modules/fill-range/package.json +74 -0
  989. package/test/node_modules/find-up/index.d.ts +138 -0
  990. package/test/node_modules/find-up/index.js +89 -0
  991. package/test/node_modules/find-up/license +9 -0
  992. package/test/node_modules/find-up/package.json +54 -0
  993. package/test/node_modules/find-up/readme.md +151 -0
  994. package/test/node_modules/flat/.travis.yml +8 -0
  995. package/test/node_modules/flat/LICENSE +12 -0
  996. package/test/node_modules/flat/README.md +236 -0
  997. package/test/node_modules/flat/cli.js +42 -0
  998. package/test/node_modules/flat/index.js +158 -0
  999. package/test/node_modules/flat/package.json +37 -0
  1000. package/test/node_modules/flat/test/test.js +643 -0
  1001. package/test/node_modules/foreground-child/LICENSE +15 -0
  1002. package/test/node_modules/foreground-child/README.md +128 -0
  1003. package/test/node_modules/foreground-child/dist/commonjs/all-signals.d.ts +2 -0
  1004. package/test/node_modules/foreground-child/dist/commonjs/all-signals.d.ts.map +1 -0
  1005. package/test/node_modules/foreground-child/dist/commonjs/all-signals.js +58 -0
  1006. package/test/node_modules/foreground-child/dist/commonjs/all-signals.js.map +1 -0
  1007. package/test/node_modules/foreground-child/dist/commonjs/index.d.ts +58 -0
  1008. package/test/node_modules/foreground-child/dist/commonjs/index.d.ts.map +1 -0
  1009. package/test/node_modules/foreground-child/dist/commonjs/index.js +123 -0
  1010. package/test/node_modules/foreground-child/dist/commonjs/index.js.map +1 -0
  1011. package/test/node_modules/foreground-child/dist/commonjs/package.json +3 -0
  1012. package/test/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts +6 -0
  1013. package/test/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts.map +1 -0
  1014. package/test/node_modules/foreground-child/dist/commonjs/proxy-signals.js +38 -0
  1015. package/test/node_modules/foreground-child/dist/commonjs/proxy-signals.js.map +1 -0
  1016. package/test/node_modules/foreground-child/dist/commonjs/watchdog.d.ts +10 -0
  1017. package/test/node_modules/foreground-child/dist/commonjs/watchdog.d.ts.map +1 -0
  1018. package/test/node_modules/foreground-child/dist/commonjs/watchdog.js +50 -0
  1019. package/test/node_modules/foreground-child/dist/commonjs/watchdog.js.map +1 -0
  1020. package/test/node_modules/foreground-child/dist/esm/all-signals.d.ts +2 -0
  1021. package/test/node_modules/foreground-child/dist/esm/all-signals.d.ts.map +1 -0
  1022. package/test/node_modules/foreground-child/dist/esm/all-signals.js +52 -0
  1023. package/test/node_modules/foreground-child/dist/esm/all-signals.js.map +1 -0
  1024. package/test/node_modules/foreground-child/dist/esm/index.d.ts +58 -0
  1025. package/test/node_modules/foreground-child/dist/esm/index.d.ts.map +1 -0
  1026. package/test/node_modules/foreground-child/dist/esm/index.js +115 -0
  1027. package/test/node_modules/foreground-child/dist/esm/index.js.map +1 -0
  1028. package/test/node_modules/foreground-child/dist/esm/package.json +3 -0
  1029. package/test/node_modules/foreground-child/dist/esm/proxy-signals.d.ts +6 -0
  1030. package/test/node_modules/foreground-child/dist/esm/proxy-signals.d.ts.map +1 -0
  1031. package/test/node_modules/foreground-child/dist/esm/proxy-signals.js +34 -0
  1032. package/test/node_modules/foreground-child/dist/esm/proxy-signals.js.map +1 -0
  1033. package/test/node_modules/foreground-child/dist/esm/watchdog.d.ts +10 -0
  1034. package/test/node_modules/foreground-child/dist/esm/watchdog.d.ts.map +1 -0
  1035. package/test/node_modules/foreground-child/dist/esm/watchdog.js +46 -0
  1036. package/test/node_modules/foreground-child/dist/esm/watchdog.js.map +1 -0
  1037. package/test/node_modules/foreground-child/package.json +106 -0
  1038. package/test/node_modules/form-data/License +19 -0
  1039. package/test/node_modules/form-data/Readme.md +358 -0
  1040. package/test/node_modules/form-data/index.d.ts +62 -0
  1041. package/test/node_modules/form-data/lib/browser.js +2 -0
  1042. package/test/node_modules/form-data/lib/form_data.js +503 -0
  1043. package/test/node_modules/form-data/lib/populate.js +10 -0
  1044. package/test/node_modules/form-data/package.json +74 -0
  1045. package/test/node_modules/formdata-polyfill/FormData.js +441 -0
  1046. package/test/node_modules/formdata-polyfill/LICENSE +21 -0
  1047. package/test/node_modules/formdata-polyfill/README.md +145 -0
  1048. package/test/node_modules/formdata-polyfill/esm.min.d.ts +5 -0
  1049. package/test/node_modules/formdata-polyfill/esm.min.js +40 -0
  1050. package/test/node_modules/formdata-polyfill/formdata-to-blob.js +39 -0
  1051. package/test/node_modules/formdata-polyfill/formdata.min.js +21 -0
  1052. package/test/node_modules/formdata-polyfill/package.json +50 -0
  1053. package/test/node_modules/formidable/LICENSE +21 -0
  1054. package/test/node_modules/formidable/README.md +884 -0
  1055. package/test/node_modules/formidable/README_pt_BR.md +841 -0
  1056. package/test/node_modules/formidable/dist/helpers/firstValues.cjs +394 -0
  1057. package/test/node_modules/formidable/dist/helpers/readBooleans.cjs +12 -0
  1058. package/test/node_modules/formidable/dist/index.cjs +1690 -0
  1059. package/test/node_modules/formidable/dist/parsers/JSON.cjs +35 -0
  1060. package/test/node_modules/formidable/dist/parsers/Multipart.cjs +372 -0
  1061. package/test/node_modules/formidable/dist/parsers/OctetStream.cjs +14 -0
  1062. package/test/node_modules/formidable/dist/parsers/Querystring.cjs +38 -0
  1063. package/test/node_modules/formidable/dist/parsers/StreamingQuerystring.cjs +131 -0
  1064. package/test/node_modules/formidable/package.json +140 -0
  1065. package/test/node_modules/formidable/src/Formidable.js +684 -0
  1066. package/test/node_modules/formidable/src/FormidableError.js +51 -0
  1067. package/test/node_modules/formidable/src/PersistentFile.js +88 -0
  1068. package/test/node_modules/formidable/src/VolatileFile.js +80 -0
  1069. package/test/node_modules/formidable/src/helpers/firstValues.js +19 -0
  1070. package/test/node_modules/formidable/src/helpers/readBooleans.js +10 -0
  1071. package/test/node_modules/formidable/src/index.js +32 -0
  1072. package/test/node_modules/formidable/src/parsers/Dummy.js +19 -0
  1073. package/test/node_modules/formidable/src/parsers/JSON.js +30 -0
  1074. package/test/node_modules/formidable/src/parsers/Multipart.js +356 -0
  1075. package/test/node_modules/formidable/src/parsers/OctetStream.js +10 -0
  1076. package/test/node_modules/formidable/src/parsers/Querystring.js +33 -0
  1077. package/test/node_modules/formidable/src/parsers/StreamingQuerystring.js +117 -0
  1078. package/test/node_modules/formidable/src/parsers/index.js +15 -0
  1079. package/test/node_modules/formidable/src/plugins/index.js +6 -0
  1080. package/test/node_modules/formidable/src/plugins/json.js +39 -0
  1081. package/test/node_modules/formidable/src/plugins/multipart.js +173 -0
  1082. package/test/node_modules/formidable/src/plugins/octetstream.js +84 -0
  1083. package/test/node_modules/formidable/src/plugins/querystring.js +41 -0
  1084. package/test/node_modules/fount-js/README.md +35 -0
  1085. package/test/node_modules/fount-js/fount.cjs +145 -0
  1086. package/test/node_modules/fount-js/fount.js +202 -0
  1087. package/test/node_modules/fount-js/package.json +23 -0
  1088. package/test/node_modules/fsevents/LICENSE +22 -0
  1089. package/test/node_modules/fsevents/README.md +89 -0
  1090. package/test/node_modules/fsevents/fsevents.d.ts +46 -0
  1091. package/test/node_modules/fsevents/fsevents.js +83 -0
  1092. package/test/node_modules/fsevents/fsevents.node +0 -0
  1093. package/test/node_modules/fsevents/package.json +62 -0
  1094. package/test/node_modules/function-bind/.eslintrc +21 -0
  1095. package/test/node_modules/function-bind/.github/FUNDING.yml +12 -0
  1096. package/test/node_modules/function-bind/.github/SECURITY.md +3 -0
  1097. package/test/node_modules/function-bind/.nycrc +13 -0
  1098. package/test/node_modules/function-bind/CHANGELOG.md +136 -0
  1099. package/test/node_modules/function-bind/LICENSE +20 -0
  1100. package/test/node_modules/function-bind/README.md +46 -0
  1101. package/test/node_modules/function-bind/implementation.js +84 -0
  1102. package/test/node_modules/function-bind/index.js +5 -0
  1103. package/test/node_modules/function-bind/package.json +87 -0
  1104. package/test/node_modules/function-bind/test/.eslintrc +9 -0
  1105. package/test/node_modules/function-bind/test/index.js +252 -0
  1106. package/test/node_modules/get-caller-file/LICENSE.md +6 -0
  1107. package/test/node_modules/get-caller-file/README.md +41 -0
  1108. package/test/node_modules/get-caller-file/index.d.ts +2 -0
  1109. package/test/node_modules/get-caller-file/index.js +22 -0
  1110. package/test/node_modules/get-caller-file/index.js.map +1 -0
  1111. package/test/node_modules/get-caller-file/package.json +42 -0
  1112. package/test/node_modules/get-intrinsic/.eslintrc +42 -0
  1113. package/test/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
  1114. package/test/node_modules/get-intrinsic/.nycrc +9 -0
  1115. package/test/node_modules/get-intrinsic/CHANGELOG.md +186 -0
  1116. package/test/node_modules/get-intrinsic/LICENSE +21 -0
  1117. package/test/node_modules/get-intrinsic/README.md +71 -0
  1118. package/test/node_modules/get-intrinsic/index.js +378 -0
  1119. package/test/node_modules/get-intrinsic/package.json +97 -0
  1120. package/test/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
  1121. package/test/node_modules/get-proto/.eslintrc +10 -0
  1122. package/test/node_modules/get-proto/.github/FUNDING.yml +12 -0
  1123. package/test/node_modules/get-proto/.nycrc +9 -0
  1124. package/test/node_modules/get-proto/CHANGELOG.md +21 -0
  1125. package/test/node_modules/get-proto/LICENSE +21 -0
  1126. package/test/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  1127. package/test/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
  1128. package/test/node_modules/get-proto/README.md +50 -0
  1129. package/test/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  1130. package/test/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  1131. package/test/node_modules/get-proto/index.d.ts +5 -0
  1132. package/test/node_modules/get-proto/index.js +27 -0
  1133. package/test/node_modules/get-proto/package.json +81 -0
  1134. package/test/node_modules/get-proto/test/index.js +68 -0
  1135. package/test/node_modules/get-proto/tsconfig.json +9 -0
  1136. package/test/node_modules/glob/LICENSE +15 -0
  1137. package/test/node_modules/glob/README.md +1265 -0
  1138. package/test/node_modules/glob/dist/commonjs/glob.d.ts +388 -0
  1139. package/test/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -0
  1140. package/test/node_modules/glob/dist/commonjs/glob.js +247 -0
  1141. package/test/node_modules/glob/dist/commonjs/glob.js.map +1 -0
  1142. package/test/node_modules/glob/dist/commonjs/has-magic.d.ts +14 -0
  1143. package/test/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -0
  1144. package/test/node_modules/glob/dist/commonjs/has-magic.js +27 -0
  1145. package/test/node_modules/glob/dist/commonjs/has-magic.js.map +1 -0
  1146. package/test/node_modules/glob/dist/commonjs/ignore.d.ts +24 -0
  1147. package/test/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -0
  1148. package/test/node_modules/glob/dist/commonjs/ignore.js +119 -0
  1149. package/test/node_modules/glob/dist/commonjs/ignore.js.map +1 -0
  1150. package/test/node_modules/glob/dist/commonjs/index.d.ts +97 -0
  1151. package/test/node_modules/glob/dist/commonjs/index.d.ts.map +1 -0
  1152. package/test/node_modules/glob/dist/commonjs/index.js +68 -0
  1153. package/test/node_modules/glob/dist/commonjs/index.js.map +1 -0
  1154. package/test/node_modules/glob/dist/commonjs/package.json +3 -0
  1155. package/test/node_modules/glob/dist/commonjs/pattern.d.ts +76 -0
  1156. package/test/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -0
  1157. package/test/node_modules/glob/dist/commonjs/pattern.js +219 -0
  1158. package/test/node_modules/glob/dist/commonjs/pattern.js.map +1 -0
  1159. package/test/node_modules/glob/dist/commonjs/processor.d.ts +59 -0
  1160. package/test/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -0
  1161. package/test/node_modules/glob/dist/commonjs/processor.js +301 -0
  1162. package/test/node_modules/glob/dist/commonjs/processor.js.map +1 -0
  1163. package/test/node_modules/glob/dist/commonjs/walker.d.ts +97 -0
  1164. package/test/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -0
  1165. package/test/node_modules/glob/dist/commonjs/walker.js +387 -0
  1166. package/test/node_modules/glob/dist/commonjs/walker.js.map +1 -0
  1167. package/test/node_modules/glob/dist/esm/bin.d.mts +3 -0
  1168. package/test/node_modules/glob/dist/esm/bin.d.mts.map +1 -0
  1169. package/test/node_modules/glob/dist/esm/bin.mjs +270 -0
  1170. package/test/node_modules/glob/dist/esm/bin.mjs.map +1 -0
  1171. package/test/node_modules/glob/dist/esm/glob.d.ts +388 -0
  1172. package/test/node_modules/glob/dist/esm/glob.d.ts.map +1 -0
  1173. package/test/node_modules/glob/dist/esm/glob.js +243 -0
  1174. package/test/node_modules/glob/dist/esm/glob.js.map +1 -0
  1175. package/test/node_modules/glob/dist/esm/has-magic.d.ts +14 -0
  1176. package/test/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -0
  1177. package/test/node_modules/glob/dist/esm/has-magic.js +23 -0
  1178. package/test/node_modules/glob/dist/esm/has-magic.js.map +1 -0
  1179. package/test/node_modules/glob/dist/esm/ignore.d.ts +24 -0
  1180. package/test/node_modules/glob/dist/esm/ignore.d.ts.map +1 -0
  1181. package/test/node_modules/glob/dist/esm/ignore.js +115 -0
  1182. package/test/node_modules/glob/dist/esm/ignore.js.map +1 -0
  1183. package/test/node_modules/glob/dist/esm/index.d.ts +97 -0
  1184. package/test/node_modules/glob/dist/esm/index.d.ts.map +1 -0
  1185. package/test/node_modules/glob/dist/esm/index.js +55 -0
  1186. package/test/node_modules/glob/dist/esm/index.js.map +1 -0
  1187. package/test/node_modules/glob/dist/esm/package.json +3 -0
  1188. package/test/node_modules/glob/dist/esm/pattern.d.ts +76 -0
  1189. package/test/node_modules/glob/dist/esm/pattern.d.ts.map +1 -0
  1190. package/test/node_modules/glob/dist/esm/pattern.js +215 -0
  1191. package/test/node_modules/glob/dist/esm/pattern.js.map +1 -0
  1192. package/test/node_modules/glob/dist/esm/processor.d.ts +59 -0
  1193. package/test/node_modules/glob/dist/esm/processor.d.ts.map +1 -0
  1194. package/test/node_modules/glob/dist/esm/processor.js +294 -0
  1195. package/test/node_modules/glob/dist/esm/processor.js.map +1 -0
  1196. package/test/node_modules/glob/dist/esm/walker.d.ts +97 -0
  1197. package/test/node_modules/glob/dist/esm/walker.d.ts.map +1 -0
  1198. package/test/node_modules/glob/dist/esm/walker.js +381 -0
  1199. package/test/node_modules/glob/dist/esm/walker.js.map +1 -0
  1200. package/test/node_modules/glob/node_modules/minimatch/LICENSE +15 -0
  1201. package/test/node_modules/glob/node_modules/minimatch/README.md +454 -0
  1202. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
  1203. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
  1204. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
  1205. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
  1206. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/ast.d.ts +20 -0
  1207. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
  1208. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/ast.js +592 -0
  1209. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
  1210. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
  1211. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
  1212. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
  1213. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
  1214. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/escape.d.ts +12 -0
  1215. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
  1216. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/escape.js +22 -0
  1217. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
  1218. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/index.d.ts +94 -0
  1219. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
  1220. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/index.js +1017 -0
  1221. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
  1222. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/package.json +3 -0
  1223. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.d.ts +17 -0
  1224. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
  1225. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.js +24 -0
  1226. package/test/node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
  1227. package/test/node_modules/glob/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
  1228. package/test/node_modules/glob/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
  1229. package/test/node_modules/glob/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
  1230. package/test/node_modules/glob/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
  1231. package/test/node_modules/glob/node_modules/minimatch/dist/esm/ast.d.ts +20 -0
  1232. package/test/node_modules/glob/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
  1233. package/test/node_modules/glob/node_modules/minimatch/dist/esm/ast.js +588 -0
  1234. package/test/node_modules/glob/node_modules/minimatch/dist/esm/ast.js.map +1 -0
  1235. package/test/node_modules/glob/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
  1236. package/test/node_modules/glob/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
  1237. package/test/node_modules/glob/node_modules/minimatch/dist/esm/brace-expressions.js +148 -0
  1238. package/test/node_modules/glob/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
  1239. package/test/node_modules/glob/node_modules/minimatch/dist/esm/escape.d.ts +12 -0
  1240. package/test/node_modules/glob/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
  1241. package/test/node_modules/glob/node_modules/minimatch/dist/esm/escape.js +18 -0
  1242. package/test/node_modules/glob/node_modules/minimatch/dist/esm/escape.js.map +1 -0
  1243. package/test/node_modules/glob/node_modules/minimatch/dist/esm/index.d.ts +94 -0
  1244. package/test/node_modules/glob/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
  1245. package/test/node_modules/glob/node_modules/minimatch/dist/esm/index.js +1001 -0
  1246. package/test/node_modules/glob/node_modules/minimatch/dist/esm/index.js.map +1 -0
  1247. package/test/node_modules/glob/node_modules/minimatch/dist/esm/package.json +3 -0
  1248. package/test/node_modules/glob/node_modules/minimatch/dist/esm/unescape.d.ts +17 -0
  1249. package/test/node_modules/glob/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
  1250. package/test/node_modules/glob/node_modules/minimatch/dist/esm/unescape.js +20 -0
  1251. package/test/node_modules/glob/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
  1252. package/test/node_modules/glob/node_modules/minimatch/package.json +82 -0
  1253. package/test/node_modules/glob/package.json +99 -0
  1254. package/test/node_modules/glob-parent/CHANGELOG.md +110 -0
  1255. package/test/node_modules/glob-parent/LICENSE +15 -0
  1256. package/test/node_modules/glob-parent/README.md +137 -0
  1257. package/test/node_modules/glob-parent/index.js +42 -0
  1258. package/test/node_modules/glob-parent/package.json +48 -0
  1259. package/test/node_modules/gopd/.eslintrc +16 -0
  1260. package/test/node_modules/gopd/.github/FUNDING.yml +12 -0
  1261. package/test/node_modules/gopd/CHANGELOG.md +45 -0
  1262. package/test/node_modules/gopd/LICENSE +21 -0
  1263. package/test/node_modules/gopd/README.md +40 -0
  1264. package/test/node_modules/gopd/gOPD.d.ts +1 -0
  1265. package/test/node_modules/gopd/gOPD.js +4 -0
  1266. package/test/node_modules/gopd/index.d.ts +5 -0
  1267. package/test/node_modules/gopd/index.js +15 -0
  1268. package/test/node_modules/gopd/package.json +77 -0
  1269. package/test/node_modules/gopd/test/index.js +36 -0
  1270. package/test/node_modules/gopd/tsconfig.json +9 -0
  1271. package/test/node_modules/has-flag/index.d.ts +39 -0
  1272. package/test/node_modules/has-flag/index.js +8 -0
  1273. package/test/node_modules/has-flag/license +9 -0
  1274. package/test/node_modules/has-flag/package.json +46 -0
  1275. package/test/node_modules/has-flag/readme.md +89 -0
  1276. package/test/node_modules/has-symbols/.eslintrc +11 -0
  1277. package/test/node_modules/has-symbols/.github/FUNDING.yml +12 -0
  1278. package/test/node_modules/has-symbols/.nycrc +9 -0
  1279. package/test/node_modules/has-symbols/CHANGELOG.md +91 -0
  1280. package/test/node_modules/has-symbols/LICENSE +21 -0
  1281. package/test/node_modules/has-symbols/README.md +46 -0
  1282. package/test/node_modules/has-symbols/index.d.ts +3 -0
  1283. package/test/node_modules/has-symbols/index.js +14 -0
  1284. package/test/node_modules/has-symbols/package.json +111 -0
  1285. package/test/node_modules/has-symbols/shams.d.ts +3 -0
  1286. package/test/node_modules/has-symbols/shams.js +45 -0
  1287. package/test/node_modules/has-symbols/test/index.js +22 -0
  1288. package/test/node_modules/has-symbols/test/shams/core-js.js +29 -0
  1289. package/test/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
  1290. package/test/node_modules/has-symbols/test/tests.js +58 -0
  1291. package/test/node_modules/has-symbols/tsconfig.json +10 -0
  1292. package/test/node_modules/has-tostringtag/.eslintrc +5 -0
  1293. package/test/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
  1294. package/test/node_modules/has-tostringtag/.nycrc +13 -0
  1295. package/test/node_modules/has-tostringtag/CHANGELOG.md +42 -0
  1296. package/test/node_modules/has-tostringtag/LICENSE +21 -0
  1297. package/test/node_modules/has-tostringtag/README.md +46 -0
  1298. package/test/node_modules/has-tostringtag/index.d.ts +3 -0
  1299. package/test/node_modules/has-tostringtag/index.js +8 -0
  1300. package/test/node_modules/has-tostringtag/package.json +108 -0
  1301. package/test/node_modules/has-tostringtag/shams.d.ts +3 -0
  1302. package/test/node_modules/has-tostringtag/shams.js +8 -0
  1303. package/test/node_modules/has-tostringtag/test/index.js +21 -0
  1304. package/test/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
  1305. package/test/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
  1306. package/test/node_modules/has-tostringtag/test/tests.js +15 -0
  1307. package/test/node_modules/has-tostringtag/tsconfig.json +49 -0
  1308. package/test/node_modules/hasown/.eslintrc +5 -0
  1309. package/test/node_modules/hasown/.github/FUNDING.yml +12 -0
  1310. package/test/node_modules/hasown/.nycrc +13 -0
  1311. package/test/node_modules/hasown/CHANGELOG.md +40 -0
  1312. package/test/node_modules/hasown/LICENSE +21 -0
  1313. package/test/node_modules/hasown/README.md +40 -0
  1314. package/test/node_modules/hasown/index.d.ts +3 -0
  1315. package/test/node_modules/hasown/index.js +8 -0
  1316. package/test/node_modules/hasown/package.json +92 -0
  1317. package/test/node_modules/hasown/tsconfig.json +6 -0
  1318. package/test/node_modules/he/LICENSE-MIT.txt +20 -0
  1319. package/test/node_modules/he/README.md +379 -0
  1320. package/test/node_modules/he/bin/he +148 -0
  1321. package/test/node_modules/he/he.js +345 -0
  1322. package/test/node_modules/he/man/he.1 +78 -0
  1323. package/test/node_modules/he/package.json +58 -0
  1324. package/test/node_modules/hexoid/dist/index.d.ts +1 -0
  1325. package/test/node_modules/hexoid/dist/index.js +1 -0
  1326. package/test/node_modules/hexoid/dist/index.mjs +1 -0
  1327. package/test/node_modules/hexoid/license +9 -0
  1328. package/test/node_modules/hexoid/package.json +45 -0
  1329. package/test/node_modules/hexoid/readme.md +118 -0
  1330. package/test/node_modules/is-binary-path/index.d.ts +17 -0
  1331. package/test/node_modules/is-binary-path/index.js +7 -0
  1332. package/test/node_modules/is-binary-path/license +9 -0
  1333. package/test/node_modules/is-binary-path/package.json +40 -0
  1334. package/test/node_modules/is-binary-path/readme.md +34 -0
  1335. package/test/node_modules/is-extglob/LICENSE +21 -0
  1336. package/test/node_modules/is-extglob/README.md +107 -0
  1337. package/test/node_modules/is-extglob/index.js +20 -0
  1338. package/test/node_modules/is-extglob/package.json +69 -0
  1339. package/test/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  1340. package/test/node_modules/is-fullwidth-code-point/index.js +50 -0
  1341. package/test/node_modules/is-fullwidth-code-point/license +9 -0
  1342. package/test/node_modules/is-fullwidth-code-point/package.json +42 -0
  1343. package/test/node_modules/is-fullwidth-code-point/readme.md +39 -0
  1344. package/test/node_modules/is-glob/LICENSE +21 -0
  1345. package/test/node_modules/is-glob/README.md +206 -0
  1346. package/test/node_modules/is-glob/index.js +150 -0
  1347. package/test/node_modules/is-glob/package.json +81 -0
  1348. package/test/node_modules/is-number/LICENSE +21 -0
  1349. package/test/node_modules/is-number/README.md +187 -0
  1350. package/test/node_modules/is-number/index.js +18 -0
  1351. package/test/node_modules/is-number/package.json +82 -0
  1352. package/test/node_modules/is-plain-obj/index.d.ts +29 -0
  1353. package/test/node_modules/is-plain-obj/index.js +10 -0
  1354. package/test/node_modules/is-plain-obj/license +9 -0
  1355. package/test/node_modules/is-plain-obj/package.json +38 -0
  1356. package/test/node_modules/is-plain-obj/readme.md +54 -0
  1357. package/test/node_modules/is-unicode-supported/index.d.ts +14 -0
  1358. package/test/node_modules/is-unicode-supported/index.js +13 -0
  1359. package/test/node_modules/is-unicode-supported/license +9 -0
  1360. package/test/node_modules/is-unicode-supported/package.json +41 -0
  1361. package/test/node_modules/is-unicode-supported/readme.md +35 -0
  1362. package/test/node_modules/isexe/LICENSE +15 -0
  1363. package/test/node_modules/isexe/README.md +51 -0
  1364. package/test/node_modules/isexe/index.js +57 -0
  1365. package/test/node_modules/isexe/mode.js +41 -0
  1366. package/test/node_modules/isexe/package.json +31 -0
  1367. package/test/node_modules/isexe/test/basic.js +221 -0
  1368. package/test/node_modules/isexe/windows.js +42 -0
  1369. package/test/node_modules/jackspeak/LICENSE.md +55 -0
  1370. package/test/node_modules/jackspeak/README.md +357 -0
  1371. package/test/node_modules/jackspeak/dist/commonjs/index.d.ts +315 -0
  1372. package/test/node_modules/jackspeak/dist/commonjs/index.d.ts.map +1 -0
  1373. package/test/node_modules/jackspeak/dist/commonjs/index.js +1010 -0
  1374. package/test/node_modules/jackspeak/dist/commonjs/index.js.map +1 -0
  1375. package/test/node_modules/jackspeak/dist/commonjs/package.json +3 -0
  1376. package/test/node_modules/jackspeak/dist/commonjs/parse-args-cjs.cjs.map +1 -0
  1377. package/test/node_modules/jackspeak/dist/commonjs/parse-args-cjs.d.cts.map +1 -0
  1378. package/test/node_modules/jackspeak/dist/commonjs/parse-args.d.ts +4 -0
  1379. package/test/node_modules/jackspeak/dist/commonjs/parse-args.js +50 -0
  1380. package/test/node_modules/jackspeak/dist/esm/index.d.ts +315 -0
  1381. package/test/node_modules/jackspeak/dist/esm/index.d.ts.map +1 -0
  1382. package/test/node_modules/jackspeak/dist/esm/index.js +1000 -0
  1383. package/test/node_modules/jackspeak/dist/esm/index.js.map +1 -0
  1384. package/test/node_modules/jackspeak/dist/esm/package.json +3 -0
  1385. package/test/node_modules/jackspeak/dist/esm/parse-args.d.ts +4 -0
  1386. package/test/node_modules/jackspeak/dist/esm/parse-args.d.ts.map +1 -0
  1387. package/test/node_modules/jackspeak/dist/esm/parse-args.js +26 -0
  1388. package/test/node_modules/jackspeak/dist/esm/parse-args.js.map +1 -0
  1389. package/test/node_modules/jackspeak/package.json +95 -0
  1390. package/test/node_modules/js-yaml/CHANGELOG.md +616 -0
  1391. package/test/node_modules/js-yaml/LICENSE +21 -0
  1392. package/test/node_modules/js-yaml/README.md +246 -0
  1393. package/test/node_modules/js-yaml/bin/js-yaml.js +126 -0
  1394. package/test/node_modules/js-yaml/dist/js-yaml.js +3874 -0
  1395. package/test/node_modules/js-yaml/dist/js-yaml.min.js +2 -0
  1396. package/test/node_modules/js-yaml/dist/js-yaml.mjs +3851 -0
  1397. package/test/node_modules/js-yaml/index.js +47 -0
  1398. package/test/node_modules/js-yaml/lib/common.js +59 -0
  1399. package/test/node_modules/js-yaml/lib/dumper.js +965 -0
  1400. package/test/node_modules/js-yaml/lib/exception.js +55 -0
  1401. package/test/node_modules/js-yaml/lib/loader.js +1727 -0
  1402. package/test/node_modules/js-yaml/lib/schema/core.js +11 -0
  1403. package/test/node_modules/js-yaml/lib/schema/default.js +22 -0
  1404. package/test/node_modules/js-yaml/lib/schema/failsafe.js +17 -0
  1405. package/test/node_modules/js-yaml/lib/schema/json.js +19 -0
  1406. package/test/node_modules/js-yaml/lib/schema.js +121 -0
  1407. package/test/node_modules/js-yaml/lib/snippet.js +101 -0
  1408. package/test/node_modules/js-yaml/lib/type/binary.js +125 -0
  1409. package/test/node_modules/js-yaml/lib/type/bool.js +35 -0
  1410. package/test/node_modules/js-yaml/lib/type/float.js +97 -0
  1411. package/test/node_modules/js-yaml/lib/type/int.js +156 -0
  1412. package/test/node_modules/js-yaml/lib/type/map.js +8 -0
  1413. package/test/node_modules/js-yaml/lib/type/merge.js +12 -0
  1414. package/test/node_modules/js-yaml/lib/type/null.js +35 -0
  1415. package/test/node_modules/js-yaml/lib/type/omap.js +44 -0
  1416. package/test/node_modules/js-yaml/lib/type/pairs.js +53 -0
  1417. package/test/node_modules/js-yaml/lib/type/seq.js +8 -0
  1418. package/test/node_modules/js-yaml/lib/type/set.js +29 -0
  1419. package/test/node_modules/js-yaml/lib/type/str.js +8 -0
  1420. package/test/node_modules/js-yaml/lib/type/timestamp.js +88 -0
  1421. package/test/node_modules/js-yaml/lib/type.js +66 -0
  1422. package/test/node_modules/js-yaml/package.json +66 -0
  1423. package/test/node_modules/locate-path/index.d.ts +83 -0
  1424. package/test/node_modules/locate-path/index.js +68 -0
  1425. package/test/node_modules/locate-path/license +9 -0
  1426. package/test/node_modules/locate-path/package.json +46 -0
  1427. package/test/node_modules/locate-path/readme.md +125 -0
  1428. package/test/node_modules/log-symbols/browser.js +8 -0
  1429. package/test/node_modules/log-symbols/index.d.ts +25 -0
  1430. package/test/node_modules/log-symbols/index.js +19 -0
  1431. package/test/node_modules/log-symbols/license +9 -0
  1432. package/test/node_modules/log-symbols/package.json +52 -0
  1433. package/test/node_modules/log-symbols/readme.md +51 -0
  1434. package/test/node_modules/loupe/LICENSE +9 -0
  1435. package/test/node_modules/loupe/README.md +63 -0
  1436. package/test/node_modules/loupe/lib/arguments.d.ts +3 -0
  1437. package/test/node_modules/loupe/lib/arguments.d.ts.map +1 -0
  1438. package/test/node_modules/loupe/lib/arguments.js +7 -0
  1439. package/test/node_modules/loupe/lib/array.d.ts +3 -0
  1440. package/test/node_modules/loupe/lib/array.d.ts.map +1 -0
  1441. package/test/node_modules/loupe/lib/array.js +16 -0
  1442. package/test/node_modules/loupe/lib/bigint.d.ts +3 -0
  1443. package/test/node_modules/loupe/lib/bigint.d.ts.map +1 -0
  1444. package/test/node_modules/loupe/lib/bigint.js +7 -0
  1445. package/test/node_modules/loupe/lib/class.d.ts +5 -0
  1446. package/test/node_modules/loupe/lib/class.d.ts.map +1 -0
  1447. package/test/node_modules/loupe/lib/class.js +15 -0
  1448. package/test/node_modules/loupe/lib/date.d.ts +3 -0
  1449. package/test/node_modules/loupe/lib/date.d.ts.map +1 -0
  1450. package/test/node_modules/loupe/lib/date.js +11 -0
  1451. package/test/node_modules/loupe/lib/error.d.ts +3 -0
  1452. package/test/node_modules/loupe/lib/error.d.ts.map +1 -0
  1453. package/test/node_modules/loupe/lib/error.js +35 -0
  1454. package/test/node_modules/loupe/lib/function.d.ts +7 -0
  1455. package/test/node_modules/loupe/lib/function.d.ts.map +1 -0
  1456. package/test/node_modules/loupe/lib/function.js +9 -0
  1457. package/test/node_modules/loupe/lib/helpers.d.ts +7 -0
  1458. package/test/node_modules/loupe/lib/helpers.d.ts.map +1 -0
  1459. package/test/node_modules/loupe/lib/helpers.js +159 -0
  1460. package/test/node_modules/loupe/lib/html.d.ts +5 -0
  1461. package/test/node_modules/loupe/lib/html.d.ts.map +1 -0
  1462. package/test/node_modules/loupe/lib/html.js +34 -0
  1463. package/test/node_modules/loupe/lib/index.d.ts +7 -0
  1464. package/test/node_modules/loupe/lib/index.d.ts.map +1 -0
  1465. package/test/node_modules/loupe/lib/index.js +161 -0
  1466. package/test/node_modules/loupe/lib/map.d.ts +3 -0
  1467. package/test/node_modules/loupe/lib/map.d.ts.map +1 -0
  1468. package/test/node_modules/loupe/lib/map.js +22 -0
  1469. package/test/node_modules/loupe/lib/number.d.ts +3 -0
  1470. package/test/node_modules/loupe/lib/number.d.ts.map +1 -0
  1471. package/test/node_modules/loupe/lib/number.js +17 -0
  1472. package/test/node_modules/loupe/lib/object.d.ts +3 -0
  1473. package/test/node_modules/loupe/lib/object.d.ts.map +1 -0
  1474. package/test/node_modules/loupe/lib/object.js +22 -0
  1475. package/test/node_modules/loupe/lib/promise.d.ts +5 -0
  1476. package/test/node_modules/loupe/lib/promise.d.ts.map +1 -0
  1477. package/test/node_modules/loupe/lib/promise.js +18 -0
  1478. package/test/node_modules/loupe/lib/regexp.d.ts +3 -0
  1479. package/test/node_modules/loupe/lib/regexp.d.ts.map +1 -0
  1480. package/test/node_modules/loupe/lib/regexp.js +7 -0
  1481. package/test/node_modules/loupe/lib/set.d.ts +3 -0
  1482. package/test/node_modules/loupe/lib/set.d.ts.map +1 -0
  1483. package/test/node_modules/loupe/lib/set.js +15 -0
  1484. package/test/node_modules/loupe/lib/string.d.ts +3 -0
  1485. package/test/node_modules/loupe/lib/string.d.ts.map +1 -0
  1486. package/test/node_modules/loupe/lib/string.js +24 -0
  1487. package/test/node_modules/loupe/lib/symbol.d.ts +2 -0
  1488. package/test/node_modules/loupe/lib/symbol.d.ts.map +1 -0
  1489. package/test/node_modules/loupe/lib/symbol.js +6 -0
  1490. package/test/node_modules/loupe/lib/typedarray.d.ts +5 -0
  1491. package/test/node_modules/loupe/lib/typedarray.d.ts.map +1 -0
  1492. package/test/node_modules/loupe/lib/typedarray.js +38 -0
  1493. package/test/node_modules/loupe/lib/types.d.ts +15 -0
  1494. package/test/node_modules/loupe/lib/types.d.ts.map +1 -0
  1495. package/test/node_modules/loupe/lib/types.js +1 -0
  1496. package/test/node_modules/loupe/loupe.js +640 -0
  1497. package/test/node_modules/loupe/package.json +73 -0
  1498. package/test/node_modules/lru-cache/LICENSE +15 -0
  1499. package/test/node_modules/lru-cache/README.md +331 -0
  1500. package/test/node_modules/lru-cache/dist/commonjs/index.d.ts +1277 -0
  1501. package/test/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
  1502. package/test/node_modules/lru-cache/dist/commonjs/index.js +1546 -0
  1503. package/test/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
  1504. package/test/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
  1505. package/test/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
  1506. package/test/node_modules/lru-cache/dist/commonjs/package.json +3 -0
  1507. package/test/node_modules/lru-cache/dist/esm/index.d.ts +1277 -0
  1508. package/test/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
  1509. package/test/node_modules/lru-cache/dist/esm/index.js +1542 -0
  1510. package/test/node_modules/lru-cache/dist/esm/index.js.map +1 -0
  1511. package/test/node_modules/lru-cache/dist/esm/index.min.js +2 -0
  1512. package/test/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
  1513. package/test/node_modules/lru-cache/dist/esm/package.json +3 -0
  1514. package/test/node_modules/lru-cache/package.json +116 -0
  1515. package/test/node_modules/math-intrinsics/.eslintrc +16 -0
  1516. package/test/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  1517. package/test/node_modules/math-intrinsics/CHANGELOG.md +24 -0
  1518. package/test/node_modules/math-intrinsics/LICENSE +21 -0
  1519. package/test/node_modules/math-intrinsics/README.md +50 -0
  1520. package/test/node_modules/math-intrinsics/abs.d.ts +1 -0
  1521. package/test/node_modules/math-intrinsics/abs.js +4 -0
  1522. package/test/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  1523. package/test/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  1524. package/test/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  1525. package/test/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  1526. package/test/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  1527. package/test/node_modules/math-intrinsics/constants/maxValue.js +5 -0
  1528. package/test/node_modules/math-intrinsics/floor.d.ts +1 -0
  1529. package/test/node_modules/math-intrinsics/floor.js +4 -0
  1530. package/test/node_modules/math-intrinsics/isFinite.d.ts +3 -0
  1531. package/test/node_modules/math-intrinsics/isFinite.js +12 -0
  1532. package/test/node_modules/math-intrinsics/isInteger.d.ts +3 -0
  1533. package/test/node_modules/math-intrinsics/isInteger.js +16 -0
  1534. package/test/node_modules/math-intrinsics/isNaN.d.ts +1 -0
  1535. package/test/node_modules/math-intrinsics/isNaN.js +6 -0
  1536. package/test/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  1537. package/test/node_modules/math-intrinsics/isNegativeZero.js +6 -0
  1538. package/test/node_modules/math-intrinsics/max.d.ts +1 -0
  1539. package/test/node_modules/math-intrinsics/max.js +4 -0
  1540. package/test/node_modules/math-intrinsics/min.d.ts +1 -0
  1541. package/test/node_modules/math-intrinsics/min.js +4 -0
  1542. package/test/node_modules/math-intrinsics/mod.d.ts +3 -0
  1543. package/test/node_modules/math-intrinsics/mod.js +9 -0
  1544. package/test/node_modules/math-intrinsics/package.json +86 -0
  1545. package/test/node_modules/math-intrinsics/pow.d.ts +1 -0
  1546. package/test/node_modules/math-intrinsics/pow.js +4 -0
  1547. package/test/node_modules/math-intrinsics/round.d.ts +1 -0
  1548. package/test/node_modules/math-intrinsics/round.js +4 -0
  1549. package/test/node_modules/math-intrinsics/sign.d.ts +3 -0
  1550. package/test/node_modules/math-intrinsics/sign.js +11 -0
  1551. package/test/node_modules/math-intrinsics/test/index.js +192 -0
  1552. package/test/node_modules/math-intrinsics/tsconfig.json +3 -0
  1553. package/test/node_modules/methods/HISTORY.md +29 -0
  1554. package/test/node_modules/methods/LICENSE +24 -0
  1555. package/test/node_modules/methods/README.md +51 -0
  1556. package/test/node_modules/methods/index.js +69 -0
  1557. package/test/node_modules/methods/package.json +36 -0
  1558. package/test/node_modules/mime/CHANGELOG.md +296 -0
  1559. package/test/node_modules/mime/LICENSE +21 -0
  1560. package/test/node_modules/mime/Mime.js +97 -0
  1561. package/test/node_modules/mime/README.md +187 -0
  1562. package/test/node_modules/mime/cli.js +46 -0
  1563. package/test/node_modules/mime/index.js +4 -0
  1564. package/test/node_modules/mime/lite.js +4 -0
  1565. package/test/node_modules/mime/package.json +52 -0
  1566. package/test/node_modules/mime/types/other.js +1 -0
  1567. package/test/node_modules/mime/types/standard.js +1 -0
  1568. package/test/node_modules/mime-db/HISTORY.md +507 -0
  1569. package/test/node_modules/mime-db/LICENSE +23 -0
  1570. package/test/node_modules/mime-db/README.md +100 -0
  1571. package/test/node_modules/mime-db/db.json +8519 -0
  1572. package/test/node_modules/mime-db/index.js +12 -0
  1573. package/test/node_modules/mime-db/package.json +60 -0
  1574. package/test/node_modules/mime-types/HISTORY.md +397 -0
  1575. package/test/node_modules/mime-types/LICENSE +23 -0
  1576. package/test/node_modules/mime-types/README.md +113 -0
  1577. package/test/node_modules/mime-types/index.js +188 -0
  1578. package/test/node_modules/mime-types/package.json +44 -0
  1579. package/test/node_modules/minimatch/LICENSE +15 -0
  1580. package/test/node_modules/minimatch/README.md +259 -0
  1581. package/test/node_modules/minimatch/lib/path.js +4 -0
  1582. package/test/node_modules/minimatch/minimatch.js +944 -0
  1583. package/test/node_modules/minimatch/package.json +35 -0
  1584. package/test/node_modules/minipass/LICENSE +15 -0
  1585. package/test/node_modules/minipass/README.md +825 -0
  1586. package/test/node_modules/minipass/dist/commonjs/index.d.ts +549 -0
  1587. package/test/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
  1588. package/test/node_modules/minipass/dist/commonjs/index.js +1028 -0
  1589. package/test/node_modules/minipass/dist/commonjs/index.js.map +1 -0
  1590. package/test/node_modules/minipass/dist/commonjs/package.json +3 -0
  1591. package/test/node_modules/minipass/dist/esm/index.d.ts +549 -0
  1592. package/test/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
  1593. package/test/node_modules/minipass/dist/esm/index.js +1018 -0
  1594. package/test/node_modules/minipass/dist/esm/index.js.map +1 -0
  1595. package/test/node_modules/minipass/dist/esm/package.json +3 -0
  1596. package/test/node_modules/minipass/package.json +82 -0
  1597. package/test/node_modules/mocha/LICENSE +22 -0
  1598. package/test/node_modules/mocha/README.md +74 -0
  1599. package/test/node_modules/mocha/bin/_mocha +10 -0
  1600. package/test/node_modules/mocha/bin/mocha.js +142 -0
  1601. package/test/node_modules/mocha/browser-entry.js +226 -0
  1602. package/test/node_modules/mocha/index.js +3 -0
  1603. package/test/node_modules/mocha/lib/browser/highlight-tags.js +39 -0
  1604. package/test/node_modules/mocha/lib/browser/parse-query.js +24 -0
  1605. package/test/node_modules/mocha/lib/browser/template.html +20 -0
  1606. package/test/node_modules/mocha/lib/cli/cli.js +93 -0
  1607. package/test/node_modules/mocha/lib/cli/collect-files.js +137 -0
  1608. package/test/node_modules/mocha/lib/cli/commands.js +14 -0
  1609. package/test/node_modules/mocha/lib/cli/config.js +100 -0
  1610. package/test/node_modules/mocha/lib/cli/index.js +3 -0
  1611. package/test/node_modules/mocha/lib/cli/init.js +36 -0
  1612. package/test/node_modules/mocha/lib/cli/lookup-files.js +155 -0
  1613. package/test/node_modules/mocha/lib/cli/node-flags.js +85 -0
  1614. package/test/node_modules/mocha/lib/cli/one-and-dones.js +69 -0
  1615. package/test/node_modules/mocha/lib/cli/options.js +337 -0
  1616. package/test/node_modules/mocha/lib/cli/run-helpers.js +304 -0
  1617. package/test/node_modules/mocha/lib/cli/run-option-metadata.js +137 -0
  1618. package/test/node_modules/mocha/lib/cli/run.js +380 -0
  1619. package/test/node_modules/mocha/lib/cli/watch-run.js +377 -0
  1620. package/test/node_modules/mocha/lib/context.js +86 -0
  1621. package/test/node_modules/mocha/lib/errors.js +563 -0
  1622. package/test/node_modules/mocha/lib/hook.js +89 -0
  1623. package/test/node_modules/mocha/lib/interfaces/bdd.js +114 -0
  1624. package/test/node_modules/mocha/lib/interfaces/common.js +193 -0
  1625. package/test/node_modules/mocha/lib/interfaces/exports.js +60 -0
  1626. package/test/node_modules/mocha/lib/interfaces/index.js +6 -0
  1627. package/test/node_modules/mocha/lib/interfaces/qunit.js +98 -0
  1628. package/test/node_modules/mocha/lib/interfaces/tdd.js +106 -0
  1629. package/test/node_modules/mocha/lib/mocha.js +1334 -0
  1630. package/test/node_modules/mocha/lib/mocharc.json +10 -0
  1631. package/test/node_modules/mocha/lib/nodejs/buffered-worker-pool.js +188 -0
  1632. package/test/node_modules/mocha/lib/nodejs/esm-utils.js +106 -0
  1633. package/test/node_modules/mocha/lib/nodejs/file-unloader.js +15 -0
  1634. package/test/node_modules/mocha/lib/nodejs/parallel-buffered-runner.js +433 -0
  1635. package/test/node_modules/mocha/lib/nodejs/reporters/parallel-buffered.js +165 -0
  1636. package/test/node_modules/mocha/lib/nodejs/serializer.js +414 -0
  1637. package/test/node_modules/mocha/lib/nodejs/worker.js +151 -0
  1638. package/test/node_modules/mocha/lib/pending.js +16 -0
  1639. package/test/node_modules/mocha/lib/plugin-loader.js +286 -0
  1640. package/test/node_modules/mocha/lib/reporters/base.js +591 -0
  1641. package/test/node_modules/mocha/lib/reporters/doc.js +95 -0
  1642. package/test/node_modules/mocha/lib/reporters/dot.js +81 -0
  1643. package/test/node_modules/mocha/lib/reporters/html.js +420 -0
  1644. package/test/node_modules/mocha/lib/reporters/index.js +19 -0
  1645. package/test/node_modules/mocha/lib/reporters/json-stream.js +92 -0
  1646. package/test/node_modules/mocha/lib/reporters/json.js +162 -0
  1647. package/test/node_modules/mocha/lib/reporters/landing.js +116 -0
  1648. package/test/node_modules/mocha/lib/reporters/list.js +78 -0
  1649. package/test/node_modules/mocha/lib/reporters/markdown.js +112 -0
  1650. package/test/node_modules/mocha/lib/reporters/min.js +52 -0
  1651. package/test/node_modules/mocha/lib/reporters/nyan.js +267 -0
  1652. package/test/node_modules/mocha/lib/reporters/progress.js +104 -0
  1653. package/test/node_modules/mocha/lib/reporters/spec.js +99 -0
  1654. package/test/node_modules/mocha/lib/reporters/tap.js +293 -0
  1655. package/test/node_modules/mocha/lib/reporters/xunit.js +218 -0
  1656. package/test/node_modules/mocha/lib/runnable.js +474 -0
  1657. package/test/node_modules/mocha/lib/runner.js +1267 -0
  1658. package/test/node_modules/mocha/lib/stats-collector.js +83 -0
  1659. package/test/node_modules/mocha/lib/suite.js +666 -0
  1660. package/test/node_modules/mocha/lib/test.js +113 -0
  1661. package/test/node_modules/mocha/lib/utils.js +698 -0
  1662. package/test/node_modules/mocha/mocha.css +455 -0
  1663. package/test/node_modules/mocha/mocha.js +20785 -0
  1664. package/test/node_modules/mocha/mocha.js.map +1 -0
  1665. package/test/node_modules/mocha/package.json +207 -0
  1666. package/test/node_modules/ms/index.js +162 -0
  1667. package/test/node_modules/ms/license.md +21 -0
  1668. package/test/node_modules/ms/package.json +38 -0
  1669. package/test/node_modules/ms/readme.md +59 -0
  1670. package/test/node_modules/node-domexception/.history/README_20210527203617.md +2 -0
  1671. package/test/node_modules/node-domexception/.history/README_20210527212714.md +41 -0
  1672. package/test/node_modules/node-domexception/.history/README_20210527213345.md +36 -0
  1673. package/test/node_modules/node-domexception/.history/README_20210527213411.md +36 -0
  1674. package/test/node_modules/node-domexception/.history/README_20210527213803.md +36 -0
  1675. package/test/node_modules/node-domexception/.history/README_20210527214323.md +38 -0
  1676. package/test/node_modules/node-domexception/.history/README_20210527214408.md +38 -0
  1677. package/test/node_modules/node-domexception/.history/index_20210527203842.js +0 -0
  1678. package/test/node_modules/node-domexception/.history/index_20210527203947.js +8 -0
  1679. package/test/node_modules/node-domexception/.history/index_20210527204259.js +9 -0
  1680. package/test/node_modules/node-domexception/.history/index_20210527204418.js +9 -0
  1681. package/test/node_modules/node-domexception/.history/index_20210527204756.js +11 -0
  1682. package/test/node_modules/node-domexception/.history/index_20210527204833.js +11 -0
  1683. package/test/node_modules/node-domexception/.history/index_20210527211208.js +15 -0
  1684. package/test/node_modules/node-domexception/.history/index_20210527211248.js +15 -0
  1685. package/test/node_modules/node-domexception/.history/index_20210527212722.js +23 -0
  1686. package/test/node_modules/node-domexception/.history/index_20210527212731.js +23 -0
  1687. package/test/node_modules/node-domexception/.history/index_20210527212746.js +15 -0
  1688. package/test/node_modules/node-domexception/.history/index_20210527212900.js +16 -0
  1689. package/test/node_modules/node-domexception/.history/index_20210527213022.js +16 -0
  1690. package/test/node_modules/node-domexception/.history/index_20210527213822.js +16 -0
  1691. package/test/node_modules/node-domexception/.history/index_20210527213843.js +17 -0
  1692. package/test/node_modules/node-domexception/.history/index_20210527213852.js +17 -0
  1693. package/test/node_modules/node-domexception/.history/index_20210527213910.js +16 -0
  1694. package/test/node_modules/node-domexception/.history/index_20210527214034.js +16 -0
  1695. package/test/node_modules/node-domexception/.history/index_20210527214643.js +41 -0
  1696. package/test/node_modules/node-domexception/.history/index_20210527214654.js +41 -0
  1697. package/test/node_modules/node-domexception/.history/index_20210527214700.js +16 -0
  1698. package/test/node_modules/node-domexception/.history/package_20210527203733.json +19 -0
  1699. package/test/node_modules/node-domexception/.history/package_20210527203825.json +16 -0
  1700. package/test/node_modules/node-domexception/.history/package_20210527204621.json +19 -0
  1701. package/test/node_modules/node-domexception/.history/package_20210527204913.json +25 -0
  1702. package/test/node_modules/node-domexception/.history/package_20210527204925.json +25 -0
  1703. package/test/node_modules/node-domexception/.history/package_20210527205145.json +29 -0
  1704. package/test/node_modules/node-domexception/.history/package_20210527205156.json +29 -0
  1705. package/test/node_modules/node-domexception/.history/test_20210527205603.js +0 -0
  1706. package/test/node_modules/node-domexception/.history/test_20210527205957.js +3 -0
  1707. package/test/node_modules/node-domexception/.history/test_20210527210021.js +3 -0
  1708. package/test/node_modules/node-domexception/LICENSE +21 -0
  1709. package/test/node_modules/node-domexception/README.md +46 -0
  1710. package/test/node_modules/node-domexception/index.js +16 -0
  1711. package/test/node_modules/node-domexception/package.json +29 -0
  1712. package/test/node_modules/node-fetch/@types/index.d.ts +219 -0
  1713. package/test/node_modules/node-fetch/LICENSE.md +22 -0
  1714. package/test/node_modules/node-fetch/README.md +872 -0
  1715. package/test/node_modules/node-fetch/package.json +131 -0
  1716. package/test/node_modules/node-fetch/src/body.js +397 -0
  1717. package/test/node_modules/node-fetch/src/errors/abort-error.js +10 -0
  1718. package/test/node_modules/node-fetch/src/errors/base.js +17 -0
  1719. package/test/node_modules/node-fetch/src/errors/fetch-error.js +26 -0
  1720. package/test/node_modules/node-fetch/src/headers.js +267 -0
  1721. package/test/node_modules/node-fetch/src/index.js +417 -0
  1722. package/test/node_modules/node-fetch/src/request.js +313 -0
  1723. package/test/node_modules/node-fetch/src/response.js +160 -0
  1724. package/test/node_modules/node-fetch/src/utils/get-search.js +9 -0
  1725. package/test/node_modules/node-fetch/src/utils/is-redirect.js +11 -0
  1726. package/test/node_modules/node-fetch/src/utils/is.js +87 -0
  1727. package/test/node_modules/node-fetch/src/utils/multipart-parser.js +432 -0
  1728. package/test/node_modules/node-fetch/src/utils/referrer.js +340 -0
  1729. package/test/node_modules/normalize-path/LICENSE +21 -0
  1730. package/test/node_modules/normalize-path/README.md +127 -0
  1731. package/test/node_modules/normalize-path/index.js +35 -0
  1732. package/test/node_modules/normalize-path/package.json +77 -0
  1733. package/test/node_modules/object-inspect/.eslintrc +53 -0
  1734. package/test/node_modules/object-inspect/.github/FUNDING.yml +12 -0
  1735. package/test/node_modules/object-inspect/.nycrc +13 -0
  1736. package/test/node_modules/object-inspect/CHANGELOG.md +424 -0
  1737. package/test/node_modules/object-inspect/LICENSE +21 -0
  1738. package/test/node_modules/object-inspect/example/all.js +23 -0
  1739. package/test/node_modules/object-inspect/example/circular.js +6 -0
  1740. package/test/node_modules/object-inspect/example/fn.js +5 -0
  1741. package/test/node_modules/object-inspect/example/inspect.js +10 -0
  1742. package/test/node_modules/object-inspect/index.js +544 -0
  1743. package/test/node_modules/object-inspect/package-support.json +20 -0
  1744. package/test/node_modules/object-inspect/package.json +105 -0
  1745. package/test/node_modules/object-inspect/readme.markdown +84 -0
  1746. package/test/node_modules/object-inspect/test/bigint.js +58 -0
  1747. package/test/node_modules/object-inspect/test/browser/dom.js +15 -0
  1748. package/test/node_modules/object-inspect/test/circular.js +16 -0
  1749. package/test/node_modules/object-inspect/test/deep.js +12 -0
  1750. package/test/node_modules/object-inspect/test/element.js +53 -0
  1751. package/test/node_modules/object-inspect/test/err.js +48 -0
  1752. package/test/node_modules/object-inspect/test/fakes.js +29 -0
  1753. package/test/node_modules/object-inspect/test/fn.js +76 -0
  1754. package/test/node_modules/object-inspect/test/global.js +17 -0
  1755. package/test/node_modules/object-inspect/test/has.js +15 -0
  1756. package/test/node_modules/object-inspect/test/holes.js +15 -0
  1757. package/test/node_modules/object-inspect/test/indent-option.js +271 -0
  1758. package/test/node_modules/object-inspect/test/inspect.js +139 -0
  1759. package/test/node_modules/object-inspect/test/lowbyte.js +12 -0
  1760. package/test/node_modules/object-inspect/test/number.js +58 -0
  1761. package/test/node_modules/object-inspect/test/quoteStyle.js +26 -0
  1762. package/test/node_modules/object-inspect/test/toStringTag.js +40 -0
  1763. package/test/node_modules/object-inspect/test/undef.js +12 -0
  1764. package/test/node_modules/object-inspect/test/values.js +261 -0
  1765. package/test/node_modules/object-inspect/test-core-js.js +26 -0
  1766. package/test/node_modules/object-inspect/util.inspect.js +1 -0
  1767. package/test/node_modules/once/LICENSE +15 -0
  1768. package/test/node_modules/once/README.md +79 -0
  1769. package/test/node_modules/once/once.js +42 -0
  1770. package/test/node_modules/once/package.json +33 -0
  1771. package/test/node_modules/p-limit/index.d.ts +42 -0
  1772. package/test/node_modules/p-limit/index.js +71 -0
  1773. package/test/node_modules/p-limit/license +9 -0
  1774. package/test/node_modules/p-limit/package.json +52 -0
  1775. package/test/node_modules/p-limit/readme.md +101 -0
  1776. package/test/node_modules/p-locate/index.d.ts +53 -0
  1777. package/test/node_modules/p-locate/index.js +50 -0
  1778. package/test/node_modules/p-locate/license +9 -0
  1779. package/test/node_modules/p-locate/package.json +54 -0
  1780. package/test/node_modules/p-locate/readme.md +93 -0
  1781. package/test/node_modules/package-json-from-dist/LICENSE.md +63 -0
  1782. package/test/node_modules/package-json-from-dist/README.md +110 -0
  1783. package/test/node_modules/package-json-from-dist/dist/commonjs/index.d.ts +89 -0
  1784. package/test/node_modules/package-json-from-dist/dist/commonjs/index.d.ts.map +1 -0
  1785. package/test/node_modules/package-json-from-dist/dist/commonjs/index.js +134 -0
  1786. package/test/node_modules/package-json-from-dist/dist/commonjs/index.js.map +1 -0
  1787. package/test/node_modules/package-json-from-dist/dist/commonjs/package.json +3 -0
  1788. package/test/node_modules/package-json-from-dist/dist/esm/index.d.ts +89 -0
  1789. package/test/node_modules/package-json-from-dist/dist/esm/index.d.ts.map +1 -0
  1790. package/test/node_modules/package-json-from-dist/dist/esm/index.js +129 -0
  1791. package/test/node_modules/package-json-from-dist/dist/esm/index.js.map +1 -0
  1792. package/test/node_modules/package-json-from-dist/dist/esm/package.json +3 -0
  1793. package/test/node_modules/package-json-from-dist/package.json +68 -0
  1794. package/test/node_modules/path-exists/index.d.ts +28 -0
  1795. package/test/node_modules/path-exists/index.js +23 -0
  1796. package/test/node_modules/path-exists/license +9 -0
  1797. package/test/node_modules/path-exists/package.json +39 -0
  1798. package/test/node_modules/path-exists/readme.md +52 -0
  1799. package/test/node_modules/path-key/index.d.ts +40 -0
  1800. package/test/node_modules/path-key/index.js +16 -0
  1801. package/test/node_modules/path-key/license +9 -0
  1802. package/test/node_modules/path-key/package.json +39 -0
  1803. package/test/node_modules/path-key/readme.md +61 -0
  1804. package/test/node_modules/path-scurry/LICENSE.md +55 -0
  1805. package/test/node_modules/path-scurry/README.md +636 -0
  1806. package/test/node_modules/path-scurry/dist/commonjs/index.d.ts +1116 -0
  1807. package/test/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -0
  1808. package/test/node_modules/path-scurry/dist/commonjs/index.js +2014 -0
  1809. package/test/node_modules/path-scurry/dist/commonjs/index.js.map +1 -0
  1810. package/test/node_modules/path-scurry/dist/commonjs/package.json +3 -0
  1811. package/test/node_modules/path-scurry/dist/esm/index.d.ts +1116 -0
  1812. package/test/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -0
  1813. package/test/node_modules/path-scurry/dist/esm/index.js +1979 -0
  1814. package/test/node_modules/path-scurry/dist/esm/index.js.map +1 -0
  1815. package/test/node_modules/path-scurry/dist/esm/package.json +3 -0
  1816. package/test/node_modules/path-scurry/package.json +89 -0
  1817. package/test/node_modules/pathval/LICENSE +16 -0
  1818. package/test/node_modules/pathval/README.md +147 -0
  1819. package/test/node_modules/pathval/index.js +292 -0
  1820. package/test/node_modules/pathval/package.json +73 -0
  1821. package/test/node_modules/pathval/pathval.js +1 -0
  1822. package/test/node_modules/picomatch/CHANGELOG.md +136 -0
  1823. package/test/node_modules/picomatch/LICENSE +21 -0
  1824. package/test/node_modules/picomatch/README.md +708 -0
  1825. package/test/node_modules/picomatch/index.js +3 -0
  1826. package/test/node_modules/picomatch/lib/constants.js +179 -0
  1827. package/test/node_modules/picomatch/lib/parse.js +1091 -0
  1828. package/test/node_modules/picomatch/lib/picomatch.js +342 -0
  1829. package/test/node_modules/picomatch/lib/scan.js +391 -0
  1830. package/test/node_modules/picomatch/lib/utils.js +64 -0
  1831. package/test/node_modules/picomatch/package.json +81 -0
  1832. package/test/node_modules/qs/.editorconfig +46 -0
  1833. package/test/node_modules/qs/.eslintrc +39 -0
  1834. package/test/node_modules/qs/.github/FUNDING.yml +12 -0
  1835. package/test/node_modules/qs/.nycrc +13 -0
  1836. package/test/node_modules/qs/CHANGELOG.md +622 -0
  1837. package/test/node_modules/qs/LICENSE.md +29 -0
  1838. package/test/node_modules/qs/README.md +733 -0
  1839. package/test/node_modules/qs/dist/qs.js +141 -0
  1840. package/test/node_modules/qs/lib/formats.js +23 -0
  1841. package/test/node_modules/qs/lib/index.js +11 -0
  1842. package/test/node_modules/qs/lib/parse.js +328 -0
  1843. package/test/node_modules/qs/lib/stringify.js +356 -0
  1844. package/test/node_modules/qs/lib/utils.js +268 -0
  1845. package/test/node_modules/qs/package.json +93 -0
  1846. package/test/node_modules/qs/test/empty-keys-cases.js +267 -0
  1847. package/test/node_modules/qs/test/parse.js +1276 -0
  1848. package/test/node_modules/qs/test/stringify.js +1306 -0
  1849. package/test/node_modules/qs/test/utils.js +262 -0
  1850. package/test/node_modules/randombytes/.travis.yml +15 -0
  1851. package/test/node_modules/randombytes/.zuul.yml +1 -0
  1852. package/test/node_modules/randombytes/LICENSE +21 -0
  1853. package/test/node_modules/randombytes/README.md +14 -0
  1854. package/test/node_modules/randombytes/browser.js +50 -0
  1855. package/test/node_modules/randombytes/index.js +1 -0
  1856. package/test/node_modules/randombytes/package.json +36 -0
  1857. package/test/node_modules/randombytes/test.js +81 -0
  1858. package/test/node_modules/readdirp/LICENSE +21 -0
  1859. package/test/node_modules/readdirp/README.md +122 -0
  1860. package/test/node_modules/readdirp/index.d.ts +43 -0
  1861. package/test/node_modules/readdirp/index.js +287 -0
  1862. package/test/node_modules/readdirp/package.json +122 -0
  1863. package/test/node_modules/require-directory/.jshintrc +67 -0
  1864. package/test/node_modules/require-directory/.travis.yml +3 -0
  1865. package/test/node_modules/require-directory/LICENSE +22 -0
  1866. package/test/node_modules/require-directory/README.markdown +184 -0
  1867. package/test/node_modules/require-directory/index.js +86 -0
  1868. package/test/node_modules/require-directory/package.json +40 -0
  1869. package/test/node_modules/safe-buffer/LICENSE +21 -0
  1870. package/test/node_modules/safe-buffer/README.md +584 -0
  1871. package/test/node_modules/safe-buffer/index.d.ts +187 -0
  1872. package/test/node_modules/safe-buffer/index.js +65 -0
  1873. package/test/node_modules/safe-buffer/package.json +51 -0
  1874. package/test/node_modules/serialize-javascript/LICENSE +27 -0
  1875. package/test/node_modules/serialize-javascript/README.md +143 -0
  1876. package/test/node_modules/serialize-javascript/index.js +268 -0
  1877. package/test/node_modules/serialize-javascript/package.json +36 -0
  1878. package/test/node_modules/sessionless-node/README.md +44 -0
  1879. package/test/node_modules/sessionless-node/package.json +26 -0
  1880. package/test/node_modules/sessionless-node/sessionless.cjs +96 -0
  1881. package/test/node_modules/sessionless-node/sessionless.js +95 -0
  1882. package/test/node_modules/sessionless-node/test/sessionless.js +78 -0
  1883. package/test/node_modules/shebang-command/index.js +19 -0
  1884. package/test/node_modules/shebang-command/license +9 -0
  1885. package/test/node_modules/shebang-command/package.json +34 -0
  1886. package/test/node_modules/shebang-command/readme.md +34 -0
  1887. package/test/node_modules/shebang-regex/index.d.ts +22 -0
  1888. package/test/node_modules/shebang-regex/index.js +2 -0
  1889. package/test/node_modules/shebang-regex/license +9 -0
  1890. package/test/node_modules/shebang-regex/package.json +35 -0
  1891. package/test/node_modules/shebang-regex/readme.md +33 -0
  1892. package/test/node_modules/side-channel/.editorconfig +9 -0
  1893. package/test/node_modules/side-channel/.eslintrc +12 -0
  1894. package/test/node_modules/side-channel/.github/FUNDING.yml +12 -0
  1895. package/test/node_modules/side-channel/.nycrc +13 -0
  1896. package/test/node_modules/side-channel/CHANGELOG.md +110 -0
  1897. package/test/node_modules/side-channel/LICENSE +21 -0
  1898. package/test/node_modules/side-channel/README.md +61 -0
  1899. package/test/node_modules/side-channel/index.d.ts +14 -0
  1900. package/test/node_modules/side-channel/index.js +43 -0
  1901. package/test/node_modules/side-channel/package.json +85 -0
  1902. package/test/node_modules/side-channel/test/index.js +104 -0
  1903. package/test/node_modules/side-channel/tsconfig.json +9 -0
  1904. package/test/node_modules/side-channel-list/.editorconfig +9 -0
  1905. package/test/node_modules/side-channel-list/.eslintrc +11 -0
  1906. package/test/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
  1907. package/test/node_modules/side-channel-list/.nycrc +13 -0
  1908. package/test/node_modules/side-channel-list/CHANGELOG.md +15 -0
  1909. package/test/node_modules/side-channel-list/LICENSE +21 -0
  1910. package/test/node_modules/side-channel-list/README.md +62 -0
  1911. package/test/node_modules/side-channel-list/index.d.ts +13 -0
  1912. package/test/node_modules/side-channel-list/index.js +113 -0
  1913. package/test/node_modules/side-channel-list/list.d.ts +14 -0
  1914. package/test/node_modules/side-channel-list/package.json +77 -0
  1915. package/test/node_modules/side-channel-list/test/index.js +104 -0
  1916. package/test/node_modules/side-channel-list/tsconfig.json +9 -0
  1917. package/test/node_modules/side-channel-map/.editorconfig +9 -0
  1918. package/test/node_modules/side-channel-map/.eslintrc +11 -0
  1919. package/test/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
  1920. package/test/node_modules/side-channel-map/.nycrc +13 -0
  1921. package/test/node_modules/side-channel-map/CHANGELOG.md +22 -0
  1922. package/test/node_modules/side-channel-map/LICENSE +21 -0
  1923. package/test/node_modules/side-channel-map/README.md +62 -0
  1924. package/test/node_modules/side-channel-map/index.d.ts +15 -0
  1925. package/test/node_modules/side-channel-map/index.js +68 -0
  1926. package/test/node_modules/side-channel-map/package.json +80 -0
  1927. package/test/node_modules/side-channel-map/test/index.js +114 -0
  1928. package/test/node_modules/side-channel-map/tsconfig.json +9 -0
  1929. package/test/node_modules/side-channel-weakmap/.editorconfig +9 -0
  1930. package/test/node_modules/side-channel-weakmap/.eslintrc +12 -0
  1931. package/test/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
  1932. package/test/node_modules/side-channel-weakmap/.nycrc +13 -0
  1933. package/test/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
  1934. package/test/node_modules/side-channel-weakmap/LICENSE +21 -0
  1935. package/test/node_modules/side-channel-weakmap/README.md +62 -0
  1936. package/test/node_modules/side-channel-weakmap/index.d.ts +15 -0
  1937. package/test/node_modules/side-channel-weakmap/index.js +84 -0
  1938. package/test/node_modules/side-channel-weakmap/package.json +87 -0
  1939. package/test/node_modules/side-channel-weakmap/test/index.js +114 -0
  1940. package/test/node_modules/side-channel-weakmap/tsconfig.json +9 -0
  1941. package/test/node_modules/signal-exit/LICENSE.txt +16 -0
  1942. package/test/node_modules/signal-exit/README.md +74 -0
  1943. package/test/node_modules/signal-exit/dist/cjs/browser.d.ts +12 -0
  1944. package/test/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
  1945. package/test/node_modules/signal-exit/dist/cjs/browser.js +10 -0
  1946. package/test/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
  1947. package/test/node_modules/signal-exit/dist/cjs/index.d.ts +48 -0
  1948. package/test/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
  1949. package/test/node_modules/signal-exit/dist/cjs/index.js +279 -0
  1950. package/test/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
  1951. package/test/node_modules/signal-exit/dist/cjs/package.json +3 -0
  1952. package/test/node_modules/signal-exit/dist/cjs/signals.d.ts +29 -0
  1953. package/test/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
  1954. package/test/node_modules/signal-exit/dist/cjs/signals.js +42 -0
  1955. package/test/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
  1956. package/test/node_modules/signal-exit/dist/mjs/browser.d.ts +12 -0
  1957. package/test/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
  1958. package/test/node_modules/signal-exit/dist/mjs/browser.js +4 -0
  1959. package/test/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
  1960. package/test/node_modules/signal-exit/dist/mjs/index.d.ts +48 -0
  1961. package/test/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
  1962. package/test/node_modules/signal-exit/dist/mjs/index.js +275 -0
  1963. package/test/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
  1964. package/test/node_modules/signal-exit/dist/mjs/package.json +3 -0
  1965. package/test/node_modules/signal-exit/dist/mjs/signals.d.ts +29 -0
  1966. package/test/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
  1967. package/test/node_modules/signal-exit/dist/mjs/signals.js +39 -0
  1968. package/test/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
  1969. package/test/node_modules/signal-exit/package.json +106 -0
  1970. package/test/node_modules/string-width/index.d.ts +29 -0
  1971. package/test/node_modules/string-width/index.js +54 -0
  1972. package/test/node_modules/string-width/license +9 -0
  1973. package/test/node_modules/string-width/package.json +59 -0
  1974. package/test/node_modules/string-width/readme.md +67 -0
  1975. package/test/node_modules/string-width-cjs/index.d.ts +29 -0
  1976. package/test/node_modules/string-width-cjs/index.js +47 -0
  1977. package/test/node_modules/string-width-cjs/license +9 -0
  1978. package/test/node_modules/string-width-cjs/node_modules/ansi-regex/index.d.ts +37 -0
  1979. package/test/node_modules/string-width-cjs/node_modules/ansi-regex/index.js +10 -0
  1980. package/test/node_modules/string-width-cjs/node_modules/ansi-regex/license +9 -0
  1981. package/test/node_modules/string-width-cjs/node_modules/ansi-regex/package.json +55 -0
  1982. package/test/node_modules/string-width-cjs/node_modules/ansi-regex/readme.md +78 -0
  1983. package/test/node_modules/string-width-cjs/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  1984. package/test/node_modules/string-width-cjs/node_modules/emoji-regex/README.md +73 -0
  1985. package/test/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/index.js +6 -0
  1986. package/test/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/text.js +6 -0
  1987. package/test/node_modules/string-width-cjs/node_modules/emoji-regex/index.d.ts +23 -0
  1988. package/test/node_modules/string-width-cjs/node_modules/emoji-regex/index.js +6 -0
  1989. package/test/node_modules/string-width-cjs/node_modules/emoji-regex/package.json +50 -0
  1990. package/test/node_modules/string-width-cjs/node_modules/emoji-regex/text.js +6 -0
  1991. package/test/node_modules/string-width-cjs/node_modules/strip-ansi/index.d.ts +17 -0
  1992. package/test/node_modules/string-width-cjs/node_modules/strip-ansi/index.js +4 -0
  1993. package/test/node_modules/string-width-cjs/node_modules/strip-ansi/license +9 -0
  1994. package/test/node_modules/string-width-cjs/node_modules/strip-ansi/package.json +54 -0
  1995. package/test/node_modules/string-width-cjs/node_modules/strip-ansi/readme.md +46 -0
  1996. package/test/node_modules/string-width-cjs/package.json +56 -0
  1997. package/test/node_modules/string-width-cjs/readme.md +50 -0
  1998. package/test/node_modules/strip-ansi/index.d.ts +15 -0
  1999. package/test/node_modules/strip-ansi/index.js +14 -0
  2000. package/test/node_modules/strip-ansi/license +9 -0
  2001. package/test/node_modules/strip-ansi/package.json +57 -0
  2002. package/test/node_modules/strip-ansi/readme.md +41 -0
  2003. package/test/node_modules/strip-ansi-cjs/index.d.ts +17 -0
  2004. package/test/node_modules/strip-ansi-cjs/index.js +4 -0
  2005. package/test/node_modules/strip-ansi-cjs/license +9 -0
  2006. package/test/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.d.ts +37 -0
  2007. package/test/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js +10 -0
  2008. package/test/node_modules/strip-ansi-cjs/node_modules/ansi-regex/license +9 -0
  2009. package/test/node_modules/strip-ansi-cjs/node_modules/ansi-regex/package.json +55 -0
  2010. package/test/node_modules/strip-ansi-cjs/node_modules/ansi-regex/readme.md +78 -0
  2011. package/test/node_modules/strip-ansi-cjs/package.json +54 -0
  2012. package/test/node_modules/strip-ansi-cjs/readme.md +46 -0
  2013. package/test/node_modules/strip-json-comments/index.d.ts +36 -0
  2014. package/test/node_modules/strip-json-comments/index.js +77 -0
  2015. package/test/node_modules/strip-json-comments/license +9 -0
  2016. package/test/node_modules/strip-json-comments/package.json +47 -0
  2017. package/test/node_modules/strip-json-comments/readme.md +78 -0
  2018. package/test/node_modules/superagent/LICENSE +22 -0
  2019. package/test/node_modules/superagent/README.md +273 -0
  2020. package/test/node_modules/superagent/dist/superagent.js +3399 -0
  2021. package/test/node_modules/superagent/dist/superagent.min.js +1 -0
  2022. package/test/node_modules/superagent/lib/agent-base.js +28 -0
  2023. package/test/node_modules/superagent/lib/client.js +949 -0
  2024. package/test/node_modules/superagent/lib/node/agent.js +100 -0
  2025. package/test/node_modules/superagent/lib/node/decompress.js +20 -0
  2026. package/test/node_modules/superagent/lib/node/http2wrapper.js +158 -0
  2027. package/test/node_modules/superagent/lib/node/index.js +1318 -0
  2028. package/test/node_modules/superagent/lib/node/parsers/image.js +13 -0
  2029. package/test/node_modules/superagent/lib/node/parsers/index.js +11 -0
  2030. package/test/node_modules/superagent/lib/node/parsers/json.js +25 -0
  2031. package/test/node_modules/superagent/lib/node/parsers/text.js +11 -0
  2032. package/test/node_modules/superagent/lib/node/parsers/urlencoded.js +22 -0
  2033. package/test/node_modules/superagent/lib/node/response.js +143 -0
  2034. package/test/node_modules/superagent/lib/node/unzip.js +74 -0
  2035. package/test/node_modules/superagent/lib/request-base.js +720 -0
  2036. package/test/node_modules/superagent/lib/response-base.js +120 -0
  2037. package/test/node_modules/superagent/lib/utils.js +126 -0
  2038. package/test/node_modules/superagent/package.json +131 -0
  2039. package/test/node_modules/supports-color/browser.js +24 -0
  2040. package/test/node_modules/supports-color/index.js +152 -0
  2041. package/test/node_modules/supports-color/license +9 -0
  2042. package/test/node_modules/supports-color/package.json +58 -0
  2043. package/test/node_modules/supports-color/readme.md +77 -0
  2044. package/test/node_modules/to-regex-range/LICENSE +21 -0
  2045. package/test/node_modules/to-regex-range/README.md +305 -0
  2046. package/test/node_modules/to-regex-range/index.js +288 -0
  2047. package/test/node_modules/to-regex-range/package.json +88 -0
  2048. package/test/node_modules/uuid/CHANGELOG.md +274 -0
  2049. package/test/node_modules/uuid/CONTRIBUTING.md +18 -0
  2050. package/test/node_modules/uuid/LICENSE.md +9 -0
  2051. package/test/node_modules/uuid/README.md +466 -0
  2052. package/test/node_modules/uuid/dist/bin/uuid +2 -0
  2053. package/test/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
  2054. package/test/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
  2055. package/test/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
  2056. package/test/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
  2057. package/test/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
  2058. package/test/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
  2059. package/test/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
  2060. package/test/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
  2061. package/test/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
  2062. package/test/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
  2063. package/test/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
  2064. package/test/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
  2065. package/test/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
  2066. package/test/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
  2067. package/test/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
  2068. package/test/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
  2069. package/test/node_modules/uuid/dist/esm-browser/index.js +9 -0
  2070. package/test/node_modules/uuid/dist/esm-browser/md5.js +215 -0
  2071. package/test/node_modules/uuid/dist/esm-browser/native.js +4 -0
  2072. package/test/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  2073. package/test/node_modules/uuid/dist/esm-browser/parse.js +35 -0
  2074. package/test/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  2075. package/test/node_modules/uuid/dist/esm-browser/rng.js +18 -0
  2076. package/test/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
  2077. package/test/node_modules/uuid/dist/esm-browser/stringify.js +33 -0
  2078. package/test/node_modules/uuid/dist/esm-browser/v1.js +95 -0
  2079. package/test/node_modules/uuid/dist/esm-browser/v3.js +4 -0
  2080. package/test/node_modules/uuid/dist/esm-browser/v35.js +66 -0
  2081. package/test/node_modules/uuid/dist/esm-browser/v4.js +29 -0
  2082. package/test/node_modules/uuid/dist/esm-browser/v5.js +4 -0
  2083. package/test/node_modules/uuid/dist/esm-browser/validate.js +7 -0
  2084. package/test/node_modules/uuid/dist/esm-browser/version.js +11 -0
  2085. package/test/node_modules/uuid/dist/esm-node/index.js +9 -0
  2086. package/test/node_modules/uuid/dist/esm-node/md5.js +13 -0
  2087. package/test/node_modules/uuid/dist/esm-node/native.js +4 -0
  2088. package/test/node_modules/uuid/dist/esm-node/nil.js +1 -0
  2089. package/test/node_modules/uuid/dist/esm-node/parse.js +35 -0
  2090. package/test/node_modules/uuid/dist/esm-node/regex.js +1 -0
  2091. package/test/node_modules/uuid/dist/esm-node/rng.js +12 -0
  2092. package/test/node_modules/uuid/dist/esm-node/sha1.js +13 -0
  2093. package/test/node_modules/uuid/dist/esm-node/stringify.js +33 -0
  2094. package/test/node_modules/uuid/dist/esm-node/v1.js +95 -0
  2095. package/test/node_modules/uuid/dist/esm-node/v3.js +4 -0
  2096. package/test/node_modules/uuid/dist/esm-node/v35.js +66 -0
  2097. package/test/node_modules/uuid/dist/esm-node/v4.js +29 -0
  2098. package/test/node_modules/uuid/dist/esm-node/v5.js +4 -0
  2099. package/test/node_modules/uuid/dist/esm-node/validate.js +7 -0
  2100. package/test/node_modules/uuid/dist/esm-node/version.js +11 -0
  2101. package/test/node_modules/uuid/dist/index.js +79 -0
  2102. package/test/node_modules/uuid/dist/md5-browser.js +223 -0
  2103. package/test/node_modules/uuid/dist/md5.js +23 -0
  2104. package/test/node_modules/uuid/dist/native-browser.js +11 -0
  2105. package/test/node_modules/uuid/dist/native.js +15 -0
  2106. package/test/node_modules/uuid/dist/nil.js +8 -0
  2107. package/test/node_modules/uuid/dist/parse.js +45 -0
  2108. package/test/node_modules/uuid/dist/regex.js +8 -0
  2109. package/test/node_modules/uuid/dist/rng-browser.js +25 -0
  2110. package/test/node_modules/uuid/dist/rng.js +24 -0
  2111. package/test/node_modules/uuid/dist/sha1-browser.js +104 -0
  2112. package/test/node_modules/uuid/dist/sha1.js +23 -0
  2113. package/test/node_modules/uuid/dist/stringify.js +44 -0
  2114. package/test/node_modules/uuid/dist/uuid-bin.js +85 -0
  2115. package/test/node_modules/uuid/dist/v1.js +107 -0
  2116. package/test/node_modules/uuid/dist/v3.js +16 -0
  2117. package/test/node_modules/uuid/dist/v35.js +80 -0
  2118. package/test/node_modules/uuid/dist/v4.js +43 -0
  2119. package/test/node_modules/uuid/dist/v5.js +16 -0
  2120. package/test/node_modules/uuid/dist/validate.js +17 -0
  2121. package/test/node_modules/uuid/dist/version.js +21 -0
  2122. package/test/node_modules/uuid/package.json +135 -0
  2123. package/test/node_modules/uuid/wrapper.mjs +10 -0
  2124. package/test/node_modules/web-streams-polyfill/LICENSE +22 -0
  2125. package/test/node_modules/web-streams-polyfill/README.md +110 -0
  2126. package/test/node_modules/web-streams-polyfill/dist/polyfill.es2018.js +4765 -0
  2127. package/test/node_modules/web-streams-polyfill/dist/polyfill.es2018.js.map +1 -0
  2128. package/test/node_modules/web-streams-polyfill/dist/polyfill.es2018.min.js +9 -0
  2129. package/test/node_modules/web-streams-polyfill/dist/polyfill.es2018.min.js.map +1 -0
  2130. package/test/node_modules/web-streams-polyfill/dist/polyfill.es2018.mjs +4745 -0
  2131. package/test/node_modules/web-streams-polyfill/dist/polyfill.es2018.mjs.map +1 -0
  2132. package/test/node_modules/web-streams-polyfill/dist/polyfill.es6.js +4838 -0
  2133. package/test/node_modules/web-streams-polyfill/dist/polyfill.es6.js.map +1 -0
  2134. package/test/node_modules/web-streams-polyfill/dist/polyfill.es6.min.js +9 -0
  2135. package/test/node_modules/web-streams-polyfill/dist/polyfill.es6.min.js.map +1 -0
  2136. package/test/node_modules/web-streams-polyfill/dist/polyfill.es6.mjs +4818 -0
  2137. package/test/node_modules/web-streams-polyfill/dist/polyfill.es6.mjs.map +1 -0
  2138. package/test/node_modules/web-streams-polyfill/dist/polyfill.js +5011 -0
  2139. package/test/node_modules/web-streams-polyfill/dist/polyfill.js.map +1 -0
  2140. package/test/node_modules/web-streams-polyfill/dist/polyfill.min.js +9 -0
  2141. package/test/node_modules/web-streams-polyfill/dist/polyfill.min.js.map +1 -0
  2142. package/test/node_modules/web-streams-polyfill/dist/polyfill.mjs +4991 -0
  2143. package/test/node_modules/web-streams-polyfill/dist/polyfill.mjs.map +1 -0
  2144. package/test/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +4737 -0
  2145. package/test/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +1 -0
  2146. package/test/node_modules/web-streams-polyfill/dist/ponyfill.es2018.mjs +4717 -0
  2147. package/test/node_modules/web-streams-polyfill/dist/ponyfill.es2018.mjs.map +1 -0
  2148. package/test/node_modules/web-streams-polyfill/dist/ponyfill.es6.js +4810 -0
  2149. package/test/node_modules/web-streams-polyfill/dist/ponyfill.es6.js.map +1 -0
  2150. package/test/node_modules/web-streams-polyfill/dist/ponyfill.es6.mjs +4790 -0
  2151. package/test/node_modules/web-streams-polyfill/dist/ponyfill.es6.mjs.map +1 -0
  2152. package/test/node_modules/web-streams-polyfill/dist/ponyfill.js +4983 -0
  2153. package/test/node_modules/web-streams-polyfill/dist/ponyfill.js.map +1 -0
  2154. package/test/node_modules/web-streams-polyfill/dist/ponyfill.mjs +4963 -0
  2155. package/test/node_modules/web-streams-polyfill/dist/ponyfill.mjs.map +1 -0
  2156. package/test/node_modules/web-streams-polyfill/dist/types/polyfill.d.ts +24 -0
  2157. package/test/node_modules/web-streams-polyfill/dist/types/ponyfill.d.ts +780 -0
  2158. package/test/node_modules/web-streams-polyfill/dist/types/ts3.6/polyfill.d.ts +28 -0
  2159. package/test/node_modules/web-streams-polyfill/dist/types/ts3.6/ponyfill.d.ts +821 -0
  2160. package/test/node_modules/web-streams-polyfill/dist/types/tsdoc-metadata.json +11 -0
  2161. package/test/node_modules/web-streams-polyfill/es2018/package.json +14 -0
  2162. package/test/node_modules/web-streams-polyfill/es6/package.json +14 -0
  2163. package/test/node_modules/web-streams-polyfill/package.json +83 -0
  2164. package/test/node_modules/web-streams-polyfill/ponyfill/es2018/package.json +13 -0
  2165. package/test/node_modules/web-streams-polyfill/ponyfill/es6/package.json +13 -0
  2166. package/test/node_modules/web-streams-polyfill/ponyfill/package.json +13 -0
  2167. package/test/node_modules/which/CHANGELOG.md +166 -0
  2168. package/test/node_modules/which/LICENSE +15 -0
  2169. package/test/node_modules/which/README.md +54 -0
  2170. package/test/node_modules/which/bin/node-which +52 -0
  2171. package/test/node_modules/which/package.json +43 -0
  2172. package/test/node_modules/which/which.js +125 -0
  2173. package/test/node_modules/workerpool/HISTORY.md +330 -0
  2174. package/test/node_modules/workerpool/LICENSE +201 -0
  2175. package/test/node_modules/workerpool/README.md +529 -0
  2176. package/test/node_modules/workerpool/dist/worker.js +318 -0
  2177. package/test/node_modules/workerpool/dist/worker.js.map +1 -0
  2178. package/test/node_modules/workerpool/dist/workerpool.js +1645 -0
  2179. package/test/node_modules/workerpool/dist/workerpool.js.map +1 -0
  2180. package/test/node_modules/workerpool/dist/workerpool.min.js +3 -0
  2181. package/test/node_modules/workerpool/dist/workerpool.min.js.LICENSE.txt +24 -0
  2182. package/test/node_modules/workerpool/dist/workerpool.min.js.map +1 -0
  2183. package/test/node_modules/workerpool/package.json +51 -0
  2184. package/test/node_modules/workerpool/src/Pool.js +452 -0
  2185. package/test/node_modules/workerpool/src/Promise.js +279 -0
  2186. package/test/node_modules/workerpool/src/WorkerHandler.js +508 -0
  2187. package/test/node_modules/workerpool/src/debug-port-allocator.js +28 -0
  2188. package/test/node_modules/workerpool/src/environment.js +36 -0
  2189. package/test/node_modules/workerpool/src/generated/embeddedWorker.js +6 -0
  2190. package/test/node_modules/workerpool/src/header.js +24 -0
  2191. package/test/node_modules/workerpool/src/index.js +48 -0
  2192. package/test/node_modules/workerpool/src/requireFoolWebpack.js +8 -0
  2193. package/test/node_modules/workerpool/src/transfer.js +12 -0
  2194. package/test/node_modules/workerpool/src/types.js +31 -0
  2195. package/test/node_modules/workerpool/src/worker.js +263 -0
  2196. package/test/node_modules/wrap-ansi/index.d.ts +41 -0
  2197. package/test/node_modules/wrap-ansi/index.js +214 -0
  2198. package/test/node_modules/wrap-ansi/license +9 -0
  2199. package/test/node_modules/wrap-ansi/node_modules/ansi-styles/index.d.ts +236 -0
  2200. package/test/node_modules/wrap-ansi/node_modules/ansi-styles/index.js +223 -0
  2201. package/test/node_modules/wrap-ansi/node_modules/ansi-styles/license +9 -0
  2202. package/test/node_modules/wrap-ansi/node_modules/ansi-styles/package.json +54 -0
  2203. package/test/node_modules/wrap-ansi/node_modules/ansi-styles/readme.md +173 -0
  2204. package/test/node_modules/wrap-ansi/package.json +69 -0
  2205. package/test/node_modules/wrap-ansi/readme.md +91 -0
  2206. package/test/node_modules/wrap-ansi-cjs/index.js +216 -0
  2207. package/test/node_modules/wrap-ansi-cjs/license +9 -0
  2208. package/test/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.d.ts +37 -0
  2209. package/test/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js +10 -0
  2210. package/test/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/license +9 -0
  2211. package/test/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/package.json +55 -0
  2212. package/test/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/readme.md +78 -0
  2213. package/test/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  2214. package/test/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/README.md +73 -0
  2215. package/test/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/index.js +6 -0
  2216. package/test/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/text.js +6 -0
  2217. package/test/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.d.ts +23 -0
  2218. package/test/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.js +6 -0
  2219. package/test/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/package.json +50 -0
  2220. package/test/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/text.js +6 -0
  2221. package/test/node_modules/wrap-ansi-cjs/node_modules/string-width/index.d.ts +29 -0
  2222. package/test/node_modules/wrap-ansi-cjs/node_modules/string-width/index.js +47 -0
  2223. package/test/node_modules/wrap-ansi-cjs/node_modules/string-width/license +9 -0
  2224. package/test/node_modules/wrap-ansi-cjs/node_modules/string-width/package.json +56 -0
  2225. package/test/node_modules/wrap-ansi-cjs/node_modules/string-width/readme.md +50 -0
  2226. package/test/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.d.ts +17 -0
  2227. package/test/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js +4 -0
  2228. package/test/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/license +9 -0
  2229. package/test/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/package.json +54 -0
  2230. package/test/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/readme.md +46 -0
  2231. package/test/node_modules/wrap-ansi-cjs/package.json +62 -0
  2232. package/test/node_modules/wrap-ansi-cjs/readme.md +91 -0
  2233. package/test/node_modules/wrappy/LICENSE +15 -0
  2234. package/test/node_modules/wrappy/README.md +36 -0
  2235. package/test/node_modules/wrappy/package.json +29 -0
  2236. package/test/node_modules/wrappy/wrappy.js +33 -0
  2237. package/test/node_modules/y18n/CHANGELOG.md +100 -0
  2238. package/test/node_modules/y18n/LICENSE +13 -0
  2239. package/test/node_modules/y18n/README.md +127 -0
  2240. package/test/node_modules/y18n/build/index.cjs +203 -0
  2241. package/test/node_modules/y18n/build/lib/cjs.js +6 -0
  2242. package/test/node_modules/y18n/build/lib/index.js +174 -0
  2243. package/test/node_modules/y18n/build/lib/platform-shims/node.js +19 -0
  2244. package/test/node_modules/y18n/index.mjs +8 -0
  2245. package/test/node_modules/y18n/package.json +70 -0
  2246. package/test/node_modules/yargs/LICENSE +21 -0
  2247. package/test/node_modules/yargs/README.md +204 -0
  2248. package/test/node_modules/yargs/browser.d.ts +5 -0
  2249. package/test/node_modules/yargs/browser.mjs +7 -0
  2250. package/test/node_modules/yargs/build/index.cjs +1 -0
  2251. package/test/node_modules/yargs/build/lib/argsert.js +62 -0
  2252. package/test/node_modules/yargs/build/lib/command.js +449 -0
  2253. package/test/node_modules/yargs/build/lib/completion-templates.js +48 -0
  2254. package/test/node_modules/yargs/build/lib/completion.js +243 -0
  2255. package/test/node_modules/yargs/build/lib/middleware.js +88 -0
  2256. package/test/node_modules/yargs/build/lib/parse-command.js +32 -0
  2257. package/test/node_modules/yargs/build/lib/typings/common-types.js +9 -0
  2258. package/test/node_modules/yargs/build/lib/typings/yargs-parser-types.js +1 -0
  2259. package/test/node_modules/yargs/build/lib/usage.js +584 -0
  2260. package/test/node_modules/yargs/build/lib/utils/apply-extends.js +59 -0
  2261. package/test/node_modules/yargs/build/lib/utils/is-promise.js +5 -0
  2262. package/test/node_modules/yargs/build/lib/utils/levenshtein.js +34 -0
  2263. package/test/node_modules/yargs/build/lib/utils/maybe-async-result.js +17 -0
  2264. package/test/node_modules/yargs/build/lib/utils/obj-filter.js +10 -0
  2265. package/test/node_modules/yargs/build/lib/utils/process-argv.js +17 -0
  2266. package/test/node_modules/yargs/build/lib/utils/set-blocking.js +12 -0
  2267. package/test/node_modules/yargs/build/lib/utils/which-module.js +10 -0
  2268. package/test/node_modules/yargs/build/lib/validation.js +305 -0
  2269. package/test/node_modules/yargs/build/lib/yargs-factory.js +1512 -0
  2270. package/test/node_modules/yargs/build/lib/yerror.js +9 -0
  2271. package/test/node_modules/yargs/helpers/helpers.mjs +10 -0
  2272. package/test/node_modules/yargs/helpers/index.js +14 -0
  2273. package/test/node_modules/yargs/helpers/package.json +3 -0
  2274. package/test/node_modules/yargs/index.cjs +53 -0
  2275. package/test/node_modules/yargs/index.mjs +8 -0
  2276. package/test/node_modules/yargs/lib/platform-shims/browser.mjs +95 -0
  2277. package/test/node_modules/yargs/lib/platform-shims/esm.mjs +73 -0
  2278. package/test/node_modules/yargs/locales/be.json +46 -0
  2279. package/test/node_modules/yargs/locales/cs.json +51 -0
  2280. package/test/node_modules/yargs/locales/de.json +46 -0
  2281. package/test/node_modules/yargs/locales/en.json +55 -0
  2282. package/test/node_modules/yargs/locales/es.json +46 -0
  2283. package/test/node_modules/yargs/locales/fi.json +49 -0
  2284. package/test/node_modules/yargs/locales/fr.json +53 -0
  2285. package/test/node_modules/yargs/locales/hi.json +49 -0
  2286. package/test/node_modules/yargs/locales/hu.json +46 -0
  2287. package/test/node_modules/yargs/locales/id.json +50 -0
  2288. package/test/node_modules/yargs/locales/it.json +46 -0
  2289. package/test/node_modules/yargs/locales/ja.json +51 -0
  2290. package/test/node_modules/yargs/locales/ko.json +49 -0
  2291. package/test/node_modules/yargs/locales/nb.json +44 -0
  2292. package/test/node_modules/yargs/locales/nl.json +49 -0
  2293. package/test/node_modules/yargs/locales/nn.json +44 -0
  2294. package/test/node_modules/yargs/locales/pirate.json +13 -0
  2295. package/test/node_modules/yargs/locales/pl.json +49 -0
  2296. package/test/node_modules/yargs/locales/pt.json +45 -0
  2297. package/test/node_modules/yargs/locales/pt_BR.json +48 -0
  2298. package/test/node_modules/yargs/locales/ru.json +51 -0
  2299. package/test/node_modules/yargs/locales/th.json +46 -0
  2300. package/test/node_modules/yargs/locales/tr.json +48 -0
  2301. package/test/node_modules/yargs/locales/uk_UA.json +51 -0
  2302. package/test/node_modules/yargs/locales/uz.json +52 -0
  2303. package/test/node_modules/yargs/locales/zh_CN.json +48 -0
  2304. package/test/node_modules/yargs/locales/zh_TW.json +51 -0
  2305. package/test/node_modules/yargs/node_modules/ansi-regex/index.d.ts +37 -0
  2306. package/test/node_modules/yargs/node_modules/ansi-regex/index.js +10 -0
  2307. package/test/node_modules/yargs/node_modules/ansi-regex/license +9 -0
  2308. package/test/node_modules/yargs/node_modules/ansi-regex/package.json +55 -0
  2309. package/test/node_modules/yargs/node_modules/ansi-regex/readme.md +78 -0
  2310. package/test/node_modules/yargs/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  2311. package/test/node_modules/yargs/node_modules/emoji-regex/README.md +73 -0
  2312. package/test/node_modules/yargs/node_modules/emoji-regex/es2015/index.js +6 -0
  2313. package/test/node_modules/yargs/node_modules/emoji-regex/es2015/text.js +6 -0
  2314. package/test/node_modules/yargs/node_modules/emoji-regex/index.d.ts +23 -0
  2315. package/test/node_modules/yargs/node_modules/emoji-regex/index.js +6 -0
  2316. package/test/node_modules/yargs/node_modules/emoji-regex/package.json +50 -0
  2317. package/test/node_modules/yargs/node_modules/emoji-regex/text.js +6 -0
  2318. package/test/node_modules/yargs/node_modules/string-width/index.d.ts +29 -0
  2319. package/test/node_modules/yargs/node_modules/string-width/index.js +47 -0
  2320. package/test/node_modules/yargs/node_modules/string-width/license +9 -0
  2321. package/test/node_modules/yargs/node_modules/string-width/package.json +56 -0
  2322. package/test/node_modules/yargs/node_modules/string-width/readme.md +50 -0
  2323. package/test/node_modules/yargs/node_modules/strip-ansi/index.d.ts +17 -0
  2324. package/test/node_modules/yargs/node_modules/strip-ansi/index.js +4 -0
  2325. package/test/node_modules/yargs/node_modules/strip-ansi/license +9 -0
  2326. package/test/node_modules/yargs/node_modules/strip-ansi/package.json +54 -0
  2327. package/test/node_modules/yargs/node_modules/strip-ansi/readme.md +46 -0
  2328. package/test/node_modules/yargs/package.json +123 -0
  2329. package/test/node_modules/yargs/yargs +9 -0
  2330. package/test/node_modules/yargs/yargs.mjs +10 -0
  2331. package/test/node_modules/yargs-parser/CHANGELOG.md +308 -0
  2332. package/test/node_modules/yargs-parser/LICENSE.txt +14 -0
  2333. package/test/node_modules/yargs-parser/README.md +518 -0
  2334. package/test/node_modules/yargs-parser/browser.js +29 -0
  2335. package/test/node_modules/yargs-parser/build/index.cjs +1050 -0
  2336. package/test/node_modules/yargs-parser/build/lib/index.js +62 -0
  2337. package/test/node_modules/yargs-parser/build/lib/string-utils.js +65 -0
  2338. package/test/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +40 -0
  2339. package/test/node_modules/yargs-parser/build/lib/yargs-parser-types.js +12 -0
  2340. package/test/node_modules/yargs-parser/build/lib/yargs-parser.js +1045 -0
  2341. package/test/node_modules/yargs-parser/package.json +92 -0
  2342. package/test/node_modules/yargs-unparser/CHANGELOG.md +82 -0
  2343. package/test/node_modules/yargs-unparser/LICENSE +21 -0
  2344. package/test/node_modules/yargs-unparser/README.md +86 -0
  2345. package/test/node_modules/yargs-unparser/index.js +166 -0
  2346. package/test/node_modules/yargs-unparser/package.json +49 -0
  2347. package/test/node_modules/yocto-queue/index.d.ts +56 -0
  2348. package/test/node_modules/yocto-queue/index.js +68 -0
  2349. package/test/node_modules/yocto-queue/license +9 -0
  2350. package/test/node_modules/yocto-queue/package.json +43 -0
  2351. package/test/node_modules/yocto-queue/readme.md +64 -0
  2352. package/test/package-lock.json +1997 -0
  2353. package/test/package.json +20 -0
  2354. package/test/test.js +87 -0
@@ -0,0 +1,4157 @@
1
+ /*!
2
+ * chai
3
+ * http://chaijs.com
4
+ * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
5
+ * MIT Licensed
6
+ */
7
+
8
+ import {Assertion} from '../assertion.js';
9
+ import {AssertionError} from 'assertion-error';
10
+ import * as _ from '../utils/index.js';
11
+ import {config} from '../config.js';
12
+
13
+ const {flag} = _;
14
+
15
+ /**
16
+ * ### Language Chains
17
+ *
18
+ * The following are provided as chainable getters to improve the readability
19
+ * of your assertions.
20
+ *
21
+ * **Chains**
22
+ *
23
+ * - to
24
+ * - be
25
+ * - been
26
+ * - is
27
+ * - that
28
+ * - which
29
+ * - and
30
+ * - has
31
+ * - have
32
+ * - with
33
+ * - at
34
+ * - of
35
+ * - same
36
+ * - but
37
+ * - does
38
+ * - still
39
+ * - also
40
+ *
41
+ * @name language chains
42
+ * @namespace BDD
43
+ * @public
44
+ */
45
+
46
+ [
47
+ 'to',
48
+ 'be',
49
+ 'been',
50
+ 'is',
51
+ 'and',
52
+ 'has',
53
+ 'have',
54
+ 'with',
55
+ 'that',
56
+ 'which',
57
+ 'at',
58
+ 'of',
59
+ 'same',
60
+ 'but',
61
+ 'does',
62
+ 'still',
63
+ 'also'
64
+ ].forEach(function (chain) {
65
+ Assertion.addProperty(chain);
66
+ });
67
+
68
+ /**
69
+ * ### .not
70
+ *
71
+ * Negates all assertions that follow in the chain.
72
+ *
73
+ * expect(function () {}).to.not.throw();
74
+ * expect({a: 1}).to.not.have.property('b');
75
+ * expect([1, 2]).to.be.an('array').that.does.not.include(3);
76
+ *
77
+ * Just because you can negate any assertion with `.not` doesn't mean you
78
+ * should. With great power comes great responsibility. It's often best to
79
+ * assert that the one expected output was produced, rather than asserting
80
+ * that one of countless unexpected outputs wasn't produced. See individual
81
+ * assertions for specific guidance.
82
+ *
83
+ * expect(2).to.equal(2); // Recommended
84
+ * expect(2).to.not.equal(1); // Not recommended
85
+ *
86
+ * @name not
87
+ * @namespace BDD
88
+ * @public
89
+ */
90
+
91
+ Assertion.addProperty('not', function () {
92
+ flag(this, 'negate', true);
93
+ });
94
+
95
+ /**
96
+ * ### .deep
97
+ *
98
+ * Causes all `.equal`, `.include`, `.members`, `.keys`, and `.property`
99
+ * assertions that follow in the chain to use deep equality instead of strict
100
+ * (`===`) equality. See the `deep-eql` project page for info on the deep
101
+ * equality algorithm: https://github.com/chaijs/deep-eql.
102
+ *
103
+ * // Target object deeply (but not strictly) equals `{a: 1}`
104
+ * expect({a: 1}).to.deep.equal({a: 1});
105
+ * expect({a: 1}).to.not.equal({a: 1});
106
+ *
107
+ * // Target array deeply (but not strictly) includes `{a: 1}`
108
+ * expect([{a: 1}]).to.deep.include({a: 1});
109
+ * expect([{a: 1}]).to.not.include({a: 1});
110
+ *
111
+ * // Target object deeply (but not strictly) includes `x: {a: 1}`
112
+ * expect({x: {a: 1}}).to.deep.include({x: {a: 1}});
113
+ * expect({x: {a: 1}}).to.not.include({x: {a: 1}});
114
+ *
115
+ * // Target array deeply (but not strictly) has member `{a: 1}`
116
+ * expect([{a: 1}]).to.have.deep.members([{a: 1}]);
117
+ * expect([{a: 1}]).to.not.have.members([{a: 1}]);
118
+ *
119
+ * // Target set deeply (but not strictly) has key `{a: 1}`
120
+ * expect(new Set([{a: 1}])).to.have.deep.keys([{a: 1}]);
121
+ * expect(new Set([{a: 1}])).to.not.have.keys([{a: 1}]);
122
+ *
123
+ * // Target object deeply (but not strictly) has property `x: {a: 1}`
124
+ * expect({x: {a: 1}}).to.have.deep.property('x', {a: 1});
125
+ * expect({x: {a: 1}}).to.not.have.property('x', {a: 1});
126
+ *
127
+ * @name deep
128
+ * @namespace BDD
129
+ * @public
130
+ */
131
+
132
+ Assertion.addProperty('deep', function () {
133
+ flag(this, 'deep', true);
134
+ });
135
+
136
+ /**
137
+ * ### .nested
138
+ *
139
+ * Enables dot- and bracket-notation in all `.property` and `.include`
140
+ * assertions that follow in the chain.
141
+ *
142
+ * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]');
143
+ * expect({a: {b: ['x', 'y']}}).to.nested.include({'a.b[1]': 'y'});
144
+ *
145
+ * If `.` or `[]` are part of an actual property name, they can be escaped by
146
+ * adding two backslashes before them.
147
+ *
148
+ * expect({'.a': {'[b]': 'x'}}).to.have.nested.property('\\.a.\\[b\\]');
149
+ * expect({'.a': {'[b]': 'x'}}).to.nested.include({'\\.a.\\[b\\]': 'x'});
150
+ *
151
+ * `.nested` cannot be combined with `.own`.
152
+ *
153
+ * @name nested
154
+ * @namespace BDD
155
+ * @public
156
+ */
157
+
158
+ Assertion.addProperty('nested', function () {
159
+ flag(this, 'nested', true);
160
+ });
161
+
162
+ /**
163
+ * ### .own
164
+ *
165
+ * Causes all `.property` and `.include` assertions that follow in the chain
166
+ * to ignore inherited properties.
167
+ *
168
+ * Object.prototype.b = 2;
169
+ *
170
+ * expect({a: 1}).to.have.own.property('a');
171
+ * expect({a: 1}).to.have.property('b');
172
+ * expect({a: 1}).to.not.have.own.property('b');
173
+ *
174
+ * expect({a: 1}).to.own.include({a: 1});
175
+ * expect({a: 1}).to.include({b: 2}).but.not.own.include({b: 2});
176
+ *
177
+ * `.own` cannot be combined with `.nested`.
178
+ *
179
+ * @name own
180
+ * @namespace BDD
181
+ * @public
182
+ */
183
+
184
+ Assertion.addProperty('own', function () {
185
+ flag(this, 'own', true);
186
+ });
187
+
188
+ /**
189
+ * ### .ordered
190
+ *
191
+ * Causes all `.members` assertions that follow in the chain to require that
192
+ * members be in the same order.
193
+ *
194
+ * expect([1, 2]).to.have.ordered.members([1, 2])
195
+ * .but.not.have.ordered.members([2, 1]);
196
+ *
197
+ * When `.include` and `.ordered` are combined, the ordering begins at the
198
+ * start of both arrays.
199
+ *
200
+ * expect([1, 2, 3]).to.include.ordered.members([1, 2])
201
+ * .but.not.include.ordered.members([2, 3]);
202
+ *
203
+ * @name ordered
204
+ * @namespace BDD
205
+ * @public
206
+ */
207
+
208
+ Assertion.addProperty('ordered', function () {
209
+ flag(this, 'ordered', true);
210
+ });
211
+
212
+ /**
213
+ * ### .any
214
+ *
215
+ * Causes all `.keys` assertions that follow in the chain to only require that
216
+ * the target have at least one of the given keys. This is the opposite of
217
+ * `.all`, which requires that the target have all of the given keys.
218
+ *
219
+ * expect({a: 1, b: 2}).to.not.have.any.keys('c', 'd');
220
+ *
221
+ * See the `.keys` doc for guidance on when to use `.any` or `.all`.
222
+ *
223
+ * @name any
224
+ * @namespace BDD
225
+ * @public
226
+ */
227
+
228
+ Assertion.addProperty('any', function () {
229
+ flag(this, 'any', true);
230
+ flag(this, 'all', false);
231
+ });
232
+
233
+ /**
234
+ * ### .all
235
+ *
236
+ * Causes all `.keys` assertions that follow in the chain to require that the
237
+ * target have all of the given keys. This is the opposite of `.any`, which
238
+ * only requires that the target have at least one of the given keys.
239
+ *
240
+ * expect({a: 1, b: 2}).to.have.all.keys('a', 'b');
241
+ *
242
+ * Note that `.all` is used by default when neither `.all` nor `.any` are
243
+ * added earlier in the chain. However, it's often best to add `.all` anyway
244
+ * because it improves readability.
245
+ *
246
+ * See the `.keys` doc for guidance on when to use `.any` or `.all`.
247
+ *
248
+ * @name all
249
+ * @namespace BDD
250
+ * @public
251
+ */
252
+ Assertion.addProperty('all', function () {
253
+ flag(this, 'all', true);
254
+ flag(this, 'any', false);
255
+ });
256
+
257
+ const functionTypes = {
258
+ function: [
259
+ 'function',
260
+ 'asyncfunction',
261
+ 'generatorfunction',
262
+ 'asyncgeneratorfunction'
263
+ ],
264
+ asyncfunction: ['asyncfunction', 'asyncgeneratorfunction'],
265
+ generatorfunction: ['generatorfunction', 'asyncgeneratorfunction'],
266
+ asyncgeneratorfunction: ['asyncgeneratorfunction']
267
+ };
268
+
269
+ /**
270
+ * ### .a(type[, msg])
271
+ *
272
+ * Asserts that the target's type is equal to the given string `type`. Types
273
+ * are case insensitive. See the utility file `./type-detect.js` for info on the
274
+ * type detection algorithm.
275
+ *
276
+ * expect('foo').to.be.a('string');
277
+ * expect({a: 1}).to.be.an('object');
278
+ * expect(null).to.be.a('null');
279
+ * expect(undefined).to.be.an('undefined');
280
+ * expect(new Error).to.be.an('error');
281
+ * expect(Promise.resolve()).to.be.a('promise');
282
+ * expect(new Float32Array).to.be.a('float32array');
283
+ * expect(Symbol()).to.be.a('symbol');
284
+ *
285
+ * `.a` supports objects that have a custom type set via `Symbol.toStringTag`.
286
+ *
287
+ * var myObj = {
288
+ * [Symbol.toStringTag]: 'myCustomType'
289
+ * };
290
+ *
291
+ * expect(myObj).to.be.a('myCustomType').but.not.an('object');
292
+ *
293
+ * It's often best to use `.a` to check a target's type before making more
294
+ * assertions on the same target. That way, you avoid unexpected behavior from
295
+ * any assertion that does different things based on the target's type.
296
+ *
297
+ * expect([1, 2, 3]).to.be.an('array').that.includes(2);
298
+ * expect([]).to.be.an('array').that.is.empty;
299
+ *
300
+ * Add `.not` earlier in the chain to negate `.a`. However, it's often best to
301
+ * assert that the target is the expected type, rather than asserting that it
302
+ * isn't one of many unexpected types.
303
+ *
304
+ * expect('foo').to.be.a('string'); // Recommended
305
+ * expect('foo').to.not.be.an('array'); // Not recommended
306
+ *
307
+ * `.a` accepts an optional `msg` argument which is a custom error message to
308
+ * show when the assertion fails. The message can also be given as the second
309
+ * argument to `expect`.
310
+ *
311
+ * expect(1).to.be.a('string', 'nooo why fail??');
312
+ * expect(1, 'nooo why fail??').to.be.a('string');
313
+ *
314
+ * `.a` can also be used as a language chain to improve the readability of
315
+ * your assertions.
316
+ *
317
+ * expect({b: 2}).to.have.a.property('b');
318
+ *
319
+ * The alias `.an` can be used interchangeably with `.a`.
320
+ *
321
+ * @name a
322
+ * @alias an
323
+ * @param {string} type
324
+ * @param {string} msg _optional_
325
+ * @namespace BDD
326
+ * @public
327
+ */
328
+ function an(type, msg) {
329
+ if (msg) flag(this, 'message', msg);
330
+ type = type.toLowerCase();
331
+ var obj = flag(this, 'object'),
332
+ article = ~['a', 'e', 'i', 'o', 'u'].indexOf(type.charAt(0)) ? 'an ' : 'a ';
333
+
334
+ const detectedType = _.type(obj).toLowerCase();
335
+
336
+ if (functionTypes['function'].includes(type)) {
337
+ this.assert(
338
+ functionTypes[type].includes(detectedType),
339
+ 'expected #{this} to be ' + article + type,
340
+ 'expected #{this} not to be ' + article + type
341
+ );
342
+ } else {
343
+ this.assert(
344
+ type === detectedType,
345
+ 'expected #{this} to be ' + article + type,
346
+ 'expected #{this} not to be ' + article + type
347
+ );
348
+ }
349
+ }
350
+
351
+ Assertion.addChainableMethod('an', an);
352
+ Assertion.addChainableMethod('a', an);
353
+
354
+ /**
355
+ *
356
+ * @param {unknown} a
357
+ * @param {unknown} b
358
+ * @returns {boolean}
359
+ */
360
+ function SameValueZero(a, b) {
361
+ return (_.isNaN(a) && _.isNaN(b)) || a === b;
362
+ }
363
+
364
+ /**
365
+ *
366
+ */
367
+ function includeChainingBehavior() {
368
+ flag(this, 'contains', true);
369
+ }
370
+
371
+ /**
372
+ * ### .include(val[, msg])
373
+ *
374
+ * When the target is a string, `.include` asserts that the given string `val`
375
+ * is a substring of the target.
376
+ *
377
+ * expect('foobar').to.include('foo');
378
+ *
379
+ * When the target is an array, `.include` asserts that the given `val` is a
380
+ * member of the target.
381
+ *
382
+ * expect([1, 2, 3]).to.include(2);
383
+ *
384
+ * When the target is an object, `.include` asserts that the given object
385
+ * `val`'s properties are a subset of the target's properties.
386
+ *
387
+ * expect({a: 1, b: 2, c: 3}).to.include({a: 1, b: 2});
388
+ *
389
+ * When the target is a Set or WeakSet, `.include` asserts that the given `val` is a
390
+ * member of the target. SameValueZero equality algorithm is used.
391
+ *
392
+ * expect(new Set([1, 2])).to.include(2);
393
+ *
394
+ * When the target is a Map, `.include` asserts that the given `val` is one of
395
+ * the values of the target. SameValueZero equality algorithm is used.
396
+ *
397
+ * expect(new Map([['a', 1], ['b', 2]])).to.include(2);
398
+ *
399
+ * Because `.include` does different things based on the target's type, it's
400
+ * important to check the target's type before using `.include`. See the `.a`
401
+ * doc for info on testing a target's type.
402
+ *
403
+ * expect([1, 2, 3]).to.be.an('array').that.includes(2);
404
+ *
405
+ * By default, strict (`===`) equality is used to compare array members and
406
+ * object properties. Add `.deep` earlier in the chain to use deep equality
407
+ * instead (WeakSet targets are not supported). See the `deep-eql` project
408
+ * page for info on the deep equality algorithm: https://github.com/chaijs/deep-eql.
409
+ *
410
+ * // Target array deeply (but not strictly) includes `{a: 1}`
411
+ * expect([{a: 1}]).to.deep.include({a: 1});
412
+ * expect([{a: 1}]).to.not.include({a: 1});
413
+ *
414
+ * // Target object deeply (but not strictly) includes `x: {a: 1}`
415
+ * expect({x: {a: 1}}).to.deep.include({x: {a: 1}});
416
+ * expect({x: {a: 1}}).to.not.include({x: {a: 1}});
417
+ *
418
+ * By default, all of the target's properties are searched when working with
419
+ * objects. This includes properties that are inherited and/or non-enumerable.
420
+ * Add `.own` earlier in the chain to exclude the target's inherited
421
+ * properties from the search.
422
+ *
423
+ * Object.prototype.b = 2;
424
+ *
425
+ * expect({a: 1}).to.own.include({a: 1});
426
+ * expect({a: 1}).to.include({b: 2}).but.not.own.include({b: 2});
427
+ *
428
+ * Note that a target object is always only searched for `val`'s own
429
+ * enumerable properties.
430
+ *
431
+ * `.deep` and `.own` can be combined.
432
+ *
433
+ * expect({a: {b: 2}}).to.deep.own.include({a: {b: 2}});
434
+ *
435
+ * Add `.nested` earlier in the chain to enable dot- and bracket-notation when
436
+ * referencing nested properties.
437
+ *
438
+ * expect({a: {b: ['x', 'y']}}).to.nested.include({'a.b[1]': 'y'});
439
+ *
440
+ * If `.` or `[]` are part of an actual property name, they can be escaped by
441
+ * adding two backslashes before them.
442
+ *
443
+ * expect({'.a': {'[b]': 2}}).to.nested.include({'\\.a.\\[b\\]': 2});
444
+ *
445
+ * `.deep` and `.nested` can be combined.
446
+ *
447
+ * expect({a: {b: [{c: 3}]}}).to.deep.nested.include({'a.b[0]': {c: 3}});
448
+ *
449
+ * `.own` and `.nested` cannot be combined.
450
+ *
451
+ * Add `.not` earlier in the chain to negate `.include`.
452
+ *
453
+ * expect('foobar').to.not.include('taco');
454
+ * expect([1, 2, 3]).to.not.include(4);
455
+ *
456
+ * However, it's dangerous to negate `.include` when the target is an object.
457
+ * The problem is that it creates uncertain expectations by asserting that the
458
+ * target object doesn't have all of `val`'s key/value pairs but may or may
459
+ * not have some of them. It's often best to identify the exact output that's
460
+ * expected, and then write an assertion that only accepts that exact output.
461
+ *
462
+ * When the target object isn't even expected to have `val`'s keys, it's
463
+ * often best to assert exactly that.
464
+ *
465
+ * expect({c: 3}).to.not.have.any.keys('a', 'b'); // Recommended
466
+ * expect({c: 3}).to.not.include({a: 1, b: 2}); // Not recommended
467
+ *
468
+ * When the target object is expected to have `val`'s keys, it's often best to
469
+ * assert that each of the properties has its expected value, rather than
470
+ * asserting that each property doesn't have one of many unexpected values.
471
+ *
472
+ * expect({a: 3, b: 4}).to.include({a: 3, b: 4}); // Recommended
473
+ * expect({a: 3, b: 4}).to.not.include({a: 1, b: 2}); // Not recommended
474
+ *
475
+ * `.include` accepts an optional `msg` argument which is a custom error
476
+ * message to show when the assertion fails. The message can also be given as
477
+ * the second argument to `expect`.
478
+ *
479
+ * expect([1, 2, 3]).to.include(4, 'nooo why fail??');
480
+ * expect([1, 2, 3], 'nooo why fail??').to.include(4);
481
+ *
482
+ * `.include` can also be used as a language chain, causing all `.members` and
483
+ * `.keys` assertions that follow in the chain to require the target to be a
484
+ * superset of the expected set, rather than an identical set. Note that
485
+ * `.members` ignores duplicates in the subset when `.include` is added.
486
+ *
487
+ * // Target object's keys are a superset of ['a', 'b'] but not identical
488
+ * expect({a: 1, b: 2, c: 3}).to.include.all.keys('a', 'b');
489
+ * expect({a: 1, b: 2, c: 3}).to.not.have.all.keys('a', 'b');
490
+ *
491
+ * // Target array is a superset of [1, 2] but not identical
492
+ * expect([1, 2, 3]).to.include.members([1, 2]);
493
+ * expect([1, 2, 3]).to.not.have.members([1, 2]);
494
+ *
495
+ * // Duplicates in the subset are ignored
496
+ * expect([1, 2, 3]).to.include.members([1, 2, 2, 2]);
497
+ *
498
+ * Note that adding `.any` earlier in the chain causes the `.keys` assertion
499
+ * to ignore `.include`.
500
+ *
501
+ * // Both assertions are identical
502
+ * expect({a: 1}).to.include.any.keys('a', 'b');
503
+ * expect({a: 1}).to.have.any.keys('a', 'b');
504
+ *
505
+ * The aliases `.includes`, `.contain`, and `.contains` can be used
506
+ * interchangeably with `.include`.
507
+ *
508
+ * @name include
509
+ * @alias contain
510
+ * @alias includes
511
+ * @alias contains
512
+ * @param {unknown} val
513
+ * @param {string} msg _optional_
514
+ * @namespace BDD
515
+ * @public
516
+ */
517
+ function include(val, msg) {
518
+ if (msg) flag(this, 'message', msg);
519
+
520
+ var obj = flag(this, 'object'),
521
+ objType = _.type(obj).toLowerCase(),
522
+ flagMsg = flag(this, 'message'),
523
+ negate = flag(this, 'negate'),
524
+ ssfi = flag(this, 'ssfi'),
525
+ isDeep = flag(this, 'deep'),
526
+ descriptor = isDeep ? 'deep ' : '',
527
+ isEql = isDeep ? flag(this, 'eql') : SameValueZero;
528
+
529
+ flagMsg = flagMsg ? flagMsg + ': ' : '';
530
+
531
+ var included = false;
532
+
533
+ switch (objType) {
534
+ case 'string':
535
+ included = obj.indexOf(val) !== -1;
536
+ break;
537
+
538
+ case 'weakset':
539
+ if (isDeep) {
540
+ throw new AssertionError(
541
+ flagMsg + 'unable to use .deep.include with WeakSet',
542
+ undefined,
543
+ ssfi
544
+ );
545
+ }
546
+
547
+ included = obj.has(val);
548
+ break;
549
+
550
+ case 'map':
551
+ obj.forEach(function (item) {
552
+ included = included || isEql(item, val);
553
+ });
554
+ break;
555
+
556
+ case 'set':
557
+ if (isDeep) {
558
+ obj.forEach(function (item) {
559
+ included = included || isEql(item, val);
560
+ });
561
+ } else {
562
+ included = obj.has(val);
563
+ }
564
+ break;
565
+
566
+ case 'array':
567
+ if (isDeep) {
568
+ included = obj.some(function (item) {
569
+ return isEql(item, val);
570
+ });
571
+ } else {
572
+ included = obj.indexOf(val) !== -1;
573
+ }
574
+ break;
575
+
576
+ default:
577
+ // This block is for asserting a subset of properties in an object.
578
+ // `_.expectTypes` isn't used here because `.include` should work with
579
+ // objects with a custom `@@toStringTag`.
580
+ if (val !== Object(val)) {
581
+ throw new AssertionError(
582
+ flagMsg +
583
+ 'the given combination of arguments (' +
584
+ objType +
585
+ ' and ' +
586
+ _.type(val).toLowerCase() +
587
+ ')' +
588
+ ' is invalid for this assertion. ' +
589
+ 'You can use an array, a map, an object, a set, a string, ' +
590
+ 'or a weakset instead of a ' +
591
+ _.type(val).toLowerCase(),
592
+ undefined,
593
+ ssfi
594
+ );
595
+ }
596
+
597
+ var props = Object.keys(val),
598
+ firstErr = null,
599
+ numErrs = 0;
600
+
601
+ props.forEach(function (prop) {
602
+ var propAssertion = new Assertion(obj);
603
+ _.transferFlags(this, propAssertion, true);
604
+ flag(propAssertion, 'lockSsfi', true);
605
+
606
+ if (!negate || props.length === 1) {
607
+ propAssertion.property(prop, val[prop]);
608
+ return;
609
+ }
610
+
611
+ try {
612
+ propAssertion.property(prop, val[prop]);
613
+ } catch (err) {
614
+ if (!_.checkError.compatibleConstructor(err, AssertionError)) {
615
+ throw err;
616
+ }
617
+ if (firstErr === null) firstErr = err;
618
+ numErrs++;
619
+ }
620
+ }, this);
621
+
622
+ // When validating .not.include with multiple properties, we only want
623
+ // to throw an assertion error if all of the properties are included,
624
+ // in which case we throw the first property assertion error that we
625
+ // encountered.
626
+ if (negate && props.length > 1 && numErrs === props.length) {
627
+ throw firstErr;
628
+ }
629
+ return;
630
+ }
631
+
632
+ // Assert inclusion in collection or substring in a string.
633
+ this.assert(
634
+ included,
635
+ 'expected #{this} to ' + descriptor + 'include ' + _.inspect(val),
636
+ 'expected #{this} to not ' + descriptor + 'include ' + _.inspect(val)
637
+ );
638
+ }
639
+
640
+ Assertion.addChainableMethod('include', include, includeChainingBehavior);
641
+ Assertion.addChainableMethod('contain', include, includeChainingBehavior);
642
+ Assertion.addChainableMethod('contains', include, includeChainingBehavior);
643
+ Assertion.addChainableMethod('includes', include, includeChainingBehavior);
644
+
645
+ /**
646
+ * ### .ok
647
+ *
648
+ * Asserts that the target is a truthy value (considered `true` in boolean context).
649
+ * However, it's often best to assert that the target is strictly (`===`) or
650
+ * deeply equal to its expected value.
651
+ *
652
+ * expect(1).to.equal(1); // Recommended
653
+ * expect(1).to.be.ok; // Not recommended
654
+ *
655
+ * expect(true).to.be.true; // Recommended
656
+ * expect(true).to.be.ok; // Not recommended
657
+ *
658
+ * Add `.not` earlier in the chain to negate `.ok`.
659
+ *
660
+ * expect(0).to.equal(0); // Recommended
661
+ * expect(0).to.not.be.ok; // Not recommended
662
+ *
663
+ * expect(false).to.be.false; // Recommended
664
+ * expect(false).to.not.be.ok; // Not recommended
665
+ *
666
+ * expect(null).to.be.null; // Recommended
667
+ * expect(null).to.not.be.ok; // Not recommended
668
+ *
669
+ * expect(undefined).to.be.undefined; // Recommended
670
+ * expect(undefined).to.not.be.ok; // Not recommended
671
+ *
672
+ * A custom error message can be given as the second argument to `expect`.
673
+ *
674
+ * expect(false, 'nooo why fail??').to.be.ok;
675
+ *
676
+ * @name ok
677
+ * @namespace BDD
678
+ * @public
679
+ */
680
+ Assertion.addProperty('ok', function () {
681
+ this.assert(
682
+ flag(this, 'object'),
683
+ 'expected #{this} to be truthy',
684
+ 'expected #{this} to be falsy'
685
+ );
686
+ });
687
+
688
+ /**
689
+ * ### .true
690
+ *
691
+ * Asserts that the target is strictly (`===`) equal to `true`.
692
+ *
693
+ * expect(true).to.be.true;
694
+ *
695
+ * Add `.not` earlier in the chain to negate `.true`. However, it's often best
696
+ * to assert that the target is equal to its expected value, rather than not
697
+ * equal to `true`.
698
+ *
699
+ * expect(false).to.be.false; // Recommended
700
+ * expect(false).to.not.be.true; // Not recommended
701
+ *
702
+ * expect(1).to.equal(1); // Recommended
703
+ * expect(1).to.not.be.true; // Not recommended
704
+ *
705
+ * A custom error message can be given as the second argument to `expect`.
706
+ *
707
+ * expect(false, 'nooo why fail??').to.be.true;
708
+ *
709
+ * @name true
710
+ * @namespace BDD
711
+ * @public
712
+ */
713
+ Assertion.addProperty('true', function () {
714
+ this.assert(
715
+ true === flag(this, 'object'),
716
+ 'expected #{this} to be true',
717
+ 'expected #{this} to be false',
718
+ flag(this, 'negate') ? false : true
719
+ );
720
+ });
721
+
722
+ Assertion.addProperty('numeric', function () {
723
+ const object = flag(this, 'object');
724
+
725
+ this.assert(
726
+ ['Number', 'BigInt'].includes(_.type(object)),
727
+ 'expected #{this} to be numeric',
728
+ 'expected #{this} to not be numeric',
729
+ flag(this, 'negate') ? false : true
730
+ );
731
+ });
732
+
733
+ /**
734
+ * ### .callable
735
+ *
736
+ * Asserts that the target a callable function.
737
+ *
738
+ * expect(console.log).to.be.callable;
739
+ *
740
+ * A custom error message can be given as the second argument to `expect`.
741
+ *
742
+ * expect('not a function', 'nooo why fail??').to.be.callable;
743
+ *
744
+ * @name callable
745
+ * @namespace BDD
746
+ * @public
747
+ */
748
+ Assertion.addProperty('callable', function () {
749
+ const val = flag(this, 'object');
750
+ const ssfi = flag(this, 'ssfi');
751
+ const message = flag(this, 'message');
752
+ const msg = message ? `${message}: ` : '';
753
+ const negate = flag(this, 'negate');
754
+
755
+ const assertionMessage = negate
756
+ ? `${msg}expected ${_.inspect(val)} not to be a callable function`
757
+ : `${msg}expected ${_.inspect(val)} to be a callable function`;
758
+
759
+ const isCallable = [
760
+ 'Function',
761
+ 'AsyncFunction',
762
+ 'GeneratorFunction',
763
+ 'AsyncGeneratorFunction'
764
+ ].includes(_.type(val));
765
+
766
+ if ((isCallable && negate) || (!isCallable && !negate)) {
767
+ throw new AssertionError(assertionMessage, undefined, ssfi);
768
+ }
769
+ });
770
+
771
+ /**
772
+ * ### .false
773
+ *
774
+ * Asserts that the target is strictly (`===`) equal to `false`.
775
+ *
776
+ * expect(false).to.be.false;
777
+ *
778
+ * Add `.not` earlier in the chain to negate `.false`. However, it's often
779
+ * best to assert that the target is equal to its expected value, rather than
780
+ * not equal to `false`.
781
+ *
782
+ * expect(true).to.be.true; // Recommended
783
+ * expect(true).to.not.be.false; // Not recommended
784
+ *
785
+ * expect(1).to.equal(1); // Recommended
786
+ * expect(1).to.not.be.false; // Not recommended
787
+ *
788
+ * A custom error message can be given as the second argument to `expect`.
789
+ *
790
+ * expect(true, 'nooo why fail??').to.be.false;
791
+ *
792
+ * @name false
793
+ * @namespace BDD
794
+ * @public
795
+ */
796
+ Assertion.addProperty('false', function () {
797
+ this.assert(
798
+ false === flag(this, 'object'),
799
+ 'expected #{this} to be false',
800
+ 'expected #{this} to be true',
801
+ flag(this, 'negate') ? true : false
802
+ );
803
+ });
804
+
805
+ /**
806
+ * ### .null
807
+ *
808
+ * Asserts that the target is strictly (`===`) equal to `null`.
809
+ *
810
+ * expect(null).to.be.null;
811
+ *
812
+ * Add `.not` earlier in the chain to negate `.null`. However, it's often best
813
+ * to assert that the target is equal to its expected value, rather than not
814
+ * equal to `null`.
815
+ *
816
+ * expect(1).to.equal(1); // Recommended
817
+ * expect(1).to.not.be.null; // Not recommended
818
+ *
819
+ * A custom error message can be given as the second argument to `expect`.
820
+ *
821
+ * expect(42, 'nooo why fail??').to.be.null;
822
+ *
823
+ * @name null
824
+ * @namespace BDD
825
+ * @public
826
+ */
827
+ Assertion.addProperty('null', function () {
828
+ this.assert(
829
+ null === flag(this, 'object'),
830
+ 'expected #{this} to be null',
831
+ 'expected #{this} not to be null'
832
+ );
833
+ });
834
+
835
+ /**
836
+ * ### .undefined
837
+ *
838
+ * Asserts that the target is strictly (`===`) equal to `undefined`.
839
+ *
840
+ * expect(undefined).to.be.undefined;
841
+ *
842
+ * Add `.not` earlier in the chain to negate `.undefined`. However, it's often
843
+ * best to assert that the target is equal to its expected value, rather than
844
+ * not equal to `undefined`.
845
+ *
846
+ * expect(1).to.equal(1); // Recommended
847
+ * expect(1).to.not.be.undefined; // Not recommended
848
+ *
849
+ * A custom error message can be given as the second argument to `expect`.
850
+ *
851
+ * expect(42, 'nooo why fail??').to.be.undefined;
852
+ *
853
+ * @name undefined
854
+ * @namespace BDD
855
+ * @public
856
+ */
857
+ Assertion.addProperty('undefined', function () {
858
+ this.assert(
859
+ undefined === flag(this, 'object'),
860
+ 'expected #{this} to be undefined',
861
+ 'expected #{this} not to be undefined'
862
+ );
863
+ });
864
+
865
+ /**
866
+ * ### .NaN
867
+ *
868
+ * Asserts that the target is exactly `NaN`.
869
+ *
870
+ * expect(NaN).to.be.NaN;
871
+ *
872
+ * Add `.not` earlier in the chain to negate `.NaN`. However, it's often best
873
+ * to assert that the target is equal to its expected value, rather than not
874
+ * equal to `NaN`.
875
+ *
876
+ * expect('foo').to.equal('foo'); // Recommended
877
+ * expect('foo').to.not.be.NaN; // Not recommended
878
+ *
879
+ * A custom error message can be given as the second argument to `expect`.
880
+ *
881
+ * expect(42, 'nooo why fail??').to.be.NaN;
882
+ *
883
+ * @name NaN
884
+ * @namespace BDD
885
+ * @public
886
+ */
887
+ Assertion.addProperty('NaN', function () {
888
+ this.assert(
889
+ _.isNaN(flag(this, 'object')),
890
+ 'expected #{this} to be NaN',
891
+ 'expected #{this} not to be NaN'
892
+ );
893
+ });
894
+
895
+ /**
896
+ * ### .exist
897
+ *
898
+ * Asserts that the target is not strictly (`===`) equal to either `null` or
899
+ * `undefined`. However, it's often best to assert that the target is equal to
900
+ * its expected value.
901
+ *
902
+ * expect(1).to.equal(1); // Recommended
903
+ * expect(1).to.exist; // Not recommended
904
+ *
905
+ * expect(0).to.equal(0); // Recommended
906
+ * expect(0).to.exist; // Not recommended
907
+ *
908
+ * Add `.not` earlier in the chain to negate `.exist`.
909
+ *
910
+ * expect(null).to.be.null; // Recommended
911
+ * expect(null).to.not.exist; // Not recommended
912
+ *
913
+ * expect(undefined).to.be.undefined; // Recommended
914
+ * expect(undefined).to.not.exist; // Not recommended
915
+ *
916
+ * A custom error message can be given as the second argument to `expect`.
917
+ *
918
+ * expect(null, 'nooo why fail??').to.exist;
919
+ *
920
+ * The alias `.exists` can be used interchangeably with `.exist`.
921
+ *
922
+ * @name exist
923
+ * @alias exists
924
+ * @namespace BDD
925
+ * @public
926
+ */
927
+ function assertExist() {
928
+ var val = flag(this, 'object');
929
+ this.assert(
930
+ val !== null && val !== undefined,
931
+ 'expected #{this} to exist',
932
+ 'expected #{this} to not exist'
933
+ );
934
+ }
935
+
936
+ Assertion.addProperty('exist', assertExist);
937
+ Assertion.addProperty('exists', assertExist);
938
+
939
+ /**
940
+ * ### .empty
941
+ *
942
+ * When the target is a string or array, `.empty` asserts that the target's
943
+ * `length` property is strictly (`===`) equal to `0`.
944
+ *
945
+ * expect([]).to.be.empty;
946
+ * expect('').to.be.empty;
947
+ *
948
+ * When the target is a map or set, `.empty` asserts that the target's `size`
949
+ * property is strictly equal to `0`.
950
+ *
951
+ * expect(new Set()).to.be.empty;
952
+ * expect(new Map()).to.be.empty;
953
+ *
954
+ * When the target is a non-function object, `.empty` asserts that the target
955
+ * doesn't have any own enumerable properties. Properties with Symbol-based
956
+ * keys are excluded from the count.
957
+ *
958
+ * expect({}).to.be.empty;
959
+ *
960
+ * Because `.empty` does different things based on the target's type, it's
961
+ * important to check the target's type before using `.empty`. See the `.a`
962
+ * doc for info on testing a target's type.
963
+ *
964
+ * expect([]).to.be.an('array').that.is.empty;
965
+ *
966
+ * Add `.not` earlier in the chain to negate `.empty`. However, it's often
967
+ * best to assert that the target contains its expected number of values,
968
+ * rather than asserting that it's not empty.
969
+ *
970
+ * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended
971
+ * expect([1, 2, 3]).to.not.be.empty; // Not recommended
972
+ *
973
+ * expect(new Set([1, 2, 3])).to.have.property('size', 3); // Recommended
974
+ * expect(new Set([1, 2, 3])).to.not.be.empty; // Not recommended
975
+ *
976
+ * expect(Object.keys({a: 1})).to.have.lengthOf(1); // Recommended
977
+ * expect({a: 1}).to.not.be.empty; // Not recommended
978
+ *
979
+ * A custom error message can be given as the second argument to `expect`.
980
+ *
981
+ * expect([1, 2, 3], 'nooo why fail??').to.be.empty;
982
+ *
983
+ * @name empty
984
+ * @namespace BDD
985
+ * @public
986
+ */
987
+ Assertion.addProperty('empty', function () {
988
+ var val = flag(this, 'object'),
989
+ ssfi = flag(this, 'ssfi'),
990
+ flagMsg = flag(this, 'message'),
991
+ itemsCount;
992
+
993
+ flagMsg = flagMsg ? flagMsg + ': ' : '';
994
+
995
+ switch (_.type(val).toLowerCase()) {
996
+ case 'array':
997
+ case 'string':
998
+ itemsCount = val.length;
999
+ break;
1000
+ case 'map':
1001
+ case 'set':
1002
+ itemsCount = val.size;
1003
+ break;
1004
+ case 'weakmap':
1005
+ case 'weakset':
1006
+ throw new AssertionError(
1007
+ flagMsg + '.empty was passed a weak collection',
1008
+ undefined,
1009
+ ssfi
1010
+ );
1011
+ case 'function':
1012
+ var msg = flagMsg + '.empty was passed a function ' + _.getName(val);
1013
+ throw new AssertionError(msg.trim(), undefined, ssfi);
1014
+ default:
1015
+ if (val !== Object(val)) {
1016
+ throw new AssertionError(
1017
+ flagMsg + '.empty was passed non-string primitive ' + _.inspect(val),
1018
+ undefined,
1019
+ ssfi
1020
+ );
1021
+ }
1022
+ itemsCount = Object.keys(val).length;
1023
+ }
1024
+
1025
+ this.assert(
1026
+ 0 === itemsCount,
1027
+ 'expected #{this} to be empty',
1028
+ 'expected #{this} not to be empty'
1029
+ );
1030
+ });
1031
+
1032
+ /**
1033
+ * ### .arguments
1034
+ *
1035
+ * Asserts that the target is an `arguments` object.
1036
+ *
1037
+ * function test () {
1038
+ * expect(arguments).to.be.arguments;
1039
+ * }
1040
+ *
1041
+ * test();
1042
+ *
1043
+ * Add `.not` earlier in the chain to negate `.arguments`. However, it's often
1044
+ * best to assert which type the target is expected to be, rather than
1045
+ * asserting that it’s not an `arguments` object.
1046
+ *
1047
+ * expect('foo').to.be.a('string'); // Recommended
1048
+ * expect('foo').to.not.be.arguments; // Not recommended
1049
+ *
1050
+ * A custom error message can be given as the second argument to `expect`.
1051
+ *
1052
+ * expect({}, 'nooo why fail??').to.be.arguments;
1053
+ *
1054
+ * The alias `.Arguments` can be used interchangeably with `.arguments`.
1055
+ *
1056
+ * @name arguments
1057
+ * @alias Arguments
1058
+ * @namespace BDD
1059
+ * @public
1060
+ */
1061
+ function checkArguments() {
1062
+ var obj = flag(this, 'object'),
1063
+ type = _.type(obj);
1064
+ this.assert(
1065
+ 'Arguments' === type,
1066
+ 'expected #{this} to be arguments but got ' + type,
1067
+ 'expected #{this} to not be arguments'
1068
+ );
1069
+ }
1070
+
1071
+ Assertion.addProperty('arguments', checkArguments);
1072
+ Assertion.addProperty('Arguments', checkArguments);
1073
+
1074
+ /**
1075
+ * ### .equal(val[, msg])
1076
+ *
1077
+ * Asserts that the target is strictly (`===`) equal to the given `val`.
1078
+ *
1079
+ * expect(1).to.equal(1);
1080
+ * expect('foo').to.equal('foo');
1081
+ *
1082
+ * Add `.deep` earlier in the chain to use deep equality instead. See the
1083
+ * `deep-eql` project page for info on the deep equality algorithm:
1084
+ * https://github.com/chaijs/deep-eql.
1085
+ *
1086
+ * // Target object deeply (but not strictly) equals `{a: 1}`
1087
+ * expect({a: 1}).to.deep.equal({a: 1});
1088
+ * expect({a: 1}).to.not.equal({a: 1});
1089
+ *
1090
+ * // Target array deeply (but not strictly) equals `[1, 2]`
1091
+ * expect([1, 2]).to.deep.equal([1, 2]);
1092
+ * expect([1, 2]).to.not.equal([1, 2]);
1093
+ *
1094
+ * Add `.not` earlier in the chain to negate `.equal`. However, it's often
1095
+ * best to assert that the target is equal to its expected value, rather than
1096
+ * not equal to one of countless unexpected values.
1097
+ *
1098
+ * expect(1).to.equal(1); // Recommended
1099
+ * expect(1).to.not.equal(2); // Not recommended
1100
+ *
1101
+ * `.equal` accepts an optional `msg` argument which is a custom error message
1102
+ * to show when the assertion fails. The message can also be given as the
1103
+ * second argument to `expect`.
1104
+ *
1105
+ * expect(1).to.equal(2, 'nooo why fail??');
1106
+ * expect(1, 'nooo why fail??').to.equal(2);
1107
+ *
1108
+ * The aliases `.equals` and `eq` can be used interchangeably with `.equal`.
1109
+ *
1110
+ * @name equal
1111
+ * @alias equals
1112
+ * @alias eq
1113
+ * @param {unknown} val
1114
+ * @param {string} msg _optional_
1115
+ * @namespace BDD
1116
+ * @public
1117
+ */
1118
+ function assertEqual(val, msg) {
1119
+ if (msg) flag(this, 'message', msg);
1120
+ var obj = flag(this, 'object');
1121
+ if (flag(this, 'deep')) {
1122
+ var prevLockSsfi = flag(this, 'lockSsfi');
1123
+ flag(this, 'lockSsfi', true);
1124
+ this.eql(val);
1125
+ flag(this, 'lockSsfi', prevLockSsfi);
1126
+ } else {
1127
+ this.assert(
1128
+ val === obj,
1129
+ 'expected #{this} to equal #{exp}',
1130
+ 'expected #{this} to not equal #{exp}',
1131
+ val,
1132
+ this._obj,
1133
+ true
1134
+ );
1135
+ }
1136
+ }
1137
+
1138
+ Assertion.addMethod('equal', assertEqual);
1139
+ Assertion.addMethod('equals', assertEqual);
1140
+ Assertion.addMethod('eq', assertEqual);
1141
+
1142
+ /**
1143
+ * ### .eql(obj[, msg])
1144
+ *
1145
+ * Asserts that the target is deeply equal to the given `obj`. See the
1146
+ * `deep-eql` project page for info on the deep equality algorithm:
1147
+ * https://github.com/chaijs/deep-eql.
1148
+ *
1149
+ * // Target object is deeply (but not strictly) equal to {a: 1}
1150
+ * expect({a: 1}).to.eql({a: 1}).but.not.equal({a: 1});
1151
+ *
1152
+ * // Target array is deeply (but not strictly) equal to [1, 2]
1153
+ * expect([1, 2]).to.eql([1, 2]).but.not.equal([1, 2]);
1154
+ *
1155
+ * Add `.not` earlier in the chain to negate `.eql`. However, it's often best
1156
+ * to assert that the target is deeply equal to its expected value, rather
1157
+ * than not deeply equal to one of countless unexpected values.
1158
+ *
1159
+ * expect({a: 1}).to.eql({a: 1}); // Recommended
1160
+ * expect({a: 1}).to.not.eql({b: 2}); // Not recommended
1161
+ *
1162
+ * `.eql` accepts an optional `msg` argument which is a custom error message
1163
+ * to show when the assertion fails. The message can also be given as the
1164
+ * second argument to `expect`.
1165
+ *
1166
+ * expect({a: 1}).to.eql({b: 2}, 'nooo why fail??');
1167
+ * expect({a: 1}, 'nooo why fail??').to.eql({b: 2});
1168
+ *
1169
+ * The alias `.eqls` can be used interchangeably with `.eql`.
1170
+ *
1171
+ * The `.deep.equal` assertion is almost identical to `.eql` but with one
1172
+ * difference: `.deep.equal` causes deep equality comparisons to also be used
1173
+ * for any other assertions that follow in the chain.
1174
+ *
1175
+ * @name eql
1176
+ * @alias eqls
1177
+ * @param {unknown} obj
1178
+ * @param {string} msg _optional_
1179
+ * @namespace BDD
1180
+ * @public
1181
+ */
1182
+ function assertEql(obj, msg) {
1183
+ if (msg) flag(this, 'message', msg);
1184
+ var eql = flag(this, 'eql');
1185
+ this.assert(
1186
+ eql(obj, flag(this, 'object')),
1187
+ 'expected #{this} to deeply equal #{exp}',
1188
+ 'expected #{this} to not deeply equal #{exp}',
1189
+ obj,
1190
+ this._obj,
1191
+ true
1192
+ );
1193
+ }
1194
+
1195
+ Assertion.addMethod('eql', assertEql);
1196
+ Assertion.addMethod('eqls', assertEql);
1197
+
1198
+ /**
1199
+ * ### .above(n[, msg])
1200
+ *
1201
+ * Asserts that the target is a number or a date greater than the given number or date `n` respectively.
1202
+ * However, it's often best to assert that the target is equal to its expected
1203
+ * value.
1204
+ *
1205
+ * expect(2).to.equal(2); // Recommended
1206
+ * expect(2).to.be.above(1); // Not recommended
1207
+ *
1208
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
1209
+ * or `size` is greater than the given number `n`.
1210
+ *
1211
+ * expect('foo').to.have.lengthOf(3); // Recommended
1212
+ * expect('foo').to.have.lengthOf.above(2); // Not recommended
1213
+ *
1214
+ * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended
1215
+ * expect([1, 2, 3]).to.have.lengthOf.above(2); // Not recommended
1216
+ *
1217
+ * Add `.not` earlier in the chain to negate `.above`.
1218
+ *
1219
+ * expect(2).to.equal(2); // Recommended
1220
+ * expect(1).to.not.be.above(2); // Not recommended
1221
+ *
1222
+ * `.above` accepts an optional `msg` argument which is a custom error message
1223
+ * to show when the assertion fails. The message can also be given as the
1224
+ * second argument to `expect`.
1225
+ *
1226
+ * expect(1).to.be.above(2, 'nooo why fail??');
1227
+ * expect(1, 'nooo why fail??').to.be.above(2);
1228
+ *
1229
+ * The aliases `.gt` and `.greaterThan` can be used interchangeably with
1230
+ * `.above`.
1231
+ *
1232
+ * @name above
1233
+ * @alias gt
1234
+ * @alias greaterThan
1235
+ * @param {number} n
1236
+ * @param {string} msg _optional_
1237
+ * @namespace BDD
1238
+ * @public
1239
+ */
1240
+ function assertAbove(n, msg) {
1241
+ if (msg) flag(this, 'message', msg);
1242
+ var obj = flag(this, 'object'),
1243
+ doLength = flag(this, 'doLength'),
1244
+ flagMsg = flag(this, 'message'),
1245
+ msgPrefix = flagMsg ? flagMsg + ': ' : '',
1246
+ ssfi = flag(this, 'ssfi'),
1247
+ objType = _.type(obj).toLowerCase(),
1248
+ nType = _.type(n).toLowerCase();
1249
+
1250
+ if (doLength && objType !== 'map' && objType !== 'set') {
1251
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
1252
+ }
1253
+
1254
+ if (!doLength && objType === 'date' && nType !== 'date') {
1255
+ throw new AssertionError(
1256
+ msgPrefix + 'the argument to above must be a date',
1257
+ undefined,
1258
+ ssfi
1259
+ );
1260
+ } else if (!_.isNumeric(n) && (doLength || _.isNumeric(obj))) {
1261
+ throw new AssertionError(
1262
+ msgPrefix + 'the argument to above must be a number',
1263
+ undefined,
1264
+ ssfi
1265
+ );
1266
+ } else if (!doLength && objType !== 'date' && !_.isNumeric(obj)) {
1267
+ var printObj = objType === 'string' ? "'" + obj + "'" : obj;
1268
+ throw new AssertionError(
1269
+ msgPrefix + 'expected ' + printObj + ' to be a number or a date',
1270
+ undefined,
1271
+ ssfi
1272
+ );
1273
+ }
1274
+
1275
+ if (doLength) {
1276
+ var descriptor = 'length',
1277
+ itemsCount;
1278
+ if (objType === 'map' || objType === 'set') {
1279
+ descriptor = 'size';
1280
+ itemsCount = obj.size;
1281
+ } else {
1282
+ itemsCount = obj.length;
1283
+ }
1284
+ this.assert(
1285
+ itemsCount > n,
1286
+ 'expected #{this} to have a ' +
1287
+ descriptor +
1288
+ ' above #{exp} but got #{act}',
1289
+ 'expected #{this} to not have a ' + descriptor + ' above #{exp}',
1290
+ n,
1291
+ itemsCount
1292
+ );
1293
+ } else {
1294
+ this.assert(
1295
+ obj > n,
1296
+ 'expected #{this} to be above #{exp}',
1297
+ 'expected #{this} to be at most #{exp}',
1298
+ n
1299
+ );
1300
+ }
1301
+ }
1302
+
1303
+ Assertion.addMethod('above', assertAbove);
1304
+ Assertion.addMethod('gt', assertAbove);
1305
+ Assertion.addMethod('greaterThan', assertAbove);
1306
+
1307
+ /**
1308
+ * ### .least(n[, msg])
1309
+ *
1310
+ * Asserts that the target is a number or a date greater than or equal to the given
1311
+ * number or date `n` respectively. However, it's often best to assert that the target is equal to
1312
+ * its expected value.
1313
+ *
1314
+ * expect(2).to.equal(2); // Recommended
1315
+ * expect(2).to.be.at.least(1); // Not recommended
1316
+ * expect(2).to.be.at.least(2); // Not recommended
1317
+ *
1318
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
1319
+ * or `size` is greater than or equal to the given number `n`.
1320
+ *
1321
+ * expect('foo').to.have.lengthOf(3); // Recommended
1322
+ * expect('foo').to.have.lengthOf.at.least(2); // Not recommended
1323
+ *
1324
+ * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended
1325
+ * expect([1, 2, 3]).to.have.lengthOf.at.least(2); // Not recommended
1326
+ *
1327
+ * Add `.not` earlier in the chain to negate `.least`.
1328
+ *
1329
+ * expect(1).to.equal(1); // Recommended
1330
+ * expect(1).to.not.be.at.least(2); // Not recommended
1331
+ *
1332
+ * `.least` accepts an optional `msg` argument which is a custom error message
1333
+ * to show when the assertion fails. The message can also be given as the
1334
+ * second argument to `expect`.
1335
+ *
1336
+ * expect(1).to.be.at.least(2, 'nooo why fail??');
1337
+ * expect(1, 'nooo why fail??').to.be.at.least(2);
1338
+ *
1339
+ * The aliases `.gte` and `.greaterThanOrEqual` can be used interchangeably with
1340
+ * `.least`.
1341
+ *
1342
+ * @name least
1343
+ * @alias gte
1344
+ * @alias greaterThanOrEqual
1345
+ * @param {unknown} n
1346
+ * @param {string} msg _optional_
1347
+ * @namespace BDD
1348
+ * @public
1349
+ */
1350
+ function assertLeast(n, msg) {
1351
+ if (msg) flag(this, 'message', msg);
1352
+ var obj = flag(this, 'object'),
1353
+ doLength = flag(this, 'doLength'),
1354
+ flagMsg = flag(this, 'message'),
1355
+ msgPrefix = flagMsg ? flagMsg + ': ' : '',
1356
+ ssfi = flag(this, 'ssfi'),
1357
+ objType = _.type(obj).toLowerCase(),
1358
+ nType = _.type(n).toLowerCase(),
1359
+ errorMessage,
1360
+ shouldThrow = true;
1361
+
1362
+ if (doLength && objType !== 'map' && objType !== 'set') {
1363
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
1364
+ }
1365
+
1366
+ if (!doLength && objType === 'date' && nType !== 'date') {
1367
+ errorMessage = msgPrefix + 'the argument to least must be a date';
1368
+ } else if (!_.isNumeric(n) && (doLength || _.isNumeric(obj))) {
1369
+ errorMessage = msgPrefix + 'the argument to least must be a number';
1370
+ } else if (!doLength && objType !== 'date' && !_.isNumeric(obj)) {
1371
+ var printObj = objType === 'string' ? "'" + obj + "'" : obj;
1372
+ errorMessage =
1373
+ msgPrefix + 'expected ' + printObj + ' to be a number or a date';
1374
+ } else {
1375
+ shouldThrow = false;
1376
+ }
1377
+
1378
+ if (shouldThrow) {
1379
+ throw new AssertionError(errorMessage, undefined, ssfi);
1380
+ }
1381
+
1382
+ if (doLength) {
1383
+ var descriptor = 'length',
1384
+ itemsCount;
1385
+ if (objType === 'map' || objType === 'set') {
1386
+ descriptor = 'size';
1387
+ itemsCount = obj.size;
1388
+ } else {
1389
+ itemsCount = obj.length;
1390
+ }
1391
+ this.assert(
1392
+ itemsCount >= n,
1393
+ 'expected #{this} to have a ' +
1394
+ descriptor +
1395
+ ' at least #{exp} but got #{act}',
1396
+ 'expected #{this} to have a ' + descriptor + ' below #{exp}',
1397
+ n,
1398
+ itemsCount
1399
+ );
1400
+ } else {
1401
+ this.assert(
1402
+ obj >= n,
1403
+ 'expected #{this} to be at least #{exp}',
1404
+ 'expected #{this} to be below #{exp}',
1405
+ n
1406
+ );
1407
+ }
1408
+ }
1409
+
1410
+ Assertion.addMethod('least', assertLeast);
1411
+ Assertion.addMethod('gte', assertLeast);
1412
+ Assertion.addMethod('greaterThanOrEqual', assertLeast);
1413
+
1414
+ /**
1415
+ * ### .below(n[, msg])
1416
+ *
1417
+ * Asserts that the target is a number or a date less than the given number or date `n` respectively.
1418
+ * However, it's often best to assert that the target is equal to its expected
1419
+ * value.
1420
+ *
1421
+ * expect(1).to.equal(1); // Recommended
1422
+ * expect(1).to.be.below(2); // Not recommended
1423
+ *
1424
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
1425
+ * or `size` is less than the given number `n`.
1426
+ *
1427
+ * expect('foo').to.have.lengthOf(3); // Recommended
1428
+ * expect('foo').to.have.lengthOf.below(4); // Not recommended
1429
+ *
1430
+ * expect([1, 2, 3]).to.have.length(3); // Recommended
1431
+ * expect([1, 2, 3]).to.have.lengthOf.below(4); // Not recommended
1432
+ *
1433
+ * Add `.not` earlier in the chain to negate `.below`.
1434
+ *
1435
+ * expect(2).to.equal(2); // Recommended
1436
+ * expect(2).to.not.be.below(1); // Not recommended
1437
+ *
1438
+ * `.below` accepts an optional `msg` argument which is a custom error message
1439
+ * to show when the assertion fails. The message can also be given as the
1440
+ * second argument to `expect`.
1441
+ *
1442
+ * expect(2).to.be.below(1, 'nooo why fail??');
1443
+ * expect(2, 'nooo why fail??').to.be.below(1);
1444
+ *
1445
+ * The aliases `.lt` and `.lessThan` can be used interchangeably with
1446
+ * `.below`.
1447
+ *
1448
+ * @name below
1449
+ * @alias lt
1450
+ * @alias lessThan
1451
+ * @param {unknown} n
1452
+ * @param {string} msg _optional_
1453
+ * @namespace BDD
1454
+ * @public
1455
+ */
1456
+ function assertBelow(n, msg) {
1457
+ if (msg) flag(this, 'message', msg);
1458
+ var obj = flag(this, 'object'),
1459
+ doLength = flag(this, 'doLength'),
1460
+ flagMsg = flag(this, 'message'),
1461
+ msgPrefix = flagMsg ? flagMsg + ': ' : '',
1462
+ ssfi = flag(this, 'ssfi'),
1463
+ objType = _.type(obj).toLowerCase(),
1464
+ nType = _.type(n).toLowerCase(),
1465
+ errorMessage,
1466
+ shouldThrow = true;
1467
+
1468
+ if (doLength && objType !== 'map' && objType !== 'set') {
1469
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
1470
+ }
1471
+
1472
+ if (!doLength && objType === 'date' && nType !== 'date') {
1473
+ errorMessage = msgPrefix + 'the argument to below must be a date';
1474
+ } else if (!_.isNumeric(n) && (doLength || _.isNumeric(obj))) {
1475
+ errorMessage = msgPrefix + 'the argument to below must be a number';
1476
+ } else if (!doLength && objType !== 'date' && !_.isNumeric(obj)) {
1477
+ var printObj = objType === 'string' ? "'" + obj + "'" : obj;
1478
+ errorMessage =
1479
+ msgPrefix + 'expected ' + printObj + ' to be a number or a date';
1480
+ } else {
1481
+ shouldThrow = false;
1482
+ }
1483
+
1484
+ if (shouldThrow) {
1485
+ throw new AssertionError(errorMessage, undefined, ssfi);
1486
+ }
1487
+
1488
+ if (doLength) {
1489
+ var descriptor = 'length',
1490
+ itemsCount;
1491
+ if (objType === 'map' || objType === 'set') {
1492
+ descriptor = 'size';
1493
+ itemsCount = obj.size;
1494
+ } else {
1495
+ itemsCount = obj.length;
1496
+ }
1497
+ this.assert(
1498
+ itemsCount < n,
1499
+ 'expected #{this} to have a ' +
1500
+ descriptor +
1501
+ ' below #{exp} but got #{act}',
1502
+ 'expected #{this} to not have a ' + descriptor + ' below #{exp}',
1503
+ n,
1504
+ itemsCount
1505
+ );
1506
+ } else {
1507
+ this.assert(
1508
+ obj < n,
1509
+ 'expected #{this} to be below #{exp}',
1510
+ 'expected #{this} to be at least #{exp}',
1511
+ n
1512
+ );
1513
+ }
1514
+ }
1515
+
1516
+ Assertion.addMethod('below', assertBelow);
1517
+ Assertion.addMethod('lt', assertBelow);
1518
+ Assertion.addMethod('lessThan', assertBelow);
1519
+
1520
+ /**
1521
+ * ### .most(n[, msg])
1522
+ *
1523
+ * Asserts that the target is a number or a date less than or equal to the given number
1524
+ * or date `n` respectively. However, it's often best to assert that the target is equal to its
1525
+ * expected value.
1526
+ *
1527
+ * expect(1).to.equal(1); // Recommended
1528
+ * expect(1).to.be.at.most(2); // Not recommended
1529
+ * expect(1).to.be.at.most(1); // Not recommended
1530
+ *
1531
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
1532
+ * or `size` is less than or equal to the given number `n`.
1533
+ *
1534
+ * expect('foo').to.have.lengthOf(3); // Recommended
1535
+ * expect('foo').to.have.lengthOf.at.most(4); // Not recommended
1536
+ *
1537
+ * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended
1538
+ * expect([1, 2, 3]).to.have.lengthOf.at.most(4); // Not recommended
1539
+ *
1540
+ * Add `.not` earlier in the chain to negate `.most`.
1541
+ *
1542
+ * expect(2).to.equal(2); // Recommended
1543
+ * expect(2).to.not.be.at.most(1); // Not recommended
1544
+ *
1545
+ * `.most` accepts an optional `msg` argument which is a custom error message
1546
+ * to show when the assertion fails. The message can also be given as the
1547
+ * second argument to `expect`.
1548
+ *
1549
+ * expect(2).to.be.at.most(1, 'nooo why fail??');
1550
+ * expect(2, 'nooo why fail??').to.be.at.most(1);
1551
+ *
1552
+ * The aliases `.lte` and `.lessThanOrEqual` can be used interchangeably with
1553
+ * `.most`.
1554
+ *
1555
+ * @name most
1556
+ * @alias lte
1557
+ * @alias lessThanOrEqual
1558
+ * @param {unknown} n
1559
+ * @param {string} msg _optional_
1560
+ * @namespace BDD
1561
+ * @public
1562
+ */
1563
+ function assertMost(n, msg) {
1564
+ if (msg) flag(this, 'message', msg);
1565
+ var obj = flag(this, 'object'),
1566
+ doLength = flag(this, 'doLength'),
1567
+ flagMsg = flag(this, 'message'),
1568
+ msgPrefix = flagMsg ? flagMsg + ': ' : '',
1569
+ ssfi = flag(this, 'ssfi'),
1570
+ objType = _.type(obj).toLowerCase(),
1571
+ nType = _.type(n).toLowerCase(),
1572
+ errorMessage,
1573
+ shouldThrow = true;
1574
+
1575
+ if (doLength && objType !== 'map' && objType !== 'set') {
1576
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
1577
+ }
1578
+
1579
+ if (!doLength && objType === 'date' && nType !== 'date') {
1580
+ errorMessage = msgPrefix + 'the argument to most must be a date';
1581
+ } else if (!_.isNumeric(n) && (doLength || _.isNumeric(obj))) {
1582
+ errorMessage = msgPrefix + 'the argument to most must be a number';
1583
+ } else if (!doLength && objType !== 'date' && !_.isNumeric(obj)) {
1584
+ var printObj = objType === 'string' ? "'" + obj + "'" : obj;
1585
+ errorMessage =
1586
+ msgPrefix + 'expected ' + printObj + ' to be a number or a date';
1587
+ } else {
1588
+ shouldThrow = false;
1589
+ }
1590
+
1591
+ if (shouldThrow) {
1592
+ throw new AssertionError(errorMessage, undefined, ssfi);
1593
+ }
1594
+
1595
+ if (doLength) {
1596
+ var descriptor = 'length',
1597
+ itemsCount;
1598
+ if (objType === 'map' || objType === 'set') {
1599
+ descriptor = 'size';
1600
+ itemsCount = obj.size;
1601
+ } else {
1602
+ itemsCount = obj.length;
1603
+ }
1604
+ this.assert(
1605
+ itemsCount <= n,
1606
+ 'expected #{this} to have a ' +
1607
+ descriptor +
1608
+ ' at most #{exp} but got #{act}',
1609
+ 'expected #{this} to have a ' + descriptor + ' above #{exp}',
1610
+ n,
1611
+ itemsCount
1612
+ );
1613
+ } else {
1614
+ this.assert(
1615
+ obj <= n,
1616
+ 'expected #{this} to be at most #{exp}',
1617
+ 'expected #{this} to be above #{exp}',
1618
+ n
1619
+ );
1620
+ }
1621
+ }
1622
+
1623
+ Assertion.addMethod('most', assertMost);
1624
+ Assertion.addMethod('lte', assertMost);
1625
+ Assertion.addMethod('lessThanOrEqual', assertMost);
1626
+
1627
+ /**
1628
+ * ### .within(start, finish[, msg])
1629
+ *
1630
+ * Asserts that the target is a number or a date greater than or equal to the given
1631
+ * number or date `start`, and less than or equal to the given number or date `finish` respectively.
1632
+ * However, it's often best to assert that the target is equal to its expected
1633
+ * value.
1634
+ *
1635
+ * expect(2).to.equal(2); // Recommended
1636
+ * expect(2).to.be.within(1, 3); // Not recommended
1637
+ * expect(2).to.be.within(2, 3); // Not recommended
1638
+ * expect(2).to.be.within(1, 2); // Not recommended
1639
+ *
1640
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
1641
+ * or `size` is greater than or equal to the given number `start`, and less
1642
+ * than or equal to the given number `finish`.
1643
+ *
1644
+ * expect('foo').to.have.lengthOf(3); // Recommended
1645
+ * expect('foo').to.have.lengthOf.within(2, 4); // Not recommended
1646
+ *
1647
+ * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended
1648
+ * expect([1, 2, 3]).to.have.lengthOf.within(2, 4); // Not recommended
1649
+ *
1650
+ * Add `.not` earlier in the chain to negate `.within`.
1651
+ *
1652
+ * expect(1).to.equal(1); // Recommended
1653
+ * expect(1).to.not.be.within(2, 4); // Not recommended
1654
+ *
1655
+ * `.within` accepts an optional `msg` argument which is a custom error
1656
+ * message to show when the assertion fails. The message can also be given as
1657
+ * the second argument to `expect`.
1658
+ *
1659
+ * expect(4).to.be.within(1, 3, 'nooo why fail??');
1660
+ * expect(4, 'nooo why fail??').to.be.within(1, 3);
1661
+ *
1662
+ * @name within
1663
+ * @param {unknown} start lower bound inclusive
1664
+ * @param {unknown} finish upper bound inclusive
1665
+ * @param {string} msg _optional_
1666
+ * @namespace BDD
1667
+ * @public
1668
+ */
1669
+ Assertion.addMethod('within', function (start, finish, msg) {
1670
+ if (msg) flag(this, 'message', msg);
1671
+ var obj = flag(this, 'object'),
1672
+ doLength = flag(this, 'doLength'),
1673
+ flagMsg = flag(this, 'message'),
1674
+ msgPrefix = flagMsg ? flagMsg + ': ' : '',
1675
+ ssfi = flag(this, 'ssfi'),
1676
+ objType = _.type(obj).toLowerCase(),
1677
+ startType = _.type(start).toLowerCase(),
1678
+ finishType = _.type(finish).toLowerCase(),
1679
+ errorMessage,
1680
+ shouldThrow = true,
1681
+ range =
1682
+ startType === 'date' && finishType === 'date'
1683
+ ? start.toISOString() + '..' + finish.toISOString()
1684
+ : start + '..' + finish;
1685
+
1686
+ if (doLength && objType !== 'map' && objType !== 'set') {
1687
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
1688
+ }
1689
+
1690
+ if (
1691
+ !doLength &&
1692
+ objType === 'date' &&
1693
+ (startType !== 'date' || finishType !== 'date')
1694
+ ) {
1695
+ errorMessage = msgPrefix + 'the arguments to within must be dates';
1696
+ } else if (
1697
+ (!_.isNumeric(start) || !_.isNumeric(finish)) &&
1698
+ (doLength || _.isNumeric(obj))
1699
+ ) {
1700
+ errorMessage = msgPrefix + 'the arguments to within must be numbers';
1701
+ } else if (!doLength && objType !== 'date' && !_.isNumeric(obj)) {
1702
+ var printObj = objType === 'string' ? "'" + obj + "'" : obj;
1703
+ errorMessage =
1704
+ msgPrefix + 'expected ' + printObj + ' to be a number or a date';
1705
+ } else {
1706
+ shouldThrow = false;
1707
+ }
1708
+
1709
+ if (shouldThrow) {
1710
+ throw new AssertionError(errorMessage, undefined, ssfi);
1711
+ }
1712
+
1713
+ if (doLength) {
1714
+ var descriptor = 'length',
1715
+ itemsCount;
1716
+ if (objType === 'map' || objType === 'set') {
1717
+ descriptor = 'size';
1718
+ itemsCount = obj.size;
1719
+ } else {
1720
+ itemsCount = obj.length;
1721
+ }
1722
+ this.assert(
1723
+ itemsCount >= start && itemsCount <= finish,
1724
+ 'expected #{this} to have a ' + descriptor + ' within ' + range,
1725
+ 'expected #{this} to not have a ' + descriptor + ' within ' + range
1726
+ );
1727
+ } else {
1728
+ this.assert(
1729
+ obj >= start && obj <= finish,
1730
+ 'expected #{this} to be within ' + range,
1731
+ 'expected #{this} to not be within ' + range
1732
+ );
1733
+ }
1734
+ });
1735
+
1736
+ /**
1737
+ * ### .instanceof(constructor[, msg])
1738
+ *
1739
+ * Asserts that the target is an instance of the given `constructor`.
1740
+ *
1741
+ * function Cat () { }
1742
+ *
1743
+ * expect(new Cat()).to.be.an.instanceof(Cat);
1744
+ * expect([1, 2]).to.be.an.instanceof(Array);
1745
+ *
1746
+ * Add `.not` earlier in the chain to negate `.instanceof`.
1747
+ *
1748
+ * expect({a: 1}).to.not.be.an.instanceof(Array);
1749
+ *
1750
+ * `.instanceof` accepts an optional `msg` argument which is a custom error
1751
+ * message to show when the assertion fails. The message can also be given as
1752
+ * the second argument to `expect`.
1753
+ *
1754
+ * expect(1).to.be.an.instanceof(Array, 'nooo why fail??');
1755
+ * expect(1, 'nooo why fail??').to.be.an.instanceof(Array);
1756
+ *
1757
+ * Due to limitations in ES5, `.instanceof` may not always work as expected
1758
+ * when using a transpiler such as Babel or TypeScript. In particular, it may
1759
+ * produce unexpected results when subclassing built-in object such as
1760
+ * `Array`, `Error`, and `Map`. See your transpiler's docs for details:
1761
+ *
1762
+ * - ([Babel](https://babeljs.io/docs/usage/caveats/#classes))
1763
+ * - ([TypeScript](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work))
1764
+ *
1765
+ * The alias `.instanceOf` can be used interchangeably with `.instanceof`.
1766
+ *
1767
+ * @name instanceof
1768
+ * @param {unknown} constructor
1769
+ * @param {string} msg _optional_
1770
+ * @alias instanceOf
1771
+ * @namespace BDD
1772
+ * @public
1773
+ */
1774
+ function assertInstanceOf(constructor, msg) {
1775
+ if (msg) flag(this, 'message', msg);
1776
+
1777
+ var target = flag(this, 'object');
1778
+ var ssfi = flag(this, 'ssfi');
1779
+ var flagMsg = flag(this, 'message');
1780
+
1781
+ try {
1782
+ var isInstanceOf = target instanceof constructor;
1783
+ } catch (err) {
1784
+ if (err instanceof TypeError) {
1785
+ flagMsg = flagMsg ? flagMsg + ': ' : '';
1786
+ throw new AssertionError(
1787
+ flagMsg +
1788
+ 'The instanceof assertion needs a constructor but ' +
1789
+ _.type(constructor) +
1790
+ ' was given.',
1791
+ undefined,
1792
+ ssfi
1793
+ );
1794
+ }
1795
+ throw err;
1796
+ }
1797
+
1798
+ var name = _.getName(constructor);
1799
+ if (name == null) {
1800
+ name = 'an unnamed constructor';
1801
+ }
1802
+
1803
+ this.assert(
1804
+ isInstanceOf,
1805
+ 'expected #{this} to be an instance of ' + name,
1806
+ 'expected #{this} to not be an instance of ' + name
1807
+ );
1808
+ }
1809
+
1810
+ Assertion.addMethod('instanceof', assertInstanceOf);
1811
+ Assertion.addMethod('instanceOf', assertInstanceOf);
1812
+
1813
+ /**
1814
+ * ### .property(name[, val[, msg]])
1815
+ *
1816
+ * Asserts that the target has a property with the given key `name`.
1817
+ *
1818
+ * expect({a: 1}).to.have.property('a');
1819
+ *
1820
+ * When `val` is provided, `.property` also asserts that the property's value
1821
+ * is equal to the given `val`.
1822
+ *
1823
+ * expect({a: 1}).to.have.property('a', 1);
1824
+ *
1825
+ * By default, strict (`===`) equality is used. Add `.deep` earlier in the
1826
+ * chain to use deep equality instead. See the `deep-eql` project page for
1827
+ * info on the deep equality algorithm: https://github.com/chaijs/deep-eql.
1828
+ *
1829
+ * // Target object deeply (but not strictly) has property `x: {a: 1}`
1830
+ * expect({x: {a: 1}}).to.have.deep.property('x', {a: 1});
1831
+ * expect({x: {a: 1}}).to.not.have.property('x', {a: 1});
1832
+ *
1833
+ * The target's enumerable and non-enumerable properties are always included
1834
+ * in the search. By default, both own and inherited properties are included.
1835
+ * Add `.own` earlier in the chain to exclude inherited properties from the
1836
+ * search.
1837
+ *
1838
+ * Object.prototype.b = 2;
1839
+ *
1840
+ * expect({a: 1}).to.have.own.property('a');
1841
+ * expect({a: 1}).to.have.own.property('a', 1);
1842
+ * expect({a: 1}).to.have.property('b');
1843
+ * expect({a: 1}).to.not.have.own.property('b');
1844
+ *
1845
+ * `.deep` and `.own` can be combined.
1846
+ *
1847
+ * expect({x: {a: 1}}).to.have.deep.own.property('x', {a: 1});
1848
+ *
1849
+ * Add `.nested` earlier in the chain to enable dot- and bracket-notation when
1850
+ * referencing nested properties.
1851
+ *
1852
+ * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]');
1853
+ * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]', 'y');
1854
+ *
1855
+ * If `.` or `[]` are part of an actual property name, they can be escaped by
1856
+ * adding two backslashes before them.
1857
+ *
1858
+ * expect({'.a': {'[b]': 'x'}}).to.have.nested.property('\\.a.\\[b\\]');
1859
+ *
1860
+ * `.deep` and `.nested` can be combined.
1861
+ *
1862
+ * expect({a: {b: [{c: 3}]}})
1863
+ * .to.have.deep.nested.property('a.b[0]', {c: 3});
1864
+ *
1865
+ * `.own` and `.nested` cannot be combined.
1866
+ *
1867
+ * Add `.not` earlier in the chain to negate `.property`.
1868
+ *
1869
+ * expect({a: 1}).to.not.have.property('b');
1870
+ *
1871
+ * However, it's dangerous to negate `.property` when providing `val`. The
1872
+ * problem is that it creates uncertain expectations by asserting that the
1873
+ * target either doesn't have a property with the given key `name`, or that it
1874
+ * does have a property with the given key `name` but its value isn't equal to
1875
+ * the given `val`. It's often best to identify the exact output that's
1876
+ * expected, and then write an assertion that only accepts that exact output.
1877
+ *
1878
+ * When the target isn't expected to have a property with the given key
1879
+ * `name`, it's often best to assert exactly that.
1880
+ *
1881
+ * expect({b: 2}).to.not.have.property('a'); // Recommended
1882
+ * expect({b: 2}).to.not.have.property('a', 1); // Not recommended
1883
+ *
1884
+ * When the target is expected to have a property with the given key `name`,
1885
+ * it's often best to assert that the property has its expected value, rather
1886
+ * than asserting that it doesn't have one of many unexpected values.
1887
+ *
1888
+ * expect({a: 3}).to.have.property('a', 3); // Recommended
1889
+ * expect({a: 3}).to.not.have.property('a', 1); // Not recommended
1890
+ *
1891
+ * `.property` changes the target of any assertions that follow in the chain
1892
+ * to be the value of the property from the original target object.
1893
+ *
1894
+ * expect({a: 1}).to.have.property('a').that.is.a('number');
1895
+ *
1896
+ * `.property` accepts an optional `msg` argument which is a custom error
1897
+ * message to show when the assertion fails. The message can also be given as
1898
+ * the second argument to `expect`. When not providing `val`, only use the
1899
+ * second form.
1900
+ *
1901
+ * // Recommended
1902
+ * expect({a: 1}).to.have.property('a', 2, 'nooo why fail??');
1903
+ * expect({a: 1}, 'nooo why fail??').to.have.property('a', 2);
1904
+ * expect({a: 1}, 'nooo why fail??').to.have.property('b');
1905
+ *
1906
+ * // Not recommended
1907
+ * expect({a: 1}).to.have.property('b', undefined, 'nooo why fail??');
1908
+ *
1909
+ * The above assertion isn't the same thing as not providing `val`. Instead,
1910
+ * it's asserting that the target object has a `b` property that's equal to
1911
+ * `undefined`.
1912
+ *
1913
+ * The assertions `.ownProperty` and `.haveOwnProperty` can be used
1914
+ * interchangeably with `.own.property`.
1915
+ *
1916
+ * @name property
1917
+ * @param {string} name
1918
+ * @param {unknown} val (optional)
1919
+ * @param {string} msg _optional_
1920
+ * @namespace BDD
1921
+ * @public
1922
+ */
1923
+ function assertProperty(name, val, msg) {
1924
+ if (msg) flag(this, 'message', msg);
1925
+
1926
+ var isNested = flag(this, 'nested'),
1927
+ isOwn = flag(this, 'own'),
1928
+ flagMsg = flag(this, 'message'),
1929
+ obj = flag(this, 'object'),
1930
+ ssfi = flag(this, 'ssfi'),
1931
+ nameType = typeof name;
1932
+
1933
+ flagMsg = flagMsg ? flagMsg + ': ' : '';
1934
+
1935
+ if (isNested) {
1936
+ if (nameType !== 'string') {
1937
+ throw new AssertionError(
1938
+ flagMsg +
1939
+ 'the argument to property must be a string when using nested syntax',
1940
+ undefined,
1941
+ ssfi
1942
+ );
1943
+ }
1944
+ } else {
1945
+ if (
1946
+ nameType !== 'string' &&
1947
+ nameType !== 'number' &&
1948
+ nameType !== 'symbol'
1949
+ ) {
1950
+ throw new AssertionError(
1951
+ flagMsg +
1952
+ 'the argument to property must be a string, number, or symbol',
1953
+ undefined,
1954
+ ssfi
1955
+ );
1956
+ }
1957
+ }
1958
+
1959
+ if (isNested && isOwn) {
1960
+ throw new AssertionError(
1961
+ flagMsg + 'The "nested" and "own" flags cannot be combined.',
1962
+ undefined,
1963
+ ssfi
1964
+ );
1965
+ }
1966
+
1967
+ if (obj === null || obj === undefined) {
1968
+ throw new AssertionError(
1969
+ flagMsg + 'Target cannot be null or undefined.',
1970
+ undefined,
1971
+ ssfi
1972
+ );
1973
+ }
1974
+
1975
+ var isDeep = flag(this, 'deep'),
1976
+ negate = flag(this, 'negate'),
1977
+ pathInfo = isNested ? _.getPathInfo(obj, name) : null,
1978
+ value = isNested ? pathInfo.value : obj[name],
1979
+ isEql = isDeep ? flag(this, 'eql') : (val1, val2) => val1 === val2;
1980
+
1981
+ var descriptor = '';
1982
+ if (isDeep) descriptor += 'deep ';
1983
+ if (isOwn) descriptor += 'own ';
1984
+ if (isNested) descriptor += 'nested ';
1985
+ descriptor += 'property ';
1986
+
1987
+ var hasProperty;
1988
+ if (isOwn) hasProperty = Object.prototype.hasOwnProperty.call(obj, name);
1989
+ else if (isNested) hasProperty = pathInfo.exists;
1990
+ else hasProperty = _.hasProperty(obj, name);
1991
+
1992
+ // When performing a negated assertion for both name and val, merely having
1993
+ // a property with the given name isn't enough to cause the assertion to
1994
+ // fail. It must both have a property with the given name, and the value of
1995
+ // that property must equal the given val. Therefore, skip this assertion in
1996
+ // favor of the next.
1997
+ if (!negate || arguments.length === 1) {
1998
+ this.assert(
1999
+ hasProperty,
2000
+ 'expected #{this} to have ' + descriptor + _.inspect(name),
2001
+ 'expected #{this} to not have ' + descriptor + _.inspect(name)
2002
+ );
2003
+ }
2004
+
2005
+ if (arguments.length > 1) {
2006
+ this.assert(
2007
+ hasProperty && isEql(val, value),
2008
+ 'expected #{this} to have ' +
2009
+ descriptor +
2010
+ _.inspect(name) +
2011
+ ' of #{exp}, but got #{act}',
2012
+ 'expected #{this} to not have ' +
2013
+ descriptor +
2014
+ _.inspect(name) +
2015
+ ' of #{act}',
2016
+ val,
2017
+ value
2018
+ );
2019
+ }
2020
+
2021
+ flag(this, 'object', value);
2022
+ }
2023
+
2024
+ Assertion.addMethod('property', assertProperty);
2025
+
2026
+ /**
2027
+ *
2028
+ * @param {unknown} _name
2029
+ * @param {unknown} _value
2030
+ * @param {string} _msg
2031
+ */
2032
+ function assertOwnProperty(_name, _value, _msg) {
2033
+ flag(this, 'own', true);
2034
+ assertProperty.apply(this, arguments);
2035
+ }
2036
+
2037
+ Assertion.addMethod('ownProperty', assertOwnProperty);
2038
+ Assertion.addMethod('haveOwnProperty', assertOwnProperty);
2039
+
2040
+ /**
2041
+ * ### .ownPropertyDescriptor(name[, descriptor[, msg]])
2042
+ *
2043
+ * Asserts that the target has its own property descriptor with the given key
2044
+ * `name`. Enumerable and non-enumerable properties are included in the
2045
+ * search.
2046
+ *
2047
+ * expect({a: 1}).to.have.ownPropertyDescriptor('a');
2048
+ *
2049
+ * When `descriptor` is provided, `.ownPropertyDescriptor` also asserts that
2050
+ * the property's descriptor is deeply equal to the given `descriptor`. See
2051
+ * the `deep-eql` project page for info on the deep equality algorithm:
2052
+ * https://github.com/chaijs/deep-eql.
2053
+ *
2054
+ * expect({a: 1}).to.have.ownPropertyDescriptor('a', {
2055
+ * configurable: true,
2056
+ * enumerable: true,
2057
+ * writable: true,
2058
+ * value: 1,
2059
+ * });
2060
+ *
2061
+ * Add `.not` earlier in the chain to negate `.ownPropertyDescriptor`.
2062
+ *
2063
+ * expect({a: 1}).to.not.have.ownPropertyDescriptor('b');
2064
+ *
2065
+ * However, it's dangerous to negate `.ownPropertyDescriptor` when providing
2066
+ * a `descriptor`. The problem is that it creates uncertain expectations by
2067
+ * asserting that the target either doesn't have a property descriptor with
2068
+ * the given key `name`, or that it does have a property descriptor with the
2069
+ * given key `name` but it’s not deeply equal to the given `descriptor`. It's
2070
+ * often best to identify the exact output that's expected, and then write an
2071
+ * assertion that only accepts that exact output.
2072
+ *
2073
+ * When the target isn't expected to have a property descriptor with the given
2074
+ * key `name`, it's often best to assert exactly that.
2075
+ *
2076
+ * // Recommended
2077
+ * expect({b: 2}).to.not.have.ownPropertyDescriptor('a');
2078
+ *
2079
+ * // Not recommended
2080
+ * expect({b: 2}).to.not.have.ownPropertyDescriptor('a', {
2081
+ * configurable: true,
2082
+ * enumerable: true,
2083
+ * writable: true,
2084
+ * value: 1,
2085
+ * });
2086
+ *
2087
+ * When the target is expected to have a property descriptor with the given
2088
+ * key `name`, it's often best to assert that the property has its expected
2089
+ * descriptor, rather than asserting that it doesn't have one of many
2090
+ * unexpected descriptors.
2091
+ *
2092
+ * // Recommended
2093
+ * expect({a: 3}).to.have.ownPropertyDescriptor('a', {
2094
+ * configurable: true,
2095
+ * enumerable: true,
2096
+ * writable: true,
2097
+ * value: 3,
2098
+ * });
2099
+ *
2100
+ * // Not recommended
2101
+ * expect({a: 3}).to.not.have.ownPropertyDescriptor('a', {
2102
+ * configurable: true,
2103
+ * enumerable: true,
2104
+ * writable: true,
2105
+ * value: 1,
2106
+ * });
2107
+ *
2108
+ * `.ownPropertyDescriptor` changes the target of any assertions that follow
2109
+ * in the chain to be the value of the property descriptor from the original
2110
+ * target object.
2111
+ *
2112
+ * expect({a: 1}).to.have.ownPropertyDescriptor('a')
2113
+ * .that.has.property('enumerable', true);
2114
+ *
2115
+ * `.ownPropertyDescriptor` accepts an optional `msg` argument which is a
2116
+ * custom error message to show when the assertion fails. The message can also
2117
+ * be given as the second argument to `expect`. When not providing
2118
+ * `descriptor`, only use the second form.
2119
+ *
2120
+ * // Recommended
2121
+ * expect({a: 1}).to.have.ownPropertyDescriptor('a', {
2122
+ * configurable: true,
2123
+ * enumerable: true,
2124
+ * writable: true,
2125
+ * value: 2,
2126
+ * }, 'nooo why fail??');
2127
+ *
2128
+ * // Recommended
2129
+ * expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('a', {
2130
+ * configurable: true,
2131
+ * enumerable: true,
2132
+ * writable: true,
2133
+ * value: 2,
2134
+ * });
2135
+ *
2136
+ * // Recommended
2137
+ * expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('b');
2138
+ *
2139
+ * // Not recommended
2140
+ * expect({a: 1})
2141
+ * .to.have.ownPropertyDescriptor('b', undefined, 'nooo why fail??');
2142
+ *
2143
+ * The above assertion isn't the same thing as not providing `descriptor`.
2144
+ * Instead, it's asserting that the target object has a `b` property
2145
+ * descriptor that's deeply equal to `undefined`.
2146
+ *
2147
+ * The alias `.haveOwnPropertyDescriptor` can be used interchangeably with
2148
+ * `.ownPropertyDescriptor`.
2149
+ *
2150
+ * @name ownPropertyDescriptor
2151
+ * @alias haveOwnPropertyDescriptor
2152
+ * @param {string} name
2153
+ * @param {object} descriptor _optional_
2154
+ * @param {string} msg _optional_
2155
+ * @namespace BDD
2156
+ * @public
2157
+ */
2158
+ function assertOwnPropertyDescriptor(name, descriptor, msg) {
2159
+ if (typeof descriptor === 'string') {
2160
+ msg = descriptor;
2161
+ descriptor = null;
2162
+ }
2163
+ if (msg) flag(this, 'message', msg);
2164
+ var obj = flag(this, 'object');
2165
+ var actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name);
2166
+ var eql = flag(this, 'eql');
2167
+ if (actualDescriptor && descriptor) {
2168
+ this.assert(
2169
+ eql(descriptor, actualDescriptor),
2170
+ 'expected the own property descriptor for ' +
2171
+ _.inspect(name) +
2172
+ ' on #{this} to match ' +
2173
+ _.inspect(descriptor) +
2174
+ ', got ' +
2175
+ _.inspect(actualDescriptor),
2176
+ 'expected the own property descriptor for ' +
2177
+ _.inspect(name) +
2178
+ ' on #{this} to not match ' +
2179
+ _.inspect(descriptor),
2180
+ descriptor,
2181
+ actualDescriptor,
2182
+ true
2183
+ );
2184
+ } else {
2185
+ this.assert(
2186
+ actualDescriptor,
2187
+ 'expected #{this} to have an own property descriptor for ' +
2188
+ _.inspect(name),
2189
+ 'expected #{this} to not have an own property descriptor for ' +
2190
+ _.inspect(name)
2191
+ );
2192
+ }
2193
+ flag(this, 'object', actualDescriptor);
2194
+ }
2195
+
2196
+ Assertion.addMethod('ownPropertyDescriptor', assertOwnPropertyDescriptor);
2197
+ Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor);
2198
+
2199
+ /**
2200
+ *
2201
+ */
2202
+ function assertLengthChain() {
2203
+ flag(this, 'doLength', true);
2204
+ }
2205
+
2206
+ /**
2207
+ * ### .lengthOf(n[, msg])
2208
+ *
2209
+ * Asserts that the target's `length` or `size` is equal to the given number
2210
+ * `n`.
2211
+ *
2212
+ * expect([1, 2, 3]).to.have.lengthOf(3);
2213
+ * expect('foo').to.have.lengthOf(3);
2214
+ * expect(new Set([1, 2, 3])).to.have.lengthOf(3);
2215
+ * expect(new Map([['a', 1], ['b', 2], ['c', 3]])).to.have.lengthOf(3);
2216
+ *
2217
+ * Add `.not` earlier in the chain to negate `.lengthOf`. However, it's often
2218
+ * best to assert that the target's `length` property is equal to its expected
2219
+ * value, rather than not equal to one of many unexpected values.
2220
+ *
2221
+ * expect('foo').to.have.lengthOf(3); // Recommended
2222
+ * expect('foo').to.not.have.lengthOf(4); // Not recommended
2223
+ *
2224
+ * `.lengthOf` accepts an optional `msg` argument which is a custom error
2225
+ * message to show when the assertion fails. The message can also be given as
2226
+ * the second argument to `expect`.
2227
+ *
2228
+ * expect([1, 2, 3]).to.have.lengthOf(2, 'nooo why fail??');
2229
+ * expect([1, 2, 3], 'nooo why fail??').to.have.lengthOf(2);
2230
+ *
2231
+ * `.lengthOf` can also be used as a language chain, causing all `.above`,
2232
+ * `.below`, `.least`, `.most`, and `.within` assertions that follow in the
2233
+ * chain to use the target's `length` property as the target. However, it's
2234
+ * often best to assert that the target's `length` property is equal to its
2235
+ * expected length, rather than asserting that its `length` property falls
2236
+ * within some range of values.
2237
+ *
2238
+ * // Recommended
2239
+ * expect([1, 2, 3]).to.have.lengthOf(3);
2240
+ *
2241
+ * // Not recommended
2242
+ * expect([1, 2, 3]).to.have.lengthOf.above(2);
2243
+ * expect([1, 2, 3]).to.have.lengthOf.below(4);
2244
+ * expect([1, 2, 3]).to.have.lengthOf.at.least(3);
2245
+ * expect([1, 2, 3]).to.have.lengthOf.at.most(3);
2246
+ * expect([1, 2, 3]).to.have.lengthOf.within(2,4);
2247
+ *
2248
+ * Due to a compatibility issue, the alias `.length` can't be chained directly
2249
+ * off of an uninvoked method such as `.a`. Therefore, `.length` can't be used
2250
+ * interchangeably with `.lengthOf` in every situation. It's recommended to
2251
+ * always use `.lengthOf` instead of `.length`.
2252
+ *
2253
+ * expect([1, 2, 3]).to.have.a.length(3); // incompatible; throws error
2254
+ * expect([1, 2, 3]).to.have.a.lengthOf(3); // passes as expected
2255
+ *
2256
+ * @name lengthOf
2257
+ * @alias length
2258
+ * @param {number} n
2259
+ * @param {string} msg _optional_
2260
+ * @namespace BDD
2261
+ * @public
2262
+ */
2263
+ function assertLength(n, msg) {
2264
+ if (msg) flag(this, 'message', msg);
2265
+ var obj = flag(this, 'object'),
2266
+ objType = _.type(obj).toLowerCase(),
2267
+ flagMsg = flag(this, 'message'),
2268
+ ssfi = flag(this, 'ssfi'),
2269
+ descriptor = 'length',
2270
+ itemsCount;
2271
+
2272
+ switch (objType) {
2273
+ case 'map':
2274
+ case 'set':
2275
+ descriptor = 'size';
2276
+ itemsCount = obj.size;
2277
+ break;
2278
+ default:
2279
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
2280
+ itemsCount = obj.length;
2281
+ }
2282
+
2283
+ this.assert(
2284
+ itemsCount == n,
2285
+ 'expected #{this} to have a ' + descriptor + ' of #{exp} but got #{act}',
2286
+ 'expected #{this} to not have a ' + descriptor + ' of #{act}',
2287
+ n,
2288
+ itemsCount
2289
+ );
2290
+ }
2291
+
2292
+ Assertion.addChainableMethod('length', assertLength, assertLengthChain);
2293
+ Assertion.addChainableMethod('lengthOf', assertLength, assertLengthChain);
2294
+
2295
+ /**
2296
+ * ### .match(re[, msg])
2297
+ *
2298
+ * Asserts that the target matches the given regular expression `re`.
2299
+ *
2300
+ * expect('foobar').to.match(/^foo/);
2301
+ *
2302
+ * Add `.not` earlier in the chain to negate `.match`.
2303
+ *
2304
+ * expect('foobar').to.not.match(/taco/);
2305
+ *
2306
+ * `.match` accepts an optional `msg` argument which is a custom error message
2307
+ * to show when the assertion fails. The message can also be given as the
2308
+ * second argument to `expect`.
2309
+ *
2310
+ * expect('foobar').to.match(/taco/, 'nooo why fail??');
2311
+ * expect('foobar', 'nooo why fail??').to.match(/taco/);
2312
+ *
2313
+ * The alias `.matches` can be used interchangeably with `.match`.
2314
+ *
2315
+ * @name match
2316
+ * @alias matches
2317
+ * @param {RegExp} re
2318
+ * @param {string} msg _optional_
2319
+ * @namespace BDD
2320
+ * @public
2321
+ */
2322
+ function assertMatch(re, msg) {
2323
+ if (msg) flag(this, 'message', msg);
2324
+ var obj = flag(this, 'object');
2325
+ this.assert(
2326
+ re.exec(obj),
2327
+ 'expected #{this} to match ' + re,
2328
+ 'expected #{this} not to match ' + re
2329
+ );
2330
+ }
2331
+
2332
+ Assertion.addMethod('match', assertMatch);
2333
+ Assertion.addMethod('matches', assertMatch);
2334
+
2335
+ /**
2336
+ * ### .string(str[, msg])
2337
+ *
2338
+ * Asserts that the target string contains the given substring `str`.
2339
+ *
2340
+ * expect('foobar').to.have.string('bar');
2341
+ *
2342
+ * Add `.not` earlier in the chain to negate `.string`.
2343
+ *
2344
+ * expect('foobar').to.not.have.string('taco');
2345
+ *
2346
+ * `.string` accepts an optional `msg` argument which is a custom error
2347
+ * message to show when the assertion fails. The message can also be given as
2348
+ * the second argument to `expect`.
2349
+ *
2350
+ * expect('foobar').to.have.string('taco', 'nooo why fail??');
2351
+ * expect('foobar', 'nooo why fail??').to.have.string('taco');
2352
+ *
2353
+ * @name string
2354
+ * @param {string} str
2355
+ * @param {string} msg _optional_
2356
+ * @namespace BDD
2357
+ * @public
2358
+ */
2359
+ Assertion.addMethod('string', function (str, msg) {
2360
+ if (msg) flag(this, 'message', msg);
2361
+ var obj = flag(this, 'object'),
2362
+ flagMsg = flag(this, 'message'),
2363
+ ssfi = flag(this, 'ssfi');
2364
+ new Assertion(obj, flagMsg, ssfi, true).is.a('string');
2365
+
2366
+ this.assert(
2367
+ ~obj.indexOf(str),
2368
+ 'expected #{this} to contain ' + _.inspect(str),
2369
+ 'expected #{this} to not contain ' + _.inspect(str)
2370
+ );
2371
+ });
2372
+
2373
+ /**
2374
+ * ### .keys(key1[, key2[, ...]])
2375
+ *
2376
+ * Asserts that the target object, array, map, or set has the given keys. Only
2377
+ * the target's own inherited properties are included in the search.
2378
+ *
2379
+ * When the target is an object or array, keys can be provided as one or more
2380
+ * string arguments, a single array argument, or a single object argument. In
2381
+ * the latter case, only the keys in the given object matter; the values are
2382
+ * ignored.
2383
+ *
2384
+ * expect({a: 1, b: 2}).to.have.all.keys('a', 'b');
2385
+ * expect(['x', 'y']).to.have.all.keys(0, 1);
2386
+ *
2387
+ * expect({a: 1, b: 2}).to.have.all.keys(['a', 'b']);
2388
+ * expect(['x', 'y']).to.have.all.keys([0, 1]);
2389
+ *
2390
+ * expect({a: 1, b: 2}).to.have.all.keys({a: 4, b: 5}); // ignore 4 and 5
2391
+ * expect(['x', 'y']).to.have.all.keys({0: 4, 1: 5}); // ignore 4 and 5
2392
+ *
2393
+ * When the target is a map or set, each key must be provided as a separate
2394
+ * argument.
2395
+ *
2396
+ * expect(new Map([['a', 1], ['b', 2]])).to.have.all.keys('a', 'b');
2397
+ * expect(new Set(['a', 'b'])).to.have.all.keys('a', 'b');
2398
+ *
2399
+ * Because `.keys` does different things based on the target's type, it's
2400
+ * important to check the target's type before using `.keys`. See the `.a` doc
2401
+ * for info on testing a target's type.
2402
+ *
2403
+ * expect({a: 1, b: 2}).to.be.an('object').that.has.all.keys('a', 'b');
2404
+ *
2405
+ * By default, strict (`===`) equality is used to compare keys of maps and
2406
+ * sets. Add `.deep` earlier in the chain to use deep equality instead. See
2407
+ * the `deep-eql` project page for info on the deep equality algorithm:
2408
+ * https://github.com/chaijs/deep-eql.
2409
+ *
2410
+ * // Target set deeply (but not strictly) has key `{a: 1}`
2411
+ * expect(new Set([{a: 1}])).to.have.all.deep.keys([{a: 1}]);
2412
+ * expect(new Set([{a: 1}])).to.not.have.all.keys([{a: 1}]);
2413
+ *
2414
+ * By default, the target must have all of the given keys and no more. Add
2415
+ * `.any` earlier in the chain to only require that the target have at least
2416
+ * one of the given keys. Also, add `.not` earlier in the chain to negate
2417
+ * `.keys`. It's often best to add `.any` when negating `.keys`, and to use
2418
+ * `.all` when asserting `.keys` without negation.
2419
+ *
2420
+ * When negating `.keys`, `.any` is preferred because `.not.any.keys` asserts
2421
+ * exactly what's expected of the output, whereas `.not.all.keys` creates
2422
+ * uncertain expectations.
2423
+ *
2424
+ * // Recommended; asserts that target doesn't have any of the given keys
2425
+ * expect({a: 1, b: 2}).to.not.have.any.keys('c', 'd');
2426
+ *
2427
+ * // Not recommended; asserts that target doesn't have all of the given
2428
+ * // keys but may or may not have some of them
2429
+ * expect({a: 1, b: 2}).to.not.have.all.keys('c', 'd');
2430
+ *
2431
+ * When asserting `.keys` without negation, `.all` is preferred because
2432
+ * `.all.keys` asserts exactly what's expected of the output, whereas
2433
+ * `.any.keys` creates uncertain expectations.
2434
+ *
2435
+ * // Recommended; asserts that target has all the given keys
2436
+ * expect({a: 1, b: 2}).to.have.all.keys('a', 'b');
2437
+ *
2438
+ * // Not recommended; asserts that target has at least one of the given
2439
+ * // keys but may or may not have more of them
2440
+ * expect({a: 1, b: 2}).to.have.any.keys('a', 'b');
2441
+ *
2442
+ * Note that `.all` is used by default when neither `.all` nor `.any` appear
2443
+ * earlier in the chain. However, it's often best to add `.all` anyway because
2444
+ * it improves readability.
2445
+ *
2446
+ * // Both assertions are identical
2447
+ * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); // Recommended
2448
+ * expect({a: 1, b: 2}).to.have.keys('a', 'b'); // Not recommended
2449
+ *
2450
+ * Add `.include` earlier in the chain to require that the target's keys be a
2451
+ * superset of the expected keys, rather than identical sets.
2452
+ *
2453
+ * // Target object's keys are a superset of ['a', 'b'] but not identical
2454
+ * expect({a: 1, b: 2, c: 3}).to.include.all.keys('a', 'b');
2455
+ * expect({a: 1, b: 2, c: 3}).to.not.have.all.keys('a', 'b');
2456
+ *
2457
+ * However, if `.any` and `.include` are combined, only the `.any` takes
2458
+ * effect. The `.include` is ignored in this case.
2459
+ *
2460
+ * // Both assertions are identical
2461
+ * expect({a: 1}).to.have.any.keys('a', 'b');
2462
+ * expect({a: 1}).to.include.any.keys('a', 'b');
2463
+ *
2464
+ * A custom error message can be given as the second argument to `expect`.
2465
+ *
2466
+ * expect({a: 1}, 'nooo why fail??').to.have.key('b');
2467
+ *
2468
+ * The alias `.key` can be used interchangeably with `.keys`.
2469
+ *
2470
+ * @name keys
2471
+ * @alias key
2472
+ * @param {...string | Array | object} keys
2473
+ * @namespace BDD
2474
+ * @public
2475
+ */
2476
+ function assertKeys(keys) {
2477
+ var obj = flag(this, 'object'),
2478
+ objType = _.type(obj),
2479
+ keysType = _.type(keys),
2480
+ ssfi = flag(this, 'ssfi'),
2481
+ isDeep = flag(this, 'deep'),
2482
+ str,
2483
+ deepStr = '',
2484
+ actual,
2485
+ ok = true,
2486
+ flagMsg = flag(this, 'message');
2487
+
2488
+ flagMsg = flagMsg ? flagMsg + ': ' : '';
2489
+ var mixedArgsMsg =
2490
+ flagMsg +
2491
+ 'when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments';
2492
+
2493
+ if (objType === 'Map' || objType === 'Set') {
2494
+ deepStr = isDeep ? 'deeply ' : '';
2495
+ actual = [];
2496
+
2497
+ // Map and Set '.keys' aren't supported in IE 11. Therefore, use .forEach.
2498
+ obj.forEach(function (val, key) {
2499
+ actual.push(key);
2500
+ });
2501
+
2502
+ if (keysType !== 'Array') {
2503
+ keys = Array.prototype.slice.call(arguments);
2504
+ }
2505
+ } else {
2506
+ actual = _.getOwnEnumerableProperties(obj);
2507
+
2508
+ switch (keysType) {
2509
+ case 'Array':
2510
+ if (arguments.length > 1) {
2511
+ throw new AssertionError(mixedArgsMsg, undefined, ssfi);
2512
+ }
2513
+ break;
2514
+ case 'Object':
2515
+ if (arguments.length > 1) {
2516
+ throw new AssertionError(mixedArgsMsg, undefined, ssfi);
2517
+ }
2518
+ keys = Object.keys(keys);
2519
+ break;
2520
+ default:
2521
+ keys = Array.prototype.slice.call(arguments);
2522
+ }
2523
+
2524
+ // Only stringify non-Symbols because Symbols would become "Symbol()"
2525
+ keys = keys.map(function (val) {
2526
+ return typeof val === 'symbol' ? val : String(val);
2527
+ });
2528
+ }
2529
+
2530
+ if (!keys.length) {
2531
+ throw new AssertionError(flagMsg + 'keys required', undefined, ssfi);
2532
+ }
2533
+
2534
+ var len = keys.length,
2535
+ any = flag(this, 'any'),
2536
+ all = flag(this, 'all'),
2537
+ expected = keys,
2538
+ isEql = isDeep ? flag(this, 'eql') : (val1, val2) => val1 === val2;
2539
+
2540
+ if (!any && !all) {
2541
+ all = true;
2542
+ }
2543
+
2544
+ // Has any
2545
+ if (any) {
2546
+ ok = expected.some(function (expectedKey) {
2547
+ return actual.some(function (actualKey) {
2548
+ return isEql(expectedKey, actualKey);
2549
+ });
2550
+ });
2551
+ }
2552
+
2553
+ // Has all
2554
+ if (all) {
2555
+ ok = expected.every(function (expectedKey) {
2556
+ return actual.some(function (actualKey) {
2557
+ return isEql(expectedKey, actualKey);
2558
+ });
2559
+ });
2560
+
2561
+ if (!flag(this, 'contains')) {
2562
+ ok = ok && keys.length == actual.length;
2563
+ }
2564
+ }
2565
+
2566
+ // Key string
2567
+ if (len > 1) {
2568
+ keys = keys.map(function (key) {
2569
+ return _.inspect(key);
2570
+ });
2571
+ var last = keys.pop();
2572
+ if (all) {
2573
+ str = keys.join(', ') + ', and ' + last;
2574
+ }
2575
+ if (any) {
2576
+ str = keys.join(', ') + ', or ' + last;
2577
+ }
2578
+ } else {
2579
+ str = _.inspect(keys[0]);
2580
+ }
2581
+
2582
+ // Form
2583
+ str = (len > 1 ? 'keys ' : 'key ') + str;
2584
+
2585
+ // Have / include
2586
+ str = (flag(this, 'contains') ? 'contain ' : 'have ') + str;
2587
+
2588
+ // Assertion
2589
+ this.assert(
2590
+ ok,
2591
+ 'expected #{this} to ' + deepStr + str,
2592
+ 'expected #{this} to not ' + deepStr + str,
2593
+ expected.slice(0).sort(_.compareByInspect),
2594
+ actual.sort(_.compareByInspect),
2595
+ true
2596
+ );
2597
+ }
2598
+
2599
+ Assertion.addMethod('keys', assertKeys);
2600
+ Assertion.addMethod('key', assertKeys);
2601
+
2602
+ /**
2603
+ * ### .throw([errorLike], [errMsgMatcher], [msg])
2604
+ *
2605
+ * When no arguments are provided, `.throw` invokes the target function and
2606
+ * asserts that an error is thrown.
2607
+ *
2608
+ * var badFn = function () { throw new TypeError('Illegal salmon!'); };
2609
+ * expect(badFn).to.throw();
2610
+ *
2611
+ * When one argument is provided, and it's an error constructor, `.throw`
2612
+ * invokes the target function and asserts that an error is thrown that's an
2613
+ * instance of that error constructor.
2614
+ *
2615
+ * var badFn = function () { throw new TypeError('Illegal salmon!'); };
2616
+ * expect(badFn).to.throw(TypeError);
2617
+ *
2618
+ * When one argument is provided, and it's an error instance, `.throw` invokes
2619
+ * the target function and asserts that an error is thrown that's strictly
2620
+ * (`===`) equal to that error instance.
2621
+ *
2622
+ * var err = new TypeError('Illegal salmon!');
2623
+ * var badFn = function () { throw err; };
2624
+ *
2625
+ * expect(badFn).to.throw(err);
2626
+ *
2627
+ * When one argument is provided, and it's a string, `.throw` invokes the
2628
+ * target function and asserts that an error is thrown with a message that
2629
+ * contains that string.
2630
+ *
2631
+ * var badFn = function () { throw new TypeError('Illegal salmon!'); };
2632
+ * expect(badFn).to.throw('salmon');
2633
+ *
2634
+ * When one argument is provided, and it's a regular expression, `.throw`
2635
+ * invokes the target function and asserts that an error is thrown with a
2636
+ * message that matches that regular expression.
2637
+ *
2638
+ * var badFn = function () { throw new TypeError('Illegal salmon!'); };
2639
+ * expect(badFn).to.throw(/salmon/);
2640
+ *
2641
+ * When two arguments are provided, and the first is an error instance or
2642
+ * constructor, and the second is a string or regular expression, `.throw`
2643
+ * invokes the function and asserts that an error is thrown that fulfills both
2644
+ * conditions as described above.
2645
+ *
2646
+ * var err = new TypeError('Illegal salmon!');
2647
+ * var badFn = function () { throw err; };
2648
+ *
2649
+ * expect(badFn).to.throw(TypeError, 'salmon');
2650
+ * expect(badFn).to.throw(TypeError, /salmon/);
2651
+ * expect(badFn).to.throw(err, 'salmon');
2652
+ * expect(badFn).to.throw(err, /salmon/);
2653
+ *
2654
+ * Add `.not` earlier in the chain to negate `.throw`.
2655
+ *
2656
+ * var goodFn = function () {};
2657
+ * expect(goodFn).to.not.throw();
2658
+ *
2659
+ * However, it's dangerous to negate `.throw` when providing any arguments.
2660
+ * The problem is that it creates uncertain expectations by asserting that the
2661
+ * target either doesn't throw an error, or that it throws an error but of a
2662
+ * different type than the given type, or that it throws an error of the given
2663
+ * type but with a message that doesn't include the given string. It's often
2664
+ * best to identify the exact output that's expected, and then write an
2665
+ * assertion that only accepts that exact output.
2666
+ *
2667
+ * When the target isn't expected to throw an error, it's often best to assert
2668
+ * exactly that.
2669
+ *
2670
+ * var goodFn = function () {};
2671
+ *
2672
+ * expect(goodFn).to.not.throw(); // Recommended
2673
+ * expect(goodFn).to.not.throw(ReferenceError, 'x'); // Not recommended
2674
+ *
2675
+ * When the target is expected to throw an error, it's often best to assert
2676
+ * that the error is of its expected type, and has a message that includes an
2677
+ * expected string, rather than asserting that it doesn't have one of many
2678
+ * unexpected types, and doesn't have a message that includes some string.
2679
+ *
2680
+ * var badFn = function () { throw new TypeError('Illegal salmon!'); };
2681
+ *
2682
+ * expect(badFn).to.throw(TypeError, 'salmon'); // Recommended
2683
+ * expect(badFn).to.not.throw(ReferenceError, 'x'); // Not recommended
2684
+ *
2685
+ * `.throw` changes the target of any assertions that follow in the chain to
2686
+ * be the error object that's thrown.
2687
+ *
2688
+ * var err = new TypeError('Illegal salmon!');
2689
+ * err.code = 42;
2690
+ * var badFn = function () { throw err; };
2691
+ *
2692
+ * expect(badFn).to.throw(TypeError).with.property('code', 42);
2693
+ *
2694
+ * `.throw` accepts an optional `msg` argument which is a custom error message
2695
+ * to show when the assertion fails. The message can also be given as the
2696
+ * second argument to `expect`. When not providing two arguments, always use
2697
+ * the second form.
2698
+ *
2699
+ * var goodFn = function () {};
2700
+ *
2701
+ * expect(goodFn).to.throw(TypeError, 'x', 'nooo why fail??');
2702
+ * expect(goodFn, 'nooo why fail??').to.throw();
2703
+ *
2704
+ * Due to limitations in ES5, `.throw` may not always work as expected when
2705
+ * using a transpiler such as Babel or TypeScript. In particular, it may
2706
+ * produce unexpected results when subclassing the built-in `Error` object and
2707
+ * then passing the subclassed constructor to `.throw`. See your transpiler's
2708
+ * docs for details:
2709
+ *
2710
+ * - ([Babel](https://babeljs.io/docs/usage/caveats/#classes))
2711
+ * - ([TypeScript](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work))
2712
+ *
2713
+ * Beware of some common mistakes when using the `throw` assertion. One common
2714
+ * mistake is to accidentally invoke the function yourself instead of letting
2715
+ * the `throw` assertion invoke the function for you. For example, when
2716
+ * testing if a function named `fn` throws, provide `fn` instead of `fn()` as
2717
+ * the target for the assertion.
2718
+ *
2719
+ * expect(fn).to.throw(); // Good! Tests `fn` as desired
2720
+ * expect(fn()).to.throw(); // Bad! Tests result of `fn()`, not `fn`
2721
+ *
2722
+ * If you need to assert that your function `fn` throws when passed certain
2723
+ * arguments, then wrap a call to `fn` inside of another function.
2724
+ *
2725
+ * expect(function () { fn(42); }).to.throw(); // Function expression
2726
+ * expect(() => fn(42)).to.throw(); // ES6 arrow function
2727
+ *
2728
+ * Another common mistake is to provide an object method (or any stand-alone
2729
+ * function that relies on `this`) as the target of the assertion. Doing so is
2730
+ * problematic because the `this` context will be lost when the function is
2731
+ * invoked by `.throw`; there's no way for it to know what `this` is supposed
2732
+ * to be. There are two ways around this problem. One solution is to wrap the
2733
+ * method or function call inside of another function. Another solution is to
2734
+ * use `bind`.
2735
+ *
2736
+ * expect(function () { cat.meow(); }).to.throw(); // Function expression
2737
+ * expect(() => cat.meow()).to.throw(); // ES6 arrow function
2738
+ * expect(cat.meow.bind(cat)).to.throw(); // Bind
2739
+ *
2740
+ * Finally, it's worth mentioning that it's a best practice in JavaScript to
2741
+ * only throw `Error` and derivatives of `Error` such as `ReferenceError`,
2742
+ * `TypeError`, and user-defined objects that extend `Error`. No other type of
2743
+ * value will generate a stack trace when initialized. With that said, the
2744
+ * `throw` assertion does technically support any type of value being thrown,
2745
+ * not just `Error` and its derivatives.
2746
+ *
2747
+ * The aliases `.throws` and `.Throw` can be used interchangeably with
2748
+ * `.throw`.
2749
+ *
2750
+ * @name throw
2751
+ * @alias throws
2752
+ * @alias Throw
2753
+ * @param {Error} errorLike
2754
+ * @param {string | RegExp} errMsgMatcher error message
2755
+ * @param {string} msg _optional_
2756
+ * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types
2757
+ * @returns {void} error for chaining (null if no error)
2758
+ * @namespace BDD
2759
+ * @public
2760
+ */
2761
+ function assertThrows(errorLike, errMsgMatcher, msg) {
2762
+ if (msg) flag(this, 'message', msg);
2763
+ var obj = flag(this, 'object'),
2764
+ ssfi = flag(this, 'ssfi'),
2765
+ flagMsg = flag(this, 'message'),
2766
+ negate = flag(this, 'negate') || false;
2767
+ new Assertion(obj, flagMsg, ssfi, true).is.a('function');
2768
+
2769
+ if (_.isRegExp(errorLike) || typeof errorLike === 'string') {
2770
+ errMsgMatcher = errorLike;
2771
+ errorLike = null;
2772
+ }
2773
+
2774
+ let caughtErr;
2775
+ let errorWasThrown = false;
2776
+ try {
2777
+ obj();
2778
+ } catch (err) {
2779
+ errorWasThrown = true;
2780
+ caughtErr = err;
2781
+ }
2782
+
2783
+ // If we have the negate flag enabled and at least one valid argument it means we do expect an error
2784
+ // but we want it to match a given set of criteria
2785
+ var everyArgIsUndefined =
2786
+ errorLike === undefined && errMsgMatcher === undefined;
2787
+
2788
+ // If we've got the negate flag enabled and both args, we should only fail if both aren't compatible
2789
+ // See Issue #551 and PR #683@GitHub
2790
+ var everyArgIsDefined = Boolean(errorLike && errMsgMatcher);
2791
+ var errorLikeFail = false;
2792
+ var errMsgMatcherFail = false;
2793
+
2794
+ // Checking if error was thrown
2795
+ if (everyArgIsUndefined || (!everyArgIsUndefined && !negate)) {
2796
+ // We need this to display results correctly according to their types
2797
+ var errorLikeString = 'an error';
2798
+ if (errorLike instanceof Error) {
2799
+ errorLikeString = '#{exp}';
2800
+ } else if (errorLike) {
2801
+ errorLikeString = _.checkError.getConstructorName(errorLike);
2802
+ }
2803
+
2804
+ let actual = caughtErr;
2805
+ if (caughtErr instanceof Error) {
2806
+ actual = caughtErr.toString();
2807
+ } else if (typeof caughtErr === 'string') {
2808
+ actual = caughtErr;
2809
+ } else if (
2810
+ caughtErr &&
2811
+ (typeof caughtErr === 'object' || typeof caughtErr === 'function')
2812
+ ) {
2813
+ try {
2814
+ actual = _.checkError.getConstructorName(caughtErr);
2815
+ } catch (_err) {
2816
+ // somehow wasn't a constructor, maybe we got a function thrown
2817
+ // or similar
2818
+ }
2819
+ }
2820
+
2821
+ this.assert(
2822
+ errorWasThrown,
2823
+ 'expected #{this} to throw ' + errorLikeString,
2824
+ 'expected #{this} to not throw an error but #{act} was thrown',
2825
+ errorLike && errorLike.toString(),
2826
+ actual
2827
+ );
2828
+ }
2829
+
2830
+ if (errorLike && caughtErr) {
2831
+ // We should compare instances only if `errorLike` is an instance of `Error`
2832
+ if (errorLike instanceof Error) {
2833
+ var isCompatibleInstance = _.checkError.compatibleInstance(
2834
+ caughtErr,
2835
+ errorLike
2836
+ );
2837
+
2838
+ if (isCompatibleInstance === negate) {
2839
+ // These checks were created to ensure we won't fail too soon when we've got both args and a negate
2840
+ // See Issue #551 and PR #683@GitHub
2841
+ if (everyArgIsDefined && negate) {
2842
+ errorLikeFail = true;
2843
+ } else {
2844
+ this.assert(
2845
+ negate,
2846
+ 'expected #{this} to throw #{exp} but #{act} was thrown',
2847
+ 'expected #{this} to not throw #{exp}' +
2848
+ (caughtErr && !negate ? ' but #{act} was thrown' : ''),
2849
+ errorLike.toString(),
2850
+ caughtErr.toString()
2851
+ );
2852
+ }
2853
+ }
2854
+ }
2855
+
2856
+ var isCompatibleConstructor = _.checkError.compatibleConstructor(
2857
+ caughtErr,
2858
+ errorLike
2859
+ );
2860
+ if (isCompatibleConstructor === negate) {
2861
+ if (everyArgIsDefined && negate) {
2862
+ errorLikeFail = true;
2863
+ } else {
2864
+ this.assert(
2865
+ negate,
2866
+ 'expected #{this} to throw #{exp} but #{act} was thrown',
2867
+ 'expected #{this} to not throw #{exp}' +
2868
+ (caughtErr ? ' but #{act} was thrown' : ''),
2869
+ errorLike instanceof Error
2870
+ ? errorLike.toString()
2871
+ : errorLike && _.checkError.getConstructorName(errorLike),
2872
+ caughtErr instanceof Error
2873
+ ? caughtErr.toString()
2874
+ : caughtErr && _.checkError.getConstructorName(caughtErr)
2875
+ );
2876
+ }
2877
+ }
2878
+ }
2879
+
2880
+ if (caughtErr && errMsgMatcher !== undefined && errMsgMatcher !== null) {
2881
+ // Here we check compatible messages
2882
+ var placeholder = 'including';
2883
+ if (_.isRegExp(errMsgMatcher)) {
2884
+ placeholder = 'matching';
2885
+ }
2886
+
2887
+ var isCompatibleMessage = _.checkError.compatibleMessage(
2888
+ caughtErr,
2889
+ errMsgMatcher
2890
+ );
2891
+ if (isCompatibleMessage === negate) {
2892
+ if (everyArgIsDefined && negate) {
2893
+ errMsgMatcherFail = true;
2894
+ } else {
2895
+ this.assert(
2896
+ negate,
2897
+ 'expected #{this} to throw error ' +
2898
+ placeholder +
2899
+ ' #{exp} but got #{act}',
2900
+ 'expected #{this} to throw error not ' + placeholder + ' #{exp}',
2901
+ errMsgMatcher,
2902
+ _.checkError.getMessage(caughtErr)
2903
+ );
2904
+ }
2905
+ }
2906
+ }
2907
+
2908
+ // If both assertions failed and both should've matched we throw an error
2909
+ if (errorLikeFail && errMsgMatcherFail) {
2910
+ this.assert(
2911
+ negate,
2912
+ 'expected #{this} to throw #{exp} but #{act} was thrown',
2913
+ 'expected #{this} to not throw #{exp}' +
2914
+ (caughtErr ? ' but #{act} was thrown' : ''),
2915
+ errorLike instanceof Error
2916
+ ? errorLike.toString()
2917
+ : errorLike && _.checkError.getConstructorName(errorLike),
2918
+ caughtErr instanceof Error
2919
+ ? caughtErr.toString()
2920
+ : caughtErr && _.checkError.getConstructorName(caughtErr)
2921
+ );
2922
+ }
2923
+
2924
+ flag(this, 'object', caughtErr);
2925
+ }
2926
+
2927
+ Assertion.addMethod('throw', assertThrows);
2928
+ Assertion.addMethod('throws', assertThrows);
2929
+ Assertion.addMethod('Throw', assertThrows);
2930
+
2931
+ /**
2932
+ * ### .respondTo(method[, msg])
2933
+ *
2934
+ * When the target is a non-function object, `.respondTo` asserts that the
2935
+ * target has a method with the given name `method`. The method can be own or
2936
+ * inherited, and it can be enumerable or non-enumerable.
2937
+ *
2938
+ * function Cat () {}
2939
+ * Cat.prototype.meow = function () {};
2940
+ *
2941
+ * expect(new Cat()).to.respondTo('meow');
2942
+ *
2943
+ * When the target is a function, `.respondTo` asserts that the target's
2944
+ * `prototype` property has a method with the given name `method`. Again, the
2945
+ * method can be own or inherited, and it can be enumerable or non-enumerable.
2946
+ *
2947
+ * function Cat () {}
2948
+ * Cat.prototype.meow = function () {};
2949
+ *
2950
+ * expect(Cat).to.respondTo('meow');
2951
+ *
2952
+ * Add `.itself` earlier in the chain to force `.respondTo` to treat the
2953
+ * target as a non-function object, even if it's a function. Thus, it asserts
2954
+ * that the target has a method with the given name `method`, rather than
2955
+ * asserting that the target's `prototype` property has a method with the
2956
+ * given name `method`.
2957
+ *
2958
+ * function Cat () {}
2959
+ * Cat.prototype.meow = function () {};
2960
+ * Cat.hiss = function () {};
2961
+ *
2962
+ * expect(Cat).itself.to.respondTo('hiss').but.not.respondTo('meow');
2963
+ *
2964
+ * When not adding `.itself`, it's important to check the target's type before
2965
+ * using `.respondTo`. See the `.a` doc for info on checking a target's type.
2966
+ *
2967
+ * function Cat () {}
2968
+ * Cat.prototype.meow = function () {};
2969
+ *
2970
+ * expect(new Cat()).to.be.an('object').that.respondsTo('meow');
2971
+ *
2972
+ * Add `.not` earlier in the chain to negate `.respondTo`.
2973
+ *
2974
+ * function Dog () {}
2975
+ * Dog.prototype.bark = function () {};
2976
+ *
2977
+ * expect(new Dog()).to.not.respondTo('meow');
2978
+ *
2979
+ * `.respondTo` accepts an optional `msg` argument which is a custom error
2980
+ * message to show when the assertion fails. The message can also be given as
2981
+ * the second argument to `expect`.
2982
+ *
2983
+ * expect({}).to.respondTo('meow', 'nooo why fail??');
2984
+ * expect({}, 'nooo why fail??').to.respondTo('meow');
2985
+ *
2986
+ * The alias `.respondsTo` can be used interchangeably with `.respondTo`.
2987
+ *
2988
+ * @name respondTo
2989
+ * @alias respondsTo
2990
+ * @param {string} method
2991
+ * @param {string} msg _optional_
2992
+ * @namespace BDD
2993
+ * @public
2994
+ */
2995
+ function respondTo(method, msg) {
2996
+ if (msg) flag(this, 'message', msg);
2997
+ var obj = flag(this, 'object'),
2998
+ itself = flag(this, 'itself'),
2999
+ context =
3000
+ 'function' === typeof obj && !itself
3001
+ ? obj.prototype[method]
3002
+ : obj[method];
3003
+
3004
+ this.assert(
3005
+ 'function' === typeof context,
3006
+ 'expected #{this} to respond to ' + _.inspect(method),
3007
+ 'expected #{this} to not respond to ' + _.inspect(method)
3008
+ );
3009
+ }
3010
+
3011
+ Assertion.addMethod('respondTo', respondTo);
3012
+ Assertion.addMethod('respondsTo', respondTo);
3013
+
3014
+ /**
3015
+ * ### .itself
3016
+ *
3017
+ * Forces all `.respondTo` assertions that follow in the chain to behave as if
3018
+ * the target is a non-function object, even if it's a function. Thus, it
3019
+ * causes `.respondTo` to assert that the target has a method with the given
3020
+ * name, rather than asserting that the target's `prototype` property has a
3021
+ * method with the given name.
3022
+ *
3023
+ * function Cat () {}
3024
+ * Cat.prototype.meow = function () {};
3025
+ * Cat.hiss = function () {};
3026
+ *
3027
+ * expect(Cat).itself.to.respondTo('hiss').but.not.respondTo('meow');
3028
+ *
3029
+ * @name itself
3030
+ * @namespace BDD
3031
+ * @public
3032
+ */
3033
+ Assertion.addProperty('itself', function () {
3034
+ flag(this, 'itself', true);
3035
+ });
3036
+
3037
+ /**
3038
+ * ### .satisfy(matcher[, msg])
3039
+ *
3040
+ * Invokes the given `matcher` function with the target being passed as the
3041
+ * first argument, and asserts that the value returned is truthy.
3042
+ *
3043
+ * expect(1).to.satisfy(function(num) {
3044
+ * return num > 0;
3045
+ * });
3046
+ *
3047
+ * Add `.not` earlier in the chain to negate `.satisfy`.
3048
+ *
3049
+ * expect(1).to.not.satisfy(function(num) {
3050
+ * return num > 2;
3051
+ * });
3052
+ *
3053
+ * `.satisfy` accepts an optional `msg` argument which is a custom error
3054
+ * message to show when the assertion fails. The message can also be given as
3055
+ * the second argument to `expect`.
3056
+ *
3057
+ * expect(1).to.satisfy(function(num) {
3058
+ * return num > 2;
3059
+ * }, 'nooo why fail??');
3060
+ *
3061
+ * expect(1, 'nooo why fail??').to.satisfy(function(num) {
3062
+ * return num > 2;
3063
+ * });
3064
+ *
3065
+ * The alias `.satisfies` can be used interchangeably with `.satisfy`.
3066
+ *
3067
+ * @name satisfy
3068
+ * @alias satisfies
3069
+ * @param {Function} matcher
3070
+ * @param {string} msg _optional_
3071
+ * @namespace BDD
3072
+ * @public
3073
+ */
3074
+ function satisfy(matcher, msg) {
3075
+ if (msg) flag(this, 'message', msg);
3076
+ var obj = flag(this, 'object');
3077
+ var result = matcher(obj);
3078
+ this.assert(
3079
+ result,
3080
+ 'expected #{this} to satisfy ' + _.objDisplay(matcher),
3081
+ 'expected #{this} to not satisfy' + _.objDisplay(matcher),
3082
+ flag(this, 'negate') ? false : true,
3083
+ result
3084
+ );
3085
+ }
3086
+
3087
+ Assertion.addMethod('satisfy', satisfy);
3088
+ Assertion.addMethod('satisfies', satisfy);
3089
+
3090
+ /**
3091
+ * ### .closeTo(expected, delta[, msg])
3092
+ *
3093
+ * Asserts that the target is a number that's within a given +/- `delta` range
3094
+ * of the given number `expected`. However, it's often best to assert that the
3095
+ * target is equal to its expected value.
3096
+ *
3097
+ * // Recommended
3098
+ * expect(1.5).to.equal(1.5);
3099
+ *
3100
+ * // Not recommended
3101
+ * expect(1.5).to.be.closeTo(1, 0.5);
3102
+ * expect(1.5).to.be.closeTo(2, 0.5);
3103
+ * expect(1.5).to.be.closeTo(1, 1);
3104
+ *
3105
+ * Add `.not` earlier in the chain to negate `.closeTo`.
3106
+ *
3107
+ * expect(1.5).to.equal(1.5); // Recommended
3108
+ * expect(1.5).to.not.be.closeTo(3, 1); // Not recommended
3109
+ *
3110
+ * `.closeTo` accepts an optional `msg` argument which is a custom error
3111
+ * message to show when the assertion fails. The message can also be given as
3112
+ * the second argument to `expect`.
3113
+ *
3114
+ * expect(1.5).to.be.closeTo(3, 1, 'nooo why fail??');
3115
+ * expect(1.5, 'nooo why fail??').to.be.closeTo(3, 1);
3116
+ *
3117
+ * The alias `.approximately` can be used interchangeably with `.closeTo`.
3118
+ *
3119
+ * @name closeTo
3120
+ * @alias approximately
3121
+ * @param {number} expected
3122
+ * @param {number} delta
3123
+ * @param {string} msg _optional_
3124
+ * @namespace BDD
3125
+ * @public
3126
+ */
3127
+ function closeTo(expected, delta, msg) {
3128
+ if (msg) flag(this, 'message', msg);
3129
+ var obj = flag(this, 'object'),
3130
+ flagMsg = flag(this, 'message'),
3131
+ ssfi = flag(this, 'ssfi');
3132
+
3133
+ new Assertion(obj, flagMsg, ssfi, true).is.numeric;
3134
+ let message = 'A `delta` value is required for `closeTo`';
3135
+ if (delta == undefined)
3136
+ throw new AssertionError(
3137
+ flagMsg ? `${flagMsg}: ${message}` : message,
3138
+ undefined,
3139
+ ssfi
3140
+ );
3141
+ new Assertion(delta, flagMsg, ssfi, true).is.numeric;
3142
+ message = 'A `expected` value is required for `closeTo`';
3143
+ if (expected == undefined)
3144
+ throw new AssertionError(
3145
+ flagMsg ? `${flagMsg}: ${message}` : message,
3146
+ undefined,
3147
+ ssfi
3148
+ );
3149
+ new Assertion(expected, flagMsg, ssfi, true).is.numeric;
3150
+
3151
+ const abs = (x) => (x < 0n ? -x : x);
3152
+
3153
+ // Used to round floating point number precision arithmetics
3154
+ // See: https://stackoverflow.com/a/3644302
3155
+ const strip = (number) => parseFloat(parseFloat(number).toPrecision(12));
3156
+
3157
+ this.assert(
3158
+ strip(abs(obj - expected)) <= delta,
3159
+ 'expected #{this} to be close to ' + expected + ' +/- ' + delta,
3160
+ 'expected #{this} not to be close to ' + expected + ' +/- ' + delta
3161
+ );
3162
+ }
3163
+
3164
+ Assertion.addMethod('closeTo', closeTo);
3165
+ Assertion.addMethod('approximately', closeTo);
3166
+
3167
+ /**
3168
+ * @param {unknown} _subset
3169
+ * @param {unknown} _superset
3170
+ * @param {unknown} cmp
3171
+ * @param {unknown} contains
3172
+ * @param {unknown} ordered
3173
+ * @returns {boolean}
3174
+ */
3175
+ function isSubsetOf(_subset, _superset, cmp, contains, ordered) {
3176
+ let superset = Array.from(_superset);
3177
+ let subset = Array.from(_subset);
3178
+ if (!contains) {
3179
+ if (subset.length !== superset.length) return false;
3180
+ superset = superset.slice();
3181
+ }
3182
+
3183
+ return subset.every(function (elem, idx) {
3184
+ if (ordered) return cmp ? cmp(elem, superset[idx]) : elem === superset[idx];
3185
+
3186
+ if (!cmp) {
3187
+ var matchIdx = superset.indexOf(elem);
3188
+ if (matchIdx === -1) return false;
3189
+
3190
+ // Remove match from superset so not counted twice if duplicate in subset.
3191
+ if (!contains) superset.splice(matchIdx, 1);
3192
+ return true;
3193
+ }
3194
+
3195
+ return superset.some(function (elem2, matchIdx) {
3196
+ if (!cmp(elem, elem2)) return false;
3197
+
3198
+ // Remove match from superset so not counted twice if duplicate in subset.
3199
+ if (!contains) superset.splice(matchIdx, 1);
3200
+ return true;
3201
+ });
3202
+ });
3203
+ }
3204
+
3205
+ /**
3206
+ * ### .members(set[, msg])
3207
+ *
3208
+ * Asserts that the target array has the same members as the given array
3209
+ * `set`.
3210
+ *
3211
+ * expect([1, 2, 3]).to.have.members([2, 1, 3]);
3212
+ * expect([1, 2, 2]).to.have.members([2, 1, 2]);
3213
+ *
3214
+ * By default, members are compared using strict (`===`) equality. Add `.deep`
3215
+ * earlier in the chain to use deep equality instead. See the `deep-eql`
3216
+ * project page for info on the deep equality algorithm:
3217
+ * https://github.com/chaijs/deep-eql.
3218
+ *
3219
+ * // Target array deeply (but not strictly) has member `{a: 1}`
3220
+ * expect([{a: 1}]).to.have.deep.members([{a: 1}]);
3221
+ * expect([{a: 1}]).to.not.have.members([{a: 1}]);
3222
+ *
3223
+ * By default, order doesn't matter. Add `.ordered` earlier in the chain to
3224
+ * require that members appear in the same order.
3225
+ *
3226
+ * expect([1, 2, 3]).to.have.ordered.members([1, 2, 3]);
3227
+ * expect([1, 2, 3]).to.have.members([2, 1, 3])
3228
+ * .but.not.ordered.members([2, 1, 3]);
3229
+ *
3230
+ * By default, both arrays must be the same size. Add `.include` earlier in
3231
+ * the chain to require that the target's members be a superset of the
3232
+ * expected members. Note that duplicates are ignored in the subset when
3233
+ * `.include` is added.
3234
+ *
3235
+ * // Target array is a superset of [1, 2] but not identical
3236
+ * expect([1, 2, 3]).to.include.members([1, 2]);
3237
+ * expect([1, 2, 3]).to.not.have.members([1, 2]);
3238
+ *
3239
+ * // Duplicates in the subset are ignored
3240
+ * expect([1, 2, 3]).to.include.members([1, 2, 2, 2]);
3241
+ *
3242
+ * `.deep`, `.ordered`, and `.include` can all be combined. However, if
3243
+ * `.include` and `.ordered` are combined, the ordering begins at the start of
3244
+ * both arrays.
3245
+ *
3246
+ * expect([{a: 1}, {b: 2}, {c: 3}])
3247
+ * .to.include.deep.ordered.members([{a: 1}, {b: 2}])
3248
+ * .but.not.include.deep.ordered.members([{b: 2}, {c: 3}]);
3249
+ *
3250
+ * Add `.not` earlier in the chain to negate `.members`. However, it's
3251
+ * dangerous to do so. The problem is that it creates uncertain expectations
3252
+ * by asserting that the target array doesn't have all of the same members as
3253
+ * the given array `set` but may or may not have some of them. It's often best
3254
+ * to identify the exact output that's expected, and then write an assertion
3255
+ * that only accepts that exact output.
3256
+ *
3257
+ * expect([1, 2]).to.not.include(3).and.not.include(4); // Recommended
3258
+ * expect([1, 2]).to.not.have.members([3, 4]); // Not recommended
3259
+ *
3260
+ * `.members` accepts an optional `msg` argument which is a custom error
3261
+ * message to show when the assertion fails. The message can also be given as
3262
+ * the second argument to `expect`.
3263
+ *
3264
+ * expect([1, 2]).to.have.members([1, 2, 3], 'nooo why fail??');
3265
+ * expect([1, 2], 'nooo why fail??').to.have.members([1, 2, 3]);
3266
+ *
3267
+ * @name members
3268
+ * @param {Array} set
3269
+ * @param {string} msg _optional_
3270
+ * @namespace BDD
3271
+ * @public
3272
+ */
3273
+ Assertion.addMethod('members', function (subset, msg) {
3274
+ if (msg) flag(this, 'message', msg);
3275
+ var obj = flag(this, 'object'),
3276
+ flagMsg = flag(this, 'message'),
3277
+ ssfi = flag(this, 'ssfi');
3278
+
3279
+ new Assertion(obj, flagMsg, ssfi, true).to.be.iterable;
3280
+ new Assertion(subset, flagMsg, ssfi, true).to.be.iterable;
3281
+
3282
+ var contains = flag(this, 'contains');
3283
+ var ordered = flag(this, 'ordered');
3284
+
3285
+ var subject, failMsg, failNegateMsg;
3286
+
3287
+ if (contains) {
3288
+ subject = ordered ? 'an ordered superset' : 'a superset';
3289
+ failMsg = 'expected #{this} to be ' + subject + ' of #{exp}';
3290
+ failNegateMsg = 'expected #{this} to not be ' + subject + ' of #{exp}';
3291
+ } else {
3292
+ subject = ordered ? 'ordered members' : 'members';
3293
+ failMsg = 'expected #{this} to have the same ' + subject + ' as #{exp}';
3294
+ failNegateMsg =
3295
+ 'expected #{this} to not have the same ' + subject + ' as #{exp}';
3296
+ }
3297
+
3298
+ var cmp = flag(this, 'deep') ? flag(this, 'eql') : undefined;
3299
+
3300
+ this.assert(
3301
+ isSubsetOf(subset, obj, cmp, contains, ordered),
3302
+ failMsg,
3303
+ failNegateMsg,
3304
+ subset,
3305
+ obj,
3306
+ true
3307
+ );
3308
+ });
3309
+
3310
+ /**
3311
+ * ### .iterable
3312
+ *
3313
+ * Asserts that the target is an iterable, which means that it has a iterator.
3314
+ *
3315
+ * expect([1, 2]).to.be.iterable;
3316
+ * expect("foobar").to.be.iterable;
3317
+ *
3318
+ * Add `.not` earlier in the chain to negate `.iterable`.
3319
+ *
3320
+ * expect(1).to.not.be.iterable;
3321
+ * expect(true).to.not.be.iterable;
3322
+ *
3323
+ * A custom error message can be given as the second argument to `expect`.
3324
+ *
3325
+ * expect(1, 'nooo why fail??').to.be.iterable;
3326
+ *
3327
+ * @name iterable
3328
+ * @namespace BDD
3329
+ * @public
3330
+ */
3331
+ Assertion.addProperty('iterable', function (msg) {
3332
+ if (msg) flag(this, 'message', msg);
3333
+ var obj = flag(this, 'object');
3334
+
3335
+ this.assert(
3336
+ obj != undefined && obj[Symbol.iterator],
3337
+ 'expected #{this} to be an iterable',
3338
+ 'expected #{this} to not be an iterable',
3339
+ obj
3340
+ );
3341
+ });
3342
+
3343
+ /**
3344
+ * ### .oneOf(list[, msg])
3345
+ *
3346
+ * Asserts that the target is a member of the given array `list`. However,
3347
+ * it's often best to assert that the target is equal to its expected value.
3348
+ *
3349
+ * expect(1).to.equal(1); // Recommended
3350
+ * expect(1).to.be.oneOf([1, 2, 3]); // Not recommended
3351
+ *
3352
+ * Comparisons are performed using strict (`===`) equality.
3353
+ *
3354
+ * Add `.not` earlier in the chain to negate `.oneOf`.
3355
+ *
3356
+ * expect(1).to.equal(1); // Recommended
3357
+ * expect(1).to.not.be.oneOf([2, 3, 4]); // Not recommended
3358
+ *
3359
+ * It can also be chained with `.contain` or `.include`, which will work with
3360
+ * both arrays and strings:
3361
+ *
3362
+ * expect('Today is sunny').to.contain.oneOf(['sunny', 'cloudy'])
3363
+ * expect('Today is rainy').to.not.contain.oneOf(['sunny', 'cloudy'])
3364
+ * expect([1,2,3]).to.contain.oneOf([3,4,5])
3365
+ * expect([1,2,3]).to.not.contain.oneOf([4,5,6])
3366
+ *
3367
+ * `.oneOf` accepts an optional `msg` argument which is a custom error message
3368
+ * to show when the assertion fails. The message can also be given as the
3369
+ * second argument to `expect`.
3370
+ *
3371
+ * expect(1).to.be.oneOf([2, 3, 4], 'nooo why fail??');
3372
+ * expect(1, 'nooo why fail??').to.be.oneOf([2, 3, 4]);
3373
+ *
3374
+ * @name oneOf
3375
+ * @param {Array<*>} list
3376
+ * @param {string} msg _optional_
3377
+ * @namespace BDD
3378
+ * @public
3379
+ */
3380
+ function oneOf(list, msg) {
3381
+ if (msg) flag(this, 'message', msg);
3382
+ var expected = flag(this, 'object'),
3383
+ flagMsg = flag(this, 'message'),
3384
+ ssfi = flag(this, 'ssfi'),
3385
+ contains = flag(this, 'contains'),
3386
+ isDeep = flag(this, 'deep'),
3387
+ eql = flag(this, 'eql');
3388
+ new Assertion(list, flagMsg, ssfi, true).to.be.an('array');
3389
+
3390
+ if (contains) {
3391
+ this.assert(
3392
+ list.some(function (possibility) {
3393
+ return expected.indexOf(possibility) > -1;
3394
+ }),
3395
+ 'expected #{this} to contain one of #{exp}',
3396
+ 'expected #{this} to not contain one of #{exp}',
3397
+ list,
3398
+ expected
3399
+ );
3400
+ } else {
3401
+ if (isDeep) {
3402
+ this.assert(
3403
+ list.some(function (possibility) {
3404
+ return eql(expected, possibility);
3405
+ }),
3406
+ 'expected #{this} to deeply equal one of #{exp}',
3407
+ 'expected #{this} to deeply equal one of #{exp}',
3408
+ list,
3409
+ expected
3410
+ );
3411
+ } else {
3412
+ this.assert(
3413
+ list.indexOf(expected) > -1,
3414
+ 'expected #{this} to be one of #{exp}',
3415
+ 'expected #{this} to not be one of #{exp}',
3416
+ list,
3417
+ expected
3418
+ );
3419
+ }
3420
+ }
3421
+ }
3422
+
3423
+ Assertion.addMethod('oneOf', oneOf);
3424
+
3425
+ /**
3426
+ * ### .change(subject[, prop[, msg]])
3427
+ *
3428
+ * When one argument is provided, `.change` asserts that the given function
3429
+ * `subject` returns a different value when it's invoked before the target
3430
+ * function compared to when it's invoked afterward. However, it's often best
3431
+ * to assert that `subject` is equal to its expected value.
3432
+ *
3433
+ * var dots = ''
3434
+ * , addDot = function () { dots += '.'; }
3435
+ * , getDots = function () { return dots; };
3436
+ *
3437
+ * // Recommended
3438
+ * expect(getDots()).to.equal('');
3439
+ * addDot();
3440
+ * expect(getDots()).to.equal('.');
3441
+ *
3442
+ * // Not recommended
3443
+ * expect(addDot).to.change(getDots);
3444
+ *
3445
+ * When two arguments are provided, `.change` asserts that the value of the
3446
+ * given object `subject`'s `prop` property is different before invoking the
3447
+ * target function compared to afterward.
3448
+ *
3449
+ * var myObj = {dots: ''}
3450
+ * , addDot = function () { myObj.dots += '.'; };
3451
+ *
3452
+ * // Recommended
3453
+ * expect(myObj).to.have.property('dots', '');
3454
+ * addDot();
3455
+ * expect(myObj).to.have.property('dots', '.');
3456
+ *
3457
+ * // Not recommended
3458
+ * expect(addDot).to.change(myObj, 'dots');
3459
+ *
3460
+ * Strict (`===`) equality is used to compare before and after values.
3461
+ *
3462
+ * Add `.not` earlier in the chain to negate `.change`.
3463
+ *
3464
+ * var dots = ''
3465
+ * , noop = function () {}
3466
+ * , getDots = function () { return dots; };
3467
+ *
3468
+ * expect(noop).to.not.change(getDots);
3469
+ *
3470
+ * var myObj = {dots: ''}
3471
+ * , noop = function () {};
3472
+ *
3473
+ * expect(noop).to.not.change(myObj, 'dots');
3474
+ *
3475
+ * `.change` accepts an optional `msg` argument which is a custom error
3476
+ * message to show when the assertion fails. The message can also be given as
3477
+ * the second argument to `expect`. When not providing two arguments, always
3478
+ * use the second form.
3479
+ *
3480
+ * var myObj = {dots: ''}
3481
+ * , addDot = function () { myObj.dots += '.'; };
3482
+ *
3483
+ * expect(addDot).to.not.change(myObj, 'dots', 'nooo why fail??');
3484
+ *
3485
+ * var dots = ''
3486
+ * , addDot = function () { dots += '.'; }
3487
+ * , getDots = function () { return dots; };
3488
+ *
3489
+ * expect(addDot, 'nooo why fail??').to.not.change(getDots);
3490
+ *
3491
+ * `.change` also causes all `.by` assertions that follow in the chain to
3492
+ * assert how much a numeric subject was increased or decreased by. However,
3493
+ * it's dangerous to use `.change.by`. The problem is that it creates
3494
+ * uncertain expectations by asserting that the subject either increases by
3495
+ * the given delta, or that it decreases by the given delta. It's often best
3496
+ * to identify the exact output that's expected, and then write an assertion
3497
+ * that only accepts that exact output.
3498
+ *
3499
+ * var myObj = {val: 1}
3500
+ * , addTwo = function () { myObj.val += 2; }
3501
+ * , subtractTwo = function () { myObj.val -= 2; };
3502
+ *
3503
+ * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended
3504
+ * expect(addTwo).to.change(myObj, 'val').by(2); // Not recommended
3505
+ *
3506
+ * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended
3507
+ * expect(subtractTwo).to.change(myObj, 'val').by(2); // Not recommended
3508
+ *
3509
+ * The alias `.changes` can be used interchangeably with `.change`.
3510
+ *
3511
+ * @name change
3512
+ * @alias changes
3513
+ * @param {string} subject
3514
+ * @param {string} prop name _optional_
3515
+ * @param {string} msg _optional_
3516
+ * @namespace BDD
3517
+ * @public
3518
+ */
3519
+ function assertChanges(subject, prop, msg) {
3520
+ if (msg) flag(this, 'message', msg);
3521
+ var fn = flag(this, 'object'),
3522
+ flagMsg = flag(this, 'message'),
3523
+ ssfi = flag(this, 'ssfi');
3524
+ new Assertion(fn, flagMsg, ssfi, true).is.a('function');
3525
+
3526
+ var initial;
3527
+ if (!prop) {
3528
+ new Assertion(subject, flagMsg, ssfi, true).is.a('function');
3529
+ initial = subject();
3530
+ } else {
3531
+ new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);
3532
+ initial = subject[prop];
3533
+ }
3534
+
3535
+ fn();
3536
+
3537
+ var final = prop === undefined || prop === null ? subject() : subject[prop];
3538
+ var msgObj = prop === undefined || prop === null ? initial : '.' + prop;
3539
+
3540
+ // This gets flagged because of the .by(delta) assertion
3541
+ flag(this, 'deltaMsgObj', msgObj);
3542
+ flag(this, 'initialDeltaValue', initial);
3543
+ flag(this, 'finalDeltaValue', final);
3544
+ flag(this, 'deltaBehavior', 'change');
3545
+ flag(this, 'realDelta', final !== initial);
3546
+
3547
+ this.assert(
3548
+ initial !== final,
3549
+ 'expected ' + msgObj + ' to change',
3550
+ 'expected ' + msgObj + ' to not change'
3551
+ );
3552
+ }
3553
+
3554
+ Assertion.addMethod('change', assertChanges);
3555
+ Assertion.addMethod('changes', assertChanges);
3556
+
3557
+ /**
3558
+ * ### .increase(subject[, prop[, msg]])
3559
+ *
3560
+ * When one argument is provided, `.increase` asserts that the given function
3561
+ * `subject` returns a greater number when it's invoked after invoking the
3562
+ * target function compared to when it's invoked beforehand. `.increase` also
3563
+ * causes all `.by` assertions that follow in the chain to assert how much
3564
+ * greater of a number is returned. It's often best to assert that the return
3565
+ * value increased by the expected amount, rather than asserting it increased
3566
+ * by any amount.
3567
+ *
3568
+ * var val = 1
3569
+ * , addTwo = function () { val += 2; }
3570
+ * , getVal = function () { return val; };
3571
+ *
3572
+ * expect(addTwo).to.increase(getVal).by(2); // Recommended
3573
+ * expect(addTwo).to.increase(getVal); // Not recommended
3574
+ *
3575
+ * When two arguments are provided, `.increase` asserts that the value of the
3576
+ * given object `subject`'s `prop` property is greater after invoking the
3577
+ * target function compared to beforehand.
3578
+ *
3579
+ * var myObj = {val: 1}
3580
+ * , addTwo = function () { myObj.val += 2; };
3581
+ *
3582
+ * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended
3583
+ * expect(addTwo).to.increase(myObj, 'val'); // Not recommended
3584
+ *
3585
+ * Add `.not` earlier in the chain to negate `.increase`. However, it's
3586
+ * dangerous to do so. The problem is that it creates uncertain expectations
3587
+ * by asserting that the subject either decreases, or that it stays the same.
3588
+ * It's often best to identify the exact output that's expected, and then
3589
+ * write an assertion that only accepts that exact output.
3590
+ *
3591
+ * When the subject is expected to decrease, it's often best to assert that it
3592
+ * decreased by the expected amount.
3593
+ *
3594
+ * var myObj = {val: 1}
3595
+ * , subtractTwo = function () { myObj.val -= 2; };
3596
+ *
3597
+ * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended
3598
+ * expect(subtractTwo).to.not.increase(myObj, 'val'); // Not recommended
3599
+ *
3600
+ * When the subject is expected to stay the same, it's often best to assert
3601
+ * exactly that.
3602
+ *
3603
+ * var myObj = {val: 1}
3604
+ * , noop = function () {};
3605
+ *
3606
+ * expect(noop).to.not.change(myObj, 'val'); // Recommended
3607
+ * expect(noop).to.not.increase(myObj, 'val'); // Not recommended
3608
+ *
3609
+ * `.increase` accepts an optional `msg` argument which is a custom error
3610
+ * message to show when the assertion fails. The message can also be given as
3611
+ * the second argument to `expect`. When not providing two arguments, always
3612
+ * use the second form.
3613
+ *
3614
+ * var myObj = {val: 1}
3615
+ * , noop = function () {};
3616
+ *
3617
+ * expect(noop).to.increase(myObj, 'val', 'nooo why fail??');
3618
+ *
3619
+ * var val = 1
3620
+ * , noop = function () {}
3621
+ * , getVal = function () { return val; };
3622
+ *
3623
+ * expect(noop, 'nooo why fail??').to.increase(getVal);
3624
+ *
3625
+ * The alias `.increases` can be used interchangeably with `.increase`.
3626
+ *
3627
+ * @name increase
3628
+ * @alias increases
3629
+ * @param {string | Function} subject
3630
+ * @param {string} prop name _optional_
3631
+ * @param {string} msg _optional_
3632
+ * @namespace BDD
3633
+ * @public
3634
+ */
3635
+ function assertIncreases(subject, prop, msg) {
3636
+ if (msg) flag(this, 'message', msg);
3637
+ var fn = flag(this, 'object'),
3638
+ flagMsg = flag(this, 'message'),
3639
+ ssfi = flag(this, 'ssfi');
3640
+ new Assertion(fn, flagMsg, ssfi, true).is.a('function');
3641
+
3642
+ var initial;
3643
+ if (!prop) {
3644
+ new Assertion(subject, flagMsg, ssfi, true).is.a('function');
3645
+ initial = subject();
3646
+ } else {
3647
+ new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);
3648
+ initial = subject[prop];
3649
+ }
3650
+
3651
+ // Make sure that the target is a number
3652
+ new Assertion(initial, flagMsg, ssfi, true).is.a('number');
3653
+
3654
+ fn();
3655
+
3656
+ var final = prop === undefined || prop === null ? subject() : subject[prop];
3657
+ var msgObj = prop === undefined || prop === null ? initial : '.' + prop;
3658
+
3659
+ flag(this, 'deltaMsgObj', msgObj);
3660
+ flag(this, 'initialDeltaValue', initial);
3661
+ flag(this, 'finalDeltaValue', final);
3662
+ flag(this, 'deltaBehavior', 'increase');
3663
+ flag(this, 'realDelta', final - initial);
3664
+
3665
+ this.assert(
3666
+ final - initial > 0,
3667
+ 'expected ' + msgObj + ' to increase',
3668
+ 'expected ' + msgObj + ' to not increase'
3669
+ );
3670
+ }
3671
+
3672
+ Assertion.addMethod('increase', assertIncreases);
3673
+ Assertion.addMethod('increases', assertIncreases);
3674
+
3675
+ /**
3676
+ * ### .decrease(subject[, prop[, msg]])
3677
+ *
3678
+ * When one argument is provided, `.decrease` asserts that the given function
3679
+ * `subject` returns a lesser number when it's invoked after invoking the
3680
+ * target function compared to when it's invoked beforehand. `.decrease` also
3681
+ * causes all `.by` assertions that follow in the chain to assert how much
3682
+ * lesser of a number is returned. It's often best to assert that the return
3683
+ * value decreased by the expected amount, rather than asserting it decreased
3684
+ * by any amount.
3685
+ *
3686
+ * var val = 1
3687
+ * , subtractTwo = function () { val -= 2; }
3688
+ * , getVal = function () { return val; };
3689
+ *
3690
+ * expect(subtractTwo).to.decrease(getVal).by(2); // Recommended
3691
+ * expect(subtractTwo).to.decrease(getVal); // Not recommended
3692
+ *
3693
+ * When two arguments are provided, `.decrease` asserts that the value of the
3694
+ * given object `subject`'s `prop` property is lesser after invoking the
3695
+ * target function compared to beforehand.
3696
+ *
3697
+ * var myObj = {val: 1}
3698
+ * , subtractTwo = function () { myObj.val -= 2; };
3699
+ *
3700
+ * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended
3701
+ * expect(subtractTwo).to.decrease(myObj, 'val'); // Not recommended
3702
+ *
3703
+ * Add `.not` earlier in the chain to negate `.decrease`. However, it's
3704
+ * dangerous to do so. The problem is that it creates uncertain expectations
3705
+ * by asserting that the subject either increases, or that it stays the same.
3706
+ * It's often best to identify the exact output that's expected, and then
3707
+ * write an assertion that only accepts that exact output.
3708
+ *
3709
+ * When the subject is expected to increase, it's often best to assert that it
3710
+ * increased by the expected amount.
3711
+ *
3712
+ * var myObj = {val: 1}
3713
+ * , addTwo = function () { myObj.val += 2; };
3714
+ *
3715
+ * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended
3716
+ * expect(addTwo).to.not.decrease(myObj, 'val'); // Not recommended
3717
+ *
3718
+ * When the subject is expected to stay the same, it's often best to assert
3719
+ * exactly that.
3720
+ *
3721
+ * var myObj = {val: 1}
3722
+ * , noop = function () {};
3723
+ *
3724
+ * expect(noop).to.not.change(myObj, 'val'); // Recommended
3725
+ * expect(noop).to.not.decrease(myObj, 'val'); // Not recommended
3726
+ *
3727
+ * `.decrease` accepts an optional `msg` argument which is a custom error
3728
+ * message to show when the assertion fails. The message can also be given as
3729
+ * the second argument to `expect`. When not providing two arguments, always
3730
+ * use the second form.
3731
+ *
3732
+ * var myObj = {val: 1}
3733
+ * , noop = function () {};
3734
+ *
3735
+ * expect(noop).to.decrease(myObj, 'val', 'nooo why fail??');
3736
+ *
3737
+ * var val = 1
3738
+ * , noop = function () {}
3739
+ * , getVal = function () { return val; };
3740
+ *
3741
+ * expect(noop, 'nooo why fail??').to.decrease(getVal);
3742
+ *
3743
+ * The alias `.decreases` can be used interchangeably with `.decrease`.
3744
+ *
3745
+ * @name decrease
3746
+ * @alias decreases
3747
+ * @param {string | Function} subject
3748
+ * @param {string} prop name _optional_
3749
+ * @param {string} msg _optional_
3750
+ * @namespace BDD
3751
+ * @public
3752
+ */
3753
+ function assertDecreases(subject, prop, msg) {
3754
+ if (msg) flag(this, 'message', msg);
3755
+ var fn = flag(this, 'object'),
3756
+ flagMsg = flag(this, 'message'),
3757
+ ssfi = flag(this, 'ssfi');
3758
+ new Assertion(fn, flagMsg, ssfi, true).is.a('function');
3759
+
3760
+ var initial;
3761
+ if (!prop) {
3762
+ new Assertion(subject, flagMsg, ssfi, true).is.a('function');
3763
+ initial = subject();
3764
+ } else {
3765
+ new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);
3766
+ initial = subject[prop];
3767
+ }
3768
+
3769
+ // Make sure that the target is a number
3770
+ new Assertion(initial, flagMsg, ssfi, true).is.a('number');
3771
+
3772
+ fn();
3773
+
3774
+ var final = prop === undefined || prop === null ? subject() : subject[prop];
3775
+ var msgObj = prop === undefined || prop === null ? initial : '.' + prop;
3776
+
3777
+ flag(this, 'deltaMsgObj', msgObj);
3778
+ flag(this, 'initialDeltaValue', initial);
3779
+ flag(this, 'finalDeltaValue', final);
3780
+ flag(this, 'deltaBehavior', 'decrease');
3781
+ flag(this, 'realDelta', initial - final);
3782
+
3783
+ this.assert(
3784
+ final - initial < 0,
3785
+ 'expected ' + msgObj + ' to decrease',
3786
+ 'expected ' + msgObj + ' to not decrease'
3787
+ );
3788
+ }
3789
+
3790
+ Assertion.addMethod('decrease', assertDecreases);
3791
+ Assertion.addMethod('decreases', assertDecreases);
3792
+
3793
+ /**
3794
+ * ### .by(delta[, msg])
3795
+ *
3796
+ * When following an `.increase` assertion in the chain, `.by` asserts that
3797
+ * the subject of the `.increase` assertion increased by the given `delta`.
3798
+ *
3799
+ * var myObj = {val: 1}
3800
+ * , addTwo = function () { myObj.val += 2; };
3801
+ *
3802
+ * expect(addTwo).to.increase(myObj, 'val').by(2);
3803
+ *
3804
+ * When following a `.decrease` assertion in the chain, `.by` asserts that the
3805
+ * subject of the `.decrease` assertion decreased by the given `delta`.
3806
+ *
3807
+ * var myObj = {val: 1}
3808
+ * , subtractTwo = function () { myObj.val -= 2; };
3809
+ *
3810
+ * expect(subtractTwo).to.decrease(myObj, 'val').by(2);
3811
+ *
3812
+ * When following a `.change` assertion in the chain, `.by` asserts that the
3813
+ * subject of the `.change` assertion either increased or decreased by the
3814
+ * given `delta`. However, it's dangerous to use `.change.by`. The problem is
3815
+ * that it creates uncertain expectations. It's often best to identify the
3816
+ * exact output that's expected, and then write an assertion that only accepts
3817
+ * that exact output.
3818
+ *
3819
+ * var myObj = {val: 1}
3820
+ * , addTwo = function () { myObj.val += 2; }
3821
+ * , subtractTwo = function () { myObj.val -= 2; };
3822
+ *
3823
+ * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended
3824
+ * expect(addTwo).to.change(myObj, 'val').by(2); // Not recommended
3825
+ *
3826
+ * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended
3827
+ * expect(subtractTwo).to.change(myObj, 'val').by(2); // Not recommended
3828
+ *
3829
+ * Add `.not` earlier in the chain to negate `.by`. However, it's often best
3830
+ * to assert that the subject changed by its expected delta, rather than
3831
+ * asserting that it didn't change by one of countless unexpected deltas.
3832
+ *
3833
+ * var myObj = {val: 1}
3834
+ * , addTwo = function () { myObj.val += 2; };
3835
+ *
3836
+ * // Recommended
3837
+ * expect(addTwo).to.increase(myObj, 'val').by(2);
3838
+ *
3839
+ * // Not recommended
3840
+ * expect(addTwo).to.increase(myObj, 'val').but.not.by(3);
3841
+ *
3842
+ * `.by` accepts an optional `msg` argument which is a custom error message to
3843
+ * show when the assertion fails. The message can also be given as the second
3844
+ * argument to `expect`.
3845
+ *
3846
+ * var myObj = {val: 1}
3847
+ * , addTwo = function () { myObj.val += 2; };
3848
+ *
3849
+ * expect(addTwo).to.increase(myObj, 'val').by(3, 'nooo why fail??');
3850
+ * expect(addTwo, 'nooo why fail??').to.increase(myObj, 'val').by(3);
3851
+ *
3852
+ * @name by
3853
+ * @param {number} delta
3854
+ * @param {string} msg _optional_
3855
+ * @namespace BDD
3856
+ * @public
3857
+ */
3858
+ function assertDelta(delta, msg) {
3859
+ if (msg) flag(this, 'message', msg);
3860
+
3861
+ var msgObj = flag(this, 'deltaMsgObj');
3862
+ var initial = flag(this, 'initialDeltaValue');
3863
+ var final = flag(this, 'finalDeltaValue');
3864
+ var behavior = flag(this, 'deltaBehavior');
3865
+ var realDelta = flag(this, 'realDelta');
3866
+
3867
+ var expression;
3868
+ if (behavior === 'change') {
3869
+ expression = Math.abs(final - initial) === Math.abs(delta);
3870
+ } else {
3871
+ expression = realDelta === Math.abs(delta);
3872
+ }
3873
+
3874
+ this.assert(
3875
+ expression,
3876
+ 'expected ' + msgObj + ' to ' + behavior + ' by ' + delta,
3877
+ 'expected ' + msgObj + ' to not ' + behavior + ' by ' + delta
3878
+ );
3879
+ }
3880
+
3881
+ Assertion.addMethod('by', assertDelta);
3882
+
3883
+ /**
3884
+ * ### .extensible
3885
+ *
3886
+ * Asserts that the target is extensible, which means that new properties can
3887
+ * be added to it. Primitives are never extensible.
3888
+ *
3889
+ * expect({a: 1}).to.be.extensible;
3890
+ *
3891
+ * Add `.not` earlier in the chain to negate `.extensible`.
3892
+ *
3893
+ * var nonExtensibleObject = Object.preventExtensions({})
3894
+ * , sealedObject = Object.seal({})
3895
+ * , frozenObject = Object.freeze({});
3896
+ *
3897
+ * expect(nonExtensibleObject).to.not.be.extensible;
3898
+ * expect(sealedObject).to.not.be.extensible;
3899
+ * expect(frozenObject).to.not.be.extensible;
3900
+ * expect(1).to.not.be.extensible;
3901
+ *
3902
+ * A custom error message can be given as the second argument to `expect`.
3903
+ *
3904
+ * expect(1, 'nooo why fail??').to.be.extensible;
3905
+ *
3906
+ * @name extensible
3907
+ * @namespace BDD
3908
+ * @public
3909
+ */
3910
+ Assertion.addProperty('extensible', function () {
3911
+ var obj = flag(this, 'object');
3912
+
3913
+ // In ES5, if the argument to this method is a primitive, then it will cause a TypeError.
3914
+ // In ES6, a non-object argument will be treated as if it was a non-extensible ordinary object, simply return false.
3915
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible
3916
+ // The following provides ES6 behavior for ES5 environments.
3917
+
3918
+ var isExtensible = obj === Object(obj) && Object.isExtensible(obj);
3919
+
3920
+ this.assert(
3921
+ isExtensible,
3922
+ 'expected #{this} to be extensible',
3923
+ 'expected #{this} to not be extensible'
3924
+ );
3925
+ });
3926
+
3927
+ /**
3928
+ * ### .sealed
3929
+ *
3930
+ * Asserts that the target is sealed, which means that new properties can't be
3931
+ * added to it, and its existing properties can't be reconfigured or deleted.
3932
+ * However, it's possible that its existing properties can still be reassigned
3933
+ * to different values. Primitives are always sealed.
3934
+ *
3935
+ * var sealedObject = Object.seal({});
3936
+ * var frozenObject = Object.freeze({});
3937
+ *
3938
+ * expect(sealedObject).to.be.sealed;
3939
+ * expect(frozenObject).to.be.sealed;
3940
+ * expect(1).to.be.sealed;
3941
+ *
3942
+ * Add `.not` earlier in the chain to negate `.sealed`.
3943
+ *
3944
+ * expect({a: 1}).to.not.be.sealed;
3945
+ *
3946
+ * A custom error message can be given as the second argument to `expect`.
3947
+ *
3948
+ * expect({a: 1}, 'nooo why fail??').to.be.sealed;
3949
+ *
3950
+ * @name sealed
3951
+ * @namespace BDD
3952
+ * @public
3953
+ */
3954
+ Assertion.addProperty('sealed', function () {
3955
+ var obj = flag(this, 'object');
3956
+
3957
+ // In ES5, if the argument to this method is a primitive, then it will cause a TypeError.
3958
+ // In ES6, a non-object argument will be treated as if it was a sealed ordinary object, simply return true.
3959
+ // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed
3960
+ // The following provides ES6 behavior for ES5 environments.
3961
+
3962
+ var isSealed = obj === Object(obj) ? Object.isSealed(obj) : true;
3963
+
3964
+ this.assert(
3965
+ isSealed,
3966
+ 'expected #{this} to be sealed',
3967
+ 'expected #{this} to not be sealed'
3968
+ );
3969
+ });
3970
+
3971
+ /**
3972
+ * ### .frozen
3973
+ *
3974
+ * Asserts that the target is frozen, which means that new properties can't be
3975
+ * added to it, and its existing properties can't be reassigned to different
3976
+ * values, reconfigured, or deleted. Primitives are always frozen.
3977
+ *
3978
+ * var frozenObject = Object.freeze({});
3979
+ *
3980
+ * expect(frozenObject).to.be.frozen;
3981
+ * expect(1).to.be.frozen;
3982
+ *
3983
+ * Add `.not` earlier in the chain to negate `.frozen`.
3984
+ *
3985
+ * expect({a: 1}).to.not.be.frozen;
3986
+ *
3987
+ * A custom error message can be given as the second argument to `expect`.
3988
+ *
3989
+ * expect({a: 1}, 'nooo why fail??').to.be.frozen;
3990
+ *
3991
+ * @name frozen
3992
+ * @namespace BDD
3993
+ * @public
3994
+ */
3995
+ Assertion.addProperty('frozen', function () {
3996
+ var obj = flag(this, 'object');
3997
+
3998
+ // In ES5, if the argument to this method is a primitive, then it will cause a TypeError.
3999
+ // In ES6, a non-object argument will be treated as if it was a frozen ordinary object, simply return true.
4000
+ // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen
4001
+ // The following provides ES6 behavior for ES5 environments.
4002
+
4003
+ var isFrozen = obj === Object(obj) ? Object.isFrozen(obj) : true;
4004
+
4005
+ this.assert(
4006
+ isFrozen,
4007
+ 'expected #{this} to be frozen',
4008
+ 'expected #{this} to not be frozen'
4009
+ );
4010
+ });
4011
+
4012
+ /**
4013
+ * ### .finite
4014
+ *
4015
+ * Asserts that the target is a number, and isn't `NaN` or positive/negative
4016
+ * `Infinity`.
4017
+ *
4018
+ * expect(1).to.be.finite;
4019
+ *
4020
+ * Add `.not` earlier in the chain to negate `.finite`. However, it's
4021
+ * dangerous to do so. The problem is that it creates uncertain expectations
4022
+ * by asserting that the subject either isn't a number, or that it's `NaN`, or
4023
+ * that it's positive `Infinity`, or that it's negative `Infinity`. It's often
4024
+ * best to identify the exact output that's expected, and then write an
4025
+ * assertion that only accepts that exact output.
4026
+ *
4027
+ * When the target isn't expected to be a number, it's often best to assert
4028
+ * that it's the expected type, rather than asserting that it isn't one of
4029
+ * many unexpected types.
4030
+ *
4031
+ * expect('foo').to.be.a('string'); // Recommended
4032
+ * expect('foo').to.not.be.finite; // Not recommended
4033
+ *
4034
+ * When the target is expected to be `NaN`, it's often best to assert exactly
4035
+ * that.
4036
+ *
4037
+ * expect(NaN).to.be.NaN; // Recommended
4038
+ * expect(NaN).to.not.be.finite; // Not recommended
4039
+ *
4040
+ * When the target is expected to be positive infinity, it's often best to
4041
+ * assert exactly that.
4042
+ *
4043
+ * expect(Infinity).to.equal(Infinity); // Recommended
4044
+ * expect(Infinity).to.not.be.finite; // Not recommended
4045
+ *
4046
+ * When the target is expected to be negative infinity, it's often best to
4047
+ * assert exactly that.
4048
+ *
4049
+ * expect(-Infinity).to.equal(-Infinity); // Recommended
4050
+ * expect(-Infinity).to.not.be.finite; // Not recommended
4051
+ *
4052
+ * A custom error message can be given as the second argument to `expect`.
4053
+ *
4054
+ * expect('foo', 'nooo why fail??').to.be.finite;
4055
+ *
4056
+ * @name finite
4057
+ * @namespace BDD
4058
+ * @public
4059
+ */
4060
+ Assertion.addProperty('finite', function (_msg) {
4061
+ var obj = flag(this, 'object');
4062
+
4063
+ this.assert(
4064
+ typeof obj === 'number' && isFinite(obj),
4065
+ 'expected #{this} to be a finite number',
4066
+ 'expected #{this} to not be a finite number'
4067
+ );
4068
+ });
4069
+
4070
+ /**
4071
+ * A subset-aware compare function
4072
+ *
4073
+ * @param {unknown} expected
4074
+ * @param {unknown} actual
4075
+ * @returns {boolean}
4076
+ */
4077
+ function compareSubset(expected, actual) {
4078
+ if (expected === actual) {
4079
+ return true;
4080
+ }
4081
+ if (typeof actual !== typeof expected) {
4082
+ return false;
4083
+ }
4084
+ if (typeof expected !== 'object' || expected === null) {
4085
+ return expected === actual;
4086
+ }
4087
+ if (!actual) {
4088
+ return false;
4089
+ }
4090
+
4091
+ if (Array.isArray(expected)) {
4092
+ if (!Array.isArray(actual)) {
4093
+ return false;
4094
+ }
4095
+ return expected.every(function (exp) {
4096
+ return actual.some(function (act) {
4097
+ return compareSubset(exp, act);
4098
+ });
4099
+ });
4100
+ }
4101
+
4102
+ if (expected instanceof Date) {
4103
+ if (actual instanceof Date) {
4104
+ return expected.getTime() === actual.getTime();
4105
+ } else {
4106
+ return false;
4107
+ }
4108
+ }
4109
+
4110
+ return Object.keys(expected).every(function (key) {
4111
+ var expectedValue = expected[key];
4112
+ var actualValue = actual[key];
4113
+ if (
4114
+ typeof expectedValue === 'object' &&
4115
+ expectedValue !== null &&
4116
+ actualValue !== null
4117
+ ) {
4118
+ return compareSubset(expectedValue, actualValue);
4119
+ }
4120
+ if (typeof expectedValue === 'function') {
4121
+ return expectedValue(actualValue);
4122
+ }
4123
+ return actualValue === expectedValue;
4124
+ });
4125
+ }
4126
+
4127
+ /**
4128
+ * ### .containSubset
4129
+ *
4130
+ * Asserts that the target primitive/object/array structure deeply contains all provided fields
4131
+ * at the same key/depth as the provided structure.
4132
+ *
4133
+ * When comparing arrays, the target must contain the subset of at least one of each object/value in the subset array.
4134
+ * Order does not matter.
4135
+ *
4136
+ * expect({name: {first: "John", last: "Smith"}}).to.containSubset({name: {first: "John"}});
4137
+ *
4138
+ * Add `.not` earlier in the chain to negate the assertion. This will cause the assertion to fail
4139
+ * only if the target DOES contains the provided data at the expected keys/depths.
4140
+ *
4141
+ * @name containSubset
4142
+ * @namespace BDD
4143
+ * @public
4144
+ */
4145
+ Assertion.addMethod('containSubset', function (expected) {
4146
+ const actual = _.flag(this, 'object');
4147
+ const showDiff = config.showDiff;
4148
+
4149
+ this.assert(
4150
+ compareSubset(expected, actual),
4151
+ 'expected #{act} to contain subset #{exp}',
4152
+ 'expected #{act} to not contain subset #{exp}',
4153
+ expected,
4154
+ actual,
4155
+ showDiff
4156
+ );
4157
+ });