testeranto 0.200.1 → 0.203.0

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 (740) hide show
  1. package/README.md +49 -1
  2. package/UX/chache/index.md +11 -0
  3. package/design-editor/DesignEditor.tsx +40 -241
  4. package/dist/prebuild/App.css +171 -120
  5. package/dist/prebuild/App.js +47117 -11727
  6. package/dist/prebuild/testeranto.mjs +5048 -2578
  7. package/example/Calculator.go +63 -0
  8. package/example/Calculator.golingvu.adapter.go +81 -0
  9. package/example/Calculator.golingvu.go +67 -0
  10. package/example/Calculator.golingvu.implementation.go +95 -0
  11. package/example/Calculator.golingvu.specification.go +68 -0
  12. package/example/Calculator.pitono.adapter.py +68 -0
  13. package/example/Calculator.pitono.implementation.py +30 -0
  14. package/example/Calculator.pitono.specification.py +154 -0
  15. package/example/Calculator.pitono.test.py +47 -0
  16. package/example/Calculator.py +93 -0
  17. package/example/Calculator.test.adapter.ts +86 -0
  18. package/example/Calculator.test.implementation.ts +82 -0
  19. package/example/Calculator.test.specification.ts +213 -0
  20. package/example/Calculator.test.ts +13 -0
  21. package/example/Calculator.test.types.ts +50 -0
  22. package/example/Calculator.ts +130 -0
  23. package/example/README.md +1 -0
  24. package/example/base_suite_test.go +51 -0
  25. package/example/cmd/main.go +16 -0
  26. package/example/go.mod +9 -0
  27. package/example/main +0 -0
  28. package/example/test_example.py +143 -74
  29. package/example/testeranto/bundles/golang/core/Calculator.golingvu.go +53 -0
  30. package/example/testeranto/metafiles/golang/core.json +198 -0
  31. package/git-integration-plan.md +395 -0
  32. package/go.mod +3 -1
  33. package/golingvu.tmp.txt +68 -0
  34. package/log.txt +85 -0
  35. package/package.json +67 -46
  36. package/scripts/build-example.ts +245 -0
  37. package/src/App.tsx +226 -25
  38. package/src/Helpo.tsx +89 -0
  39. package/src/PM/PM_WithBuild.ts +183 -0
  40. package/src/PM/PM_WithEslintAndTsc.ts +109 -86
  41. package/src/PM/PM_WithGit.ts +632 -0
  42. package/src/PM/PM_WithHelpo.ts +341 -0
  43. package/src/PM/PM_WithProcesses.ts +900 -0
  44. package/src/PM/PM_WithWebSocket.ts +839 -0
  45. package/src/PM/base.ts +63 -1
  46. package/src/PM/golingvuBuild.ts +56 -0
  47. package/src/PM/index.ts +8 -5
  48. package/src/PM/main.ts +735 -1981
  49. package/src/PM/node.ts +18 -18
  50. package/src/PM/pitonoBuild.ts +56 -0
  51. package/src/PM/pure.ts +5 -13
  52. package/src/PM/types.ts +145 -0
  53. package/src/PM/utils.ts +262 -0
  54. package/src/PM/web.ts +8 -8
  55. package/src/README.md +122 -0
  56. package/src/ReportServer.ts +0 -12
  57. package/src/ReportServerLib.ts +0 -147
  58. package/src/Types.ts +1 -0
  59. package/src/app.scss +92 -140
  60. package/src/components/pure/AppFrame.tsx +354 -78
  61. package/src/components/pure/ArtifactTree.tsx +82 -0
  62. package/src/components/pure/BuildLogViewer.tsx +168 -0
  63. package/src/components/pure/DebugEnv.tsx +30 -0
  64. package/src/components/pure/FileTree.tsx +58 -0
  65. package/src/components/pure/FileTreeItem.tsx +49 -0
  66. package/src/components/pure/GitHubLoginButton.tsx +31 -0
  67. package/src/components/pure/GitIntegrationView.tsx +732 -0
  68. package/src/components/pure/HelpoChatDrawer.tsx +222 -0
  69. package/src/components/pure/MagicRobotModal.tsx +136 -0
  70. package/src/components/pure/ProcessDetails.tsx +99 -0
  71. package/src/components/pure/ProcessInput.tsx +67 -0
  72. package/src/components/pure/ProcessList.tsx +89 -0
  73. package/src/components/pure/ProcessLogs.tsx +54 -0
  74. package/src/components/pure/ProcessManager.tsx +38 -46
  75. package/src/components/pure/ProcessManagerView.tsx +44 -373
  76. package/src/components/pure/ProcessManagerViewTypes.ts +10 -0
  77. package/src/components/pure/ProcessSidebar.tsx +88 -0
  78. package/src/components/pure/ProcessTerminal.tsx +51 -0
  79. package/src/components/pure/ProjectPageView.tsx +6 -224
  80. package/src/components/pure/Settings.test.tsx +34 -0
  81. package/src/components/pure/Settings.tsx +163 -0
  82. package/src/components/pure/SignIn.tsx +33 -0
  83. package/src/components/pure/SingleProcessView.tsx +85 -180
  84. package/src/components/pure/TerminalInput.tsx +73 -0
  85. package/src/components/pure/TerminalLogs.tsx +80 -0
  86. package/src/components/pure/TestPageView.test/specification.ts +1 -0
  87. package/src/components/pure/TestPageView.tsx +308 -912
  88. package/src/components/pure/TestPageView_utils.tsx +287 -0
  89. package/src/components/pure/TestTable.tsx +88 -0
  90. package/src/components/pure/ToastNotification.tsx +19 -0
  91. package/src/components/pure/UserProfile.tsx +44 -0
  92. package/src/components/stateful/AuthCallbackPage.tsx +21 -0
  93. package/src/components/stateful/DratoPage.tsx +457 -0
  94. package/src/components/stateful/FeaturesReporter.tsx +3 -1
  95. package/src/components/stateful/FileTree.tsx +58 -58
  96. package/src/components/stateful/GenericXMLEditor/AttributeEditor.tsx +87 -0
  97. package/src/components/stateful/GenericXMLEditor/Drawer.tsx +174 -0
  98. package/src/components/stateful/GenericXMLEditor/GenericPreview.tsx +160 -0
  99. package/src/components/stateful/GenericXMLEditor/GenericTextEditor.tsx +104 -0
  100. package/src/components/stateful/GenericXMLEditor/GenericTree.tsx +104 -0
  101. package/src/components/stateful/GenericXMLEditorPage.tsx +346 -0
  102. package/src/components/stateful/GitIntegrationPage.tsx +263 -0
  103. package/src/components/stateful/GrafeoPage.tsx +563 -0
  104. package/src/components/stateful/ProcessManagerPage.tsx +13 -17
  105. package/src/components/stateful/ProjectPage.tsx +6 -5
  106. package/src/components/stateful/ProjectsPage.tsx +17 -19
  107. package/src/components/stateful/SVGEditor/CircleForm.tsx +68 -0
  108. package/src/components/stateful/SVGEditor/GroupForm.tsx +56 -0
  109. package/src/components/stateful/SVGEditor/RectForm.tsx +74 -0
  110. package/src/components/stateful/SVGEditor/SVGAttributeField.tsx +29 -0
  111. package/src/components/stateful/SVGEditor/SVGAttributesEditor.tsx +91 -0
  112. package/src/components/stateful/SVGEditor/SVGEditorControls.tsx +45 -0
  113. package/src/components/stateful/SVGEditor/SVGElementForm.tsx +45 -0
  114. package/src/components/stateful/SVGEditor/SVGPreview.tsx +227 -0
  115. package/src/components/stateful/SVGEditor/SVGTextEditor.tsx +166 -0
  116. package/src/components/stateful/SVGEditor/SVGTree.tsx +159 -0
  117. package/src/components/stateful/SVGEditor/SVGTypes.ts +36 -0
  118. package/src/components/stateful/SVGEditor/svg.xsd.xml +3038 -0
  119. package/src/components/stateful/SVGEditorPage.tsx +517 -0
  120. package/src/components/stateful/SingleProcessPage.tsx +133 -144
  121. package/src/components/stateful/SkriboPage.tsx +765 -0
  122. package/src/components/stateful/TestPage.tsx +27 -23
  123. package/src/esbuildConfigs/node.ts +1 -1
  124. package/src/example/go.mod +9 -0
  125. package/src/example/main.go +61 -0
  126. package/src/golingvu/PM/golang_test.go +103 -0
  127. package/src/golingvu/README.md +186 -2
  128. package/src/golingvu/base_given.go +89 -2
  129. package/src/golingvu/base_suite.go +48 -2
  130. package/src/golingvu/go.mod +6 -0
  131. package/src/golingvu/golingvu.go +724 -14
  132. package/src/golingvu/types.go +0 -14
  133. package/src/helpo/directives.md +5 -0
  134. package/src/helpo/prompt.txt +38 -0
  135. package/src/hooks/useGitMode.ts +20 -0
  136. package/src/hooks/useTerminalWebSocket.ts +49 -0
  137. package/src/lib/BaseGiven.ts +126 -28
  138. package/src/lib/BaseSuite.test/mock.ts +16 -10
  139. package/src/lib/BaseSuite.test/test.ts +165 -207
  140. package/src/lib/BaseSuite.ts +52 -10
  141. package/src/lib/BaseThen.ts +34 -38
  142. package/src/lib/BaseWhen.ts +9 -2
  143. package/src/lib/Tiposkripto.test/MockTiposkripto.ts +178 -14
  144. package/src/lib/Tiposkripto.test/Tiposkripto.adapter.ts +9 -14
  145. package/src/lib/Tiposkripto.test/Tiposkripto.implementation.ts +78 -38
  146. package/src/lib/Tiposkripto.test/Tiposkripto.specification.ts +51 -8
  147. package/src/lib/Tiposkripto.test/Tiposkripto.types.ts +5 -0
  148. package/src/lib/Tiposkripto.ts +64 -7
  149. package/src/lib/index.ts +7 -0
  150. package/src/lib/pmProxy.test/specification.ts +168 -166
  151. package/src/lib/pmProxy.ts +55 -18
  152. package/src/pitono/PM/python.py +165 -0
  153. package/src/pitono/Pitono.py +298 -0
  154. package/src/pitono/PitonoTest.py +25 -0
  155. package/src/pitono/README.md +21 -0
  156. package/src/pitono/__init__.py +6 -0
  157. package/{pitono → src/pitono}/base_given.py +42 -20
  158. package/{pitono → src/pitono}/base_suite.py +55 -2
  159. package/{pitono → src/pitono}/base_then.py +15 -1
  160. package/{pitono → src/pitono}/base_when.py +15 -1
  161. package/{pitono → src/pitono}/pitono.egg-info/PKG-INFO +25 -0
  162. package/{pitono → src/pitono}/pitono.egg-info/SOURCES.txt +1 -0
  163. package/src/pitono/types.py +87 -0
  164. package/src/services/FileService.ts +677 -0
  165. package/src/services/GitHubAuthService.ts +240 -0
  166. package/src/testeranto.ts +133 -245
  167. package/src/utils/api.ts +15 -13
  168. package/src/utils/gitTest.ts +29 -0
  169. package/src/utils/golingvuMetafile.ts +822 -118
  170. package/src/utils/golingvuWatcher.ts +285 -0
  171. package/src/utils/logFiles.ts +10 -2
  172. package/src/utils/makePrompt.ts +12 -1
  173. package/src/utils/pitonoMetafile.ts +326 -54
  174. package/src/utils/pitonoWatcher.ts +157 -0
  175. package/src/utils.ts +21 -12
  176. package/testeranto/App.css +171 -120
  177. package/testeranto/App.js +47117 -11727
  178. package/testeranto/bundles/node/core/chunk-MJTSYIAQ.mjs +1099 -0
  179. package/testeranto/bundles/node/core/src/lib/BaseSuite.test/node.test.mjs +58 -1147
  180. package/testeranto/bundles/node/core/src/lib/TipoSkripto.test/TipoSkripto.mjs +572 -0
  181. package/testeranto/bundles/node/core/src/lib/pmProxy.test/index.mjs +4795 -0
  182. package/testeranto/bundles/pure/core/chunk-6HR24P27.mjs +1003 -0
  183. package/testeranto/bundles/pure/core/src/Pure.test.mjs +410 -0
  184. package/testeranto/bundles/pure/core/src/lib/BaseSuite.test/pure.test.mjs +57 -1062
  185. package/testeranto/bundles/web/core/MPLUSRounded1c-Black-O75GP5JI.ttf +0 -0
  186. package/testeranto/bundles/web/core/MPLUSRounded1c-Bold-R524Q5BH.ttf +0 -0
  187. package/testeranto/bundles/web/core/MPLUSRounded1c-ExtraBold-C6GRMYVT.ttf +0 -0
  188. package/testeranto/bundles/web/core/MPLUSRounded1c-Light-WKN65Y2C.ttf +0 -0
  189. package/testeranto/bundles/web/core/MPLUSRounded1c-Medium-ZC4DWL7C.ttf +0 -0
  190. package/testeranto/bundles/web/core/MPLUSRounded1c-Regular-DT6EKZ3S.ttf +0 -0
  191. package/testeranto/bundles/web/core/MPLUSRounded1c-Thin-YWDNVG6M.ttf +0 -0
  192. package/testeranto/bundles/web/core/chunk-AZZHJNSU.mjs +30278 -0
  193. package/testeranto/bundles/web/core/chunk-ME6I6FJZ.mjs +3005 -0
  194. package/testeranto/bundles/web/core/src/components/pure/FeaturesReporterView.test/index.html +15 -0
  195. package/testeranto/bundles/web/core/src/components/pure/FeaturesReporterView.test/index.mjs +162 -0
  196. package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.css +11619 -0
  197. package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.html +15 -0
  198. package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.mjs +6924 -0
  199. package/testeranto/bundles/web/core/src/lib/BaseSuite.test/web.test.mjs +71 -1050
  200. package/testeranto/helpo_chat_history.json +1 -0
  201. package/testeranto/metafiles/golang/core.json +42 -47
  202. package/testeranto/metafiles/node/core.json +584 -125
  203. package/testeranto/metafiles/pure/core.json +152 -51
  204. package/testeranto/metafiles/python/core.json +87 -0
  205. package/testeranto/metafiles/web/core.json +16365 -75
  206. package/testeranto/reports/core/config.json +66 -2
  207. package/testeranto/reports/core/example/Calculator.golingvu/golang/exit.log +1 -0
  208. package/testeranto/reports/core/example/Calculator.golingvu/golang/stderr.log +2 -0
  209. package/testeranto/reports/core/example/Calculator.golingvu/golang/stdout.log +1 -0
  210. package/testeranto/reports/core/example/Calculator.pitono.test/python/exit.log +1 -0
  211. package/testeranto/reports/core/example/Calculator.pitono.test/python/stderr.log +11 -0
  212. package/testeranto/reports/core/example/Calculator.pitono.test/python/stdout.log +1 -0
  213. package/testeranto/reports/core/example/Calculator.test/node/exit.log +1 -0
  214. package/testeranto/reports/core/example/Calculator.test/node/lint_errors.txt +2 -0
  215. package/testeranto/reports/core/example/Calculator.test/node/message.txt +16 -0
  216. package/testeranto/reports/core/example/Calculator.test/node/prompt.txt +13 -0
  217. package/testeranto/reports/core/example/Calculator.test/node/stderr.log +33 -0
  218. package/testeranto/reports/core/example/Calculator.test/node/stdout.log +1076 -0
  219. package/testeranto/reports/core/example/Calculator.test/node/tests.json +1109 -0
  220. package/testeranto/reports/core/example/Calculator.test/node/type_errors.txt +34 -0
  221. package/testeranto/reports/core/example/test_example/python/exit.log +1 -0
  222. package/testeranto/reports/core/example/test_example/python/stderr.log +24 -0
  223. package/testeranto/reports/core/src/Pure.test/pure/message.txt +16 -0
  224. package/testeranto/reports/core/src/Pure.test/pure/prompt.txt +13 -0
  225. package/testeranto/reports/core/src/Pure.test/pure/type_errors.txt +86 -0
  226. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/exit.log +0 -0
  227. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/info.log +0 -0
  228. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/lint_errors.txt +0 -0
  229. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/message.txt +17 -0
  230. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/prompt.txt +26 -0
  231. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/type_errors.txt +69 -0
  232. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/warn.log +0 -0
  233. package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/debug.log +0 -0
  234. package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/error.log +0 -0
  235. package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/exit.log +0 -0
  236. package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/info.log +0 -0
  237. package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/lint_errors.txt +16 -0
  238. package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/message.txt +17 -0
  239. package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/prompt.txt +27 -0
  240. package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/type_errors.txt +42 -0
  241. package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/warn.log +0 -0
  242. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/debug.log +0 -0
  243. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/error.log +0 -0
  244. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/exit.log +0 -0
  245. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/info.log +0 -0
  246. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +30 -0
  247. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/message.txt +17 -0
  248. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/prompt.txt +30 -0
  249. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +58 -0
  250. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/warn.log +0 -0
  251. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/exit.log +1 -1
  252. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/lint_errors.txt +0 -6
  253. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/prompt.txt +9 -12
  254. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/stderr.log +1 -0
  255. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/stdout.log +4 -0
  256. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/tests.json +99 -8
  257. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/type_errors.txt +57 -44
  258. package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/lint_errors.txt +0 -2
  259. package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/message.txt +1 -2
  260. package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/prompt.txt +4 -16
  261. package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +62 -44
  262. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/error.log +0 -1
  263. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/exit.log +0 -1
  264. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/lint_errors.txt +0 -2
  265. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/prompt.txt +13 -13
  266. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/type_errors.txt +57 -44
  267. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/exit.log +1 -0
  268. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/lint_errors.txt +0 -0
  269. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/message.txt +16 -0
  270. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/prompt.txt +13 -0
  271. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stderr.log +88 -0
  272. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stdout.log +521 -0
  273. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/tests.json +166 -0
  274. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/type_errors.txt +78 -0
  275. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/exit.log +1 -0
  276. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/lint_errors.txt +15 -0
  277. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/message.txt +17 -0
  278. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/prompt.txt +25 -0
  279. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stderr.log +0 -0
  280. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stdout.log +2 -0
  281. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/tests.json +31 -0
  282. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/type_errors.txt +62 -0
  283. package/testeranto/reports/core/summary.json +66 -11
  284. package/testeranto.config.ts +38 -44
  285. package/tsc.log +141 -91
  286. package/tsconfig.json +6 -2
  287. package/dist/cjs-shim.js +0 -12
  288. package/dist/common/design-editor/DesignEditor.js +0 -242
  289. package/dist/common/design-editor/index.js +0 -18
  290. package/dist/common/design-editor/server.js +0 -98
  291. package/dist/common/design-editor/types.js +0 -2
  292. package/dist/common/package.json +0 -3
  293. package/dist/common/src/App.js +0 -77
  294. package/dist/common/src/CoreTypes.js +0 -2
  295. package/dist/common/src/Init.js +0 -48
  296. package/dist/common/src/Node.js +0 -40
  297. package/dist/common/src/NodeSidecar.js +0 -15
  298. package/dist/common/src/PM/PM_WithEslintAndTsc.js +0 -192
  299. package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +0 -108
  300. package/dist/common/src/PM/__tests__/pureSidecar.testeranto.js +0 -93
  301. package/dist/common/src/PM/__tests__/webSidecar.testeranto.js +0 -93
  302. package/dist/common/src/PM/base.js +0 -257
  303. package/dist/common/src/PM/index.js +0 -6
  304. package/dist/common/src/PM/main.js +0 -1815
  305. package/dist/common/src/PM/node.js +0 -185
  306. package/dist/common/src/PM/nodeSidecar.js +0 -65
  307. package/dist/common/src/PM/pitonoRunner.js +0 -54
  308. package/dist/common/src/PM/pure.js +0 -111
  309. package/dist/common/src/PM/pureSidecar.js +0 -48
  310. package/dist/common/src/PM/sidecar.js +0 -11
  311. package/dist/common/src/PM/types.js +0 -1
  312. package/dist/common/src/PM/web.js +0 -112
  313. package/dist/common/src/PM/webSidecar.js +0 -47
  314. package/dist/common/src/Pure.js +0 -52
  315. package/dist/common/src/Pure.test.js +0 -180
  316. package/dist/common/src/PureSidecar.js +0 -13
  317. package/dist/common/src/ReportServer.js +0 -11
  318. package/dist/common/src/ReportServer.test.ts/index.js +0 -78
  319. package/dist/common/src/ReportServerLib.js +0 -141
  320. package/dist/common/src/Types.js +0 -2
  321. package/dist/common/src/Web.js +0 -61
  322. package/dist/common/src/WebSidecar.js +0 -14
  323. package/dist/common/src/components/DesignEditorPage.js +0 -205
  324. package/dist/common/src/components/SunriseAnimation.js +0 -291
  325. package/dist/common/src/components/SunriseAnimation.test/implementation.js +0 -1
  326. package/dist/common/src/components/SunriseAnimation.test/index.js +0 -1
  327. package/dist/common/src/components/SunriseAnimation.test/interface.js +0 -68
  328. package/dist/common/src/components/SunriseAnimation.test/specification.js +0 -1
  329. package/dist/common/src/components/SunriseAnimation.test/types.js +0 -2
  330. package/dist/common/src/components/TestStatusBadge.js +0 -35
  331. package/dist/common/src/components/pure/AppFrame.js +0 -69
  332. package/dist/common/src/components/pure/AppFrame.test/implementation.js +0 -63
  333. package/dist/common/src/components/pure/AppFrame.test/index.js +0 -14
  334. package/dist/common/src/components/pure/AppFrame.test/specification.js +0 -25
  335. package/dist/common/src/components/pure/AppFrame.test/types.js +0 -3
  336. package/dist/common/src/components/pure/FeaturesReporterView.js +0 -23
  337. package/dist/common/src/components/pure/FeaturesReporterView.test/implementation.js +0 -84
  338. package/dist/common/src/components/pure/FeaturesReporterView.test/index.js +0 -14
  339. package/dist/common/src/components/pure/FeaturesReporterView.test/specification.js +0 -27
  340. package/dist/common/src/components/pure/FeaturesReporterView.test/types.js +0 -2
  341. package/dist/common/src/components/pure/ModalContent.js +0 -86
  342. package/dist/common/src/components/pure/ModalContent.test/implementation.js +0 -35
  343. package/dist/common/src/components/pure/ModalContent.test/index.js +0 -58
  344. package/dist/common/src/components/pure/ModalContent.test/specification.js +0 -19
  345. package/dist/common/src/components/pure/ModalContent.test/types.js +0 -4
  346. package/dist/common/src/components/pure/NavBar.js +0 -44
  347. package/dist/common/src/components/pure/ProcessManager.js +0 -112
  348. package/dist/common/src/components/pure/ProcessManagerView.js +0 -237
  349. package/dist/common/src/components/pure/ProjectPageView.js +0 -181
  350. package/dist/common/src/components/pure/ProjectPageView.test/implementation.js +0 -184
  351. package/dist/common/src/components/pure/ProjectPageView.test/index.js +0 -14
  352. package/dist/common/src/components/pure/ProjectPageView.test/specification.js +0 -32
  353. package/dist/common/src/components/pure/ProjectPageView.test/types.js +0 -4
  354. package/dist/common/src/components/pure/ProjectsPageView.js +0 -72
  355. package/dist/common/src/components/pure/SettingsButton.js +0 -13
  356. package/dist/common/src/components/pure/SingleProcessView.js +0 -214
  357. package/dist/common/src/components/pure/TestPageView.js +0 -628
  358. package/dist/common/src/components/pure/TestPageView.test/implementation.js +0 -157
  359. package/dist/common/src/components/pure/TestPageView.test/index.js +0 -15
  360. package/dist/common/src/components/pure/TestPageView.test/specification.js +0 -26
  361. package/dist/common/src/components/pure/TestPageView.test/types.js +0 -4
  362. package/dist/common/src/components/pure/ThemeCard.js +0 -15
  363. package/dist/common/src/components/stateful/FeaturesReporter.js +0 -59
  364. package/dist/common/src/components/stateful/FileTree.js +0 -40
  365. package/dist/common/src/components/stateful/ProcessManagerPage.js +0 -112
  366. package/dist/common/src/components/stateful/ProjectPage.js +0 -101
  367. package/dist/common/src/components/stateful/ProjectsPage.js +0 -118
  368. package/dist/common/src/components/stateful/SettingsPage.js +0 -72
  369. package/dist/common/src/components/stateful/SingleProcessPage.js +0 -147
  370. package/dist/common/src/components/stateful/TestPage.js +0 -268
  371. package/dist/common/src/components/stateful/TextEditorPage.js +0 -154
  372. package/dist/common/src/defaultConfig.js +0 -19
  373. package/dist/common/src/esbuildConfigs/consoleDetectorPlugin.js +0 -38
  374. package/dist/common/src/esbuildConfigs/eslint-formatter-testeranto.js +0 -21
  375. package/dist/common/src/esbuildConfigs/featuresPlugin.js +0 -39
  376. package/dist/common/src/esbuildConfigs/index.js +0 -21
  377. package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +0 -30
  378. package/dist/common/src/esbuildConfigs/nativeImportDetectorPlugin.js +0 -24
  379. package/dist/common/src/esbuildConfigs/node.js +0 -24
  380. package/dist/common/src/esbuildConfigs/pure.js +0 -42
  381. package/dist/common/src/esbuildConfigs/rebuildPlugin.js +0 -19
  382. package/dist/common/src/esbuildConfigs/web.js +0 -48
  383. package/dist/common/src/init-docs.js +0 -9
  384. package/dist/common/src/lib/BaseGiven.js +0 -99
  385. package/dist/common/src/lib/BaseSuite.js +0 -91
  386. package/dist/common/src/lib/BaseSuite.test/mock.js +0 -61
  387. package/dist/common/src/lib/BaseSuite.test/node.test.js +0 -10
  388. package/dist/common/src/lib/BaseSuite.test/pure.test.js +0 -10
  389. package/dist/common/src/lib/BaseSuite.test/test.js +0 -253
  390. package/dist/common/src/lib/BaseSuite.test/web.test.js +0 -10
  391. package/dist/common/src/lib/BaseThen.js +0 -64
  392. package/dist/common/src/lib/BaseWhen.js +0 -45
  393. package/dist/common/src/lib/Sidecar.js +0 -7
  394. package/dist/common/src/lib/Tiposkripto.js +0 -149
  395. package/dist/common/src/lib/Tiposkripto.test/MockTiposkripto.js +0 -36
  396. package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.adapter.js +0 -35
  397. package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.implementation.js +0 -173
  398. package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.js +0 -11
  399. package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.specification.js +0 -42
  400. package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.types.js +0 -2
  401. package/dist/common/src/lib/abstractBase.test/MockGiven.js +0 -24
  402. package/dist/common/src/lib/abstractBase.test/MockThen.js +0 -16
  403. package/dist/common/src/lib/abstractBase.test/MockWhen.js +0 -20
  404. package/dist/common/src/lib/abstractBase.test/adapter.js +0 -24
  405. package/dist/common/src/lib/abstractBase.test/implementation.js +0 -38
  406. package/dist/common/src/lib/abstractBase.test/index.js +0 -18
  407. package/dist/common/src/lib/abstractBase.test/specification.js +0 -19
  408. package/dist/common/src/lib/abstractBase.test/types.js +0 -2
  409. package/dist/common/src/lib/index.js +0 -31
  410. package/dist/common/src/lib/pmProxy.js +0 -293
  411. package/dist/common/src/lib/pmProxy.test/adapter.js +0 -54
  412. package/dist/common/src/lib/pmProxy.test/implementation.js +0 -137
  413. package/dist/common/src/lib/pmProxy.test/index.js +0 -15
  414. package/dist/common/src/lib/pmProxy.test/mockPM.js +0 -34
  415. package/dist/common/src/lib/pmProxy.test/mockPMBase.js +0 -131
  416. package/dist/common/src/lib/pmProxy.test/specification.js +0 -64
  417. package/dist/common/src/lib/pmProxy.test/types.js +0 -2
  418. package/dist/common/src/lib/types.js +0 -3
  419. package/dist/common/src/mothership/index.js +0 -21
  420. package/dist/common/src/mothership/test.js +0 -83
  421. package/dist/common/src/run.js +0 -49
  422. package/dist/common/src/testeranto.js +0 -283
  423. package/dist/common/src/types/features.js +0 -34
  424. package/dist/common/src/utils/api.js +0 -89
  425. package/dist/common/src/utils/buildTemplates.js +0 -37
  426. package/dist/common/src/utils/featureUtils.js +0 -29
  427. package/dist/common/src/utils/golingvuMetafile.js +0 -116
  428. package/dist/common/src/utils/logFiles.js +0 -52
  429. package/dist/common/src/utils/makePrompt.js +0 -116
  430. package/dist/common/src/utils/pitonoMetafile.js +0 -67
  431. package/dist/common/src/utils/queue.js +0 -36
  432. package/dist/common/src/utils.js +0 -133
  433. package/dist/common/src/web.html.js +0 -18
  434. package/dist/common/testeranto.config.js +0 -98
  435. package/dist/common/tsconfig.common.tsbuildinfo +0 -1
  436. package/dist/module/design-editor/DesignEditor.js +0 -206
  437. package/dist/module/design-editor/index.js +0 -2
  438. package/dist/module/design-editor/server.js +0 -92
  439. package/dist/module/design-editor/types.js +0 -1
  440. package/dist/module/package.json +0 -3
  441. package/dist/module/src/App.js +0 -70
  442. package/dist/module/src/CoreTypes.js +0 -1
  443. package/dist/module/src/Init.js +0 -43
  444. package/dist/module/src/Node.js +0 -33
  445. package/dist/module/src/NodeSidecar.js +0 -11
  446. package/dist/module/src/PM/PM_WithEslintAndTsc.js +0 -185
  447. package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +0 -103
  448. package/dist/module/src/PM/__tests__/pureSidecar.testeranto.js +0 -88
  449. package/dist/module/src/PM/__tests__/webSidecar.testeranto.js +0 -88
  450. package/dist/module/src/PM/base.js +0 -250
  451. package/dist/module/src/PM/index.js +0 -2
  452. package/dist/module/src/PM/main.js +0 -1775
  453. package/dist/module/src/PM/node.js +0 -178
  454. package/dist/module/src/PM/nodeSidecar.js +0 -58
  455. package/dist/module/src/PM/pitonoRunner.js +0 -47
  456. package/dist/module/src/PM/pure.js +0 -107
  457. package/dist/module/src/PM/pureSidecar.js +0 -41
  458. package/dist/module/src/PM/sidecar.js +0 -7
  459. package/dist/module/src/PM/types.js +0 -1
  460. package/dist/module/src/PM/web.js +0 -108
  461. package/dist/module/src/PM/webSidecar.js +0 -40
  462. package/dist/module/src/Pure.js +0 -45
  463. package/dist/module/src/Pure.test.js +0 -175
  464. package/dist/module/src/PureSidecar.js +0 -9
  465. package/dist/module/src/ReportServer.js +0 -9
  466. package/dist/module/src/ReportServer.test.ts/index.js +0 -73
  467. package/dist/module/src/ReportServerLib.js +0 -134
  468. package/dist/module/src/Types.js +0 -1
  469. package/dist/module/src/Web.js +0 -54
  470. package/dist/module/src/WebSidecar.js +0 -10
  471. package/dist/module/src/components/DesignEditorPage.js +0 -168
  472. package/dist/module/src/components/SunriseAnimation.js +0 -256
  473. package/dist/module/src/components/SunriseAnimation.test/implementation.js +0 -1
  474. package/dist/module/src/components/SunriseAnimation.test/index.js +0 -1
  475. package/dist/module/src/components/SunriseAnimation.test/interface.js +0 -32
  476. package/dist/module/src/components/SunriseAnimation.test/specification.js +0 -1
  477. package/dist/module/src/components/SunriseAnimation.test/types.js +0 -1
  478. package/dist/module/src/components/TestStatusBadge.js +0 -28
  479. package/dist/module/src/components/pure/AppFrame.js +0 -32
  480. package/dist/module/src/components/pure/AppFrame.test/implementation.js +0 -57
  481. package/dist/module/src/components/pure/AppFrame.test/index.js +0 -9
  482. package/dist/module/src/components/pure/AppFrame.test/specification.js +0 -21
  483. package/dist/module/src/components/pure/AppFrame.test/types.js +0 -2
  484. package/dist/module/src/components/pure/FeaturesReporterView.js +0 -16
  485. package/dist/module/src/components/pure/FeaturesReporterView.test/implementation.js +0 -81
  486. package/dist/module/src/components/pure/FeaturesReporterView.test/index.js +0 -9
  487. package/dist/module/src/components/pure/FeaturesReporterView.test/specification.js +0 -23
  488. package/dist/module/src/components/pure/FeaturesReporterView.test/types.js +0 -1
  489. package/dist/module/src/components/pure/ModalContent.js +0 -79
  490. package/dist/module/src/components/pure/ModalContent.test/implementation.js +0 -32
  491. package/dist/module/src/components/pure/ModalContent.test/index.js +0 -53
  492. package/dist/module/src/components/pure/ModalContent.test/specification.js +0 -15
  493. package/dist/module/src/components/pure/ModalContent.test/types.js +0 -3
  494. package/dist/module/src/components/pure/NavBar.js +0 -37
  495. package/dist/module/src/components/pure/ProcessManager.js +0 -75
  496. package/dist/module/src/components/pure/ProcessManagerView.js +0 -200
  497. package/dist/module/src/components/pure/ProjectPageView.js +0 -174
  498. package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +0 -181
  499. package/dist/module/src/components/pure/ProjectPageView.test/index.js +0 -9
  500. package/dist/module/src/components/pure/ProjectPageView.test/specification.js +0 -28
  501. package/dist/module/src/components/pure/ProjectPageView.test/types.js +0 -3
  502. package/dist/module/src/components/pure/ProjectsPageView.js +0 -65
  503. package/dist/module/src/components/pure/SettingsButton.js +0 -6
  504. package/dist/module/src/components/pure/SingleProcessView.js +0 -214
  505. package/dist/module/src/components/pure/TestPageView.js +0 -591
  506. package/dist/module/src/components/pure/TestPageView.test/implementation.js +0 -121
  507. package/dist/module/src/components/pure/TestPageView.test/index.js +0 -10
  508. package/dist/module/src/components/pure/TestPageView.test/specification.js +0 -22
  509. package/dist/module/src/components/pure/TestPageView.test/types.js +0 -3
  510. package/dist/module/src/components/pure/ThemeCard.js +0 -8
  511. package/dist/module/src/components/stateful/FeaturesReporter.js +0 -22
  512. package/dist/module/src/components/stateful/FileTree.js +0 -33
  513. package/dist/module/src/components/stateful/ProcessManagerPage.js +0 -75
  514. package/dist/module/src/components/stateful/ProjectPage.js +0 -64
  515. package/dist/module/src/components/stateful/ProjectsPage.js +0 -81
  516. package/dist/module/src/components/stateful/SettingsPage.js +0 -35
  517. package/dist/module/src/components/stateful/SingleProcessPage.js +0 -110
  518. package/dist/module/src/components/stateful/TestPage.js +0 -231
  519. package/dist/module/src/components/stateful/TextEditorPage.js +0 -117
  520. package/dist/module/src/defaultConfig.js +0 -17
  521. package/dist/module/src/esbuildConfigs/consoleDetectorPlugin.js +0 -32
  522. package/dist/module/src/esbuildConfigs/eslint-formatter-testeranto.js +0 -18
  523. package/dist/module/src/esbuildConfigs/featuresPlugin.js +0 -34
  524. package/dist/module/src/esbuildConfigs/index.js +0 -19
  525. package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +0 -25
  526. package/dist/module/src/esbuildConfigs/nativeImportDetectorPlugin.js +0 -21
  527. package/dist/module/src/esbuildConfigs/node.js +0 -19
  528. package/dist/module/src/esbuildConfigs/pure.js +0 -37
  529. package/dist/module/src/esbuildConfigs/rebuildPlugin.js +0 -14
  530. package/dist/module/src/esbuildConfigs/web.js +0 -43
  531. package/dist/module/src/init-docs.js +0 -4
  532. package/dist/module/src/lib/BaseGiven.js +0 -95
  533. package/dist/module/src/lib/BaseSuite.js +0 -87
  534. package/dist/module/src/lib/BaseSuite.test/mock.js +0 -54
  535. package/dist/module/src/lib/BaseSuite.test/node.test.js +0 -5
  536. package/dist/module/src/lib/BaseSuite.test/pure.test.js +0 -5
  537. package/dist/module/src/lib/BaseSuite.test/test.js +0 -249
  538. package/dist/module/src/lib/BaseSuite.test/web.test.js +0 -5
  539. package/dist/module/src/lib/BaseThen.js +0 -60
  540. package/dist/module/src/lib/BaseWhen.js +0 -41
  541. package/dist/module/src/lib/Sidecar.js +0 -3
  542. package/dist/module/src/lib/Tiposkripto.js +0 -146
  543. package/dist/module/src/lib/Tiposkripto.test/MockTiposkripto.js +0 -29
  544. package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.adapter.js +0 -32
  545. package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.implementation.js +0 -170
  546. package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.js +0 -6
  547. package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.specification.js +0 -38
  548. package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.types.js +0 -1
  549. package/dist/module/src/lib/abstractBase.test/MockGiven.js +0 -20
  550. package/dist/module/src/lib/abstractBase.test/MockThen.js +0 -12
  551. package/dist/module/src/lib/abstractBase.test/MockWhen.js +0 -16
  552. package/dist/module/src/lib/abstractBase.test/adapter.js +0 -21
  553. package/dist/module/src/lib/abstractBase.test/implementation.js +0 -35
  554. package/dist/module/src/lib/abstractBase.test/index.js +0 -13
  555. package/dist/module/src/lib/abstractBase.test/specification.js +0 -15
  556. package/dist/module/src/lib/abstractBase.test/types.js +0 -1
  557. package/dist/module/src/lib/index.js +0 -26
  558. package/dist/module/src/lib/pmProxy.js +0 -284
  559. package/dist/module/src/lib/pmProxy.test/adapter.js +0 -51
  560. package/dist/module/src/lib/pmProxy.test/implementation.js +0 -134
  561. package/dist/module/src/lib/pmProxy.test/index.js +0 -10
  562. package/dist/module/src/lib/pmProxy.test/mockPM.js +0 -30
  563. package/dist/module/src/lib/pmProxy.test/mockPMBase.js +0 -127
  564. package/dist/module/src/lib/pmProxy.test/specification.js +0 -60
  565. package/dist/module/src/lib/pmProxy.test/types.js +0 -1
  566. package/dist/module/src/lib/types.js +0 -2
  567. package/dist/module/src/mothership/index.js +0 -16
  568. package/dist/module/src/mothership/test.js +0 -78
  569. package/dist/module/src/run.js +0 -49
  570. package/dist/module/src/testeranto.js +0 -245
  571. package/dist/module/src/types/features.js +0 -31
  572. package/dist/module/src/utils/api.js +0 -84
  573. package/dist/module/src/utils/buildTemplates.js +0 -33
  574. package/dist/module/src/utils/featureUtils.js +0 -24
  575. package/dist/module/src/utils/golingvuMetafile.js +0 -109
  576. package/dist/module/src/utils/logFiles.js +0 -47
  577. package/dist/module/src/utils/makePrompt.js +0 -109
  578. package/dist/module/src/utils/pitonoMetafile.js +0 -60
  579. package/dist/module/src/utils/queue.js +0 -32
  580. package/dist/module/src/utils.js +0 -121
  581. package/dist/module/src/web.html.js +0 -16
  582. package/dist/module/testeranto.config.js +0 -96
  583. package/dist/module/tsconfig.module.tsbuildinfo +0 -1
  584. package/dist/types/design-editor/DesignEditor.d.ts +0 -18
  585. package/dist/types/design-editor/server.d.ts +0 -1
  586. package/dist/types/src/App.d.ts +0 -1
  587. package/dist/types/src/CoreTypes.d.ts +0 -52
  588. package/dist/types/src/Init.d.ts +0 -2
  589. package/dist/types/src/Node.d.ts +0 -9
  590. package/dist/types/src/NodeSidecar.d.ts +0 -6
  591. package/dist/types/src/PM/PM_WithEslintAndTsc.d.ts +0 -24
  592. package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +0 -2
  593. package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +0 -2
  594. package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +0 -2
  595. package/dist/types/src/PM/base.d.ts +0 -35
  596. package/dist/types/src/PM/index.d.ts +0 -37
  597. package/dist/types/src/PM/main.d.ts +0 -79
  598. package/dist/types/src/PM/node.d.ts +0 -40
  599. package/dist/types/src/PM/nodeSidecar.d.ts +0 -13
  600. package/dist/types/src/PM/pitonoRunner.d.ts +0 -7
  601. package/dist/types/src/PM/pure.d.ts +0 -43
  602. package/dist/types/src/PM/pureSidecar.d.ts +0 -11
  603. package/dist/types/src/PM/sidecar.d.ts +0 -8
  604. package/dist/types/src/PM/web.d.ts +0 -43
  605. package/dist/types/src/PM/webSidecar.d.ts +0 -11
  606. package/dist/types/src/Pure.d.ts +0 -9
  607. package/dist/types/src/Pure.test.d.ts +0 -2
  608. package/dist/types/src/PureSidecar.d.ts +0 -8
  609. package/dist/types/src/ReportServer.d.ts +0 -1
  610. package/dist/types/src/ReportServer.test.ts/index.d.ts +0 -2
  611. package/dist/types/src/ReportServerLib.d.ts +0 -1
  612. package/dist/types/src/Types.d.ts +0 -118
  613. package/dist/types/src/Web.d.ts +0 -9
  614. package/dist/types/src/WebSidecar.d.ts +0 -8
  615. package/dist/types/src/components/DesignEditorPage.d.ts +0 -1
  616. package/dist/types/src/components/SunriseAnimation.d.ts +0 -5
  617. package/dist/types/src/components/SunriseAnimation.test/interface.d.ts +0 -11
  618. package/dist/types/src/components/SunriseAnimation.test/types.d.ts +0 -39
  619. package/dist/types/src/components/TestStatusBadge.d.ts +0 -15
  620. package/dist/types/src/components/pure/AppFrame.d.ts +0 -11
  621. package/dist/types/src/components/pure/AppFrame.test/implementation.d.ts +0 -3
  622. package/dist/types/src/components/pure/AppFrame.test/index.d.ts +0 -3
  623. package/dist/types/src/components/pure/AppFrame.test/specification.d.ts +0 -3
  624. package/dist/types/src/components/pure/AppFrame.test/types.d.ts +0 -33
  625. package/dist/types/src/components/pure/FeaturesReporterView.d.ts +0 -7
  626. package/dist/types/src/components/pure/FeaturesReporterView.test/implementation.d.ts +0 -3
  627. package/dist/types/src/components/pure/FeaturesReporterView.test/index.d.ts +0 -2
  628. package/dist/types/src/components/pure/FeaturesReporterView.test/specification.d.ts +0 -3
  629. package/dist/types/src/components/pure/FeaturesReporterView.test/types.d.ts +0 -54
  630. package/dist/types/src/components/pure/ModalContent.d.ts +0 -7
  631. package/dist/types/src/components/pure/ModalContent.test/implementation.d.ts +0 -3
  632. package/dist/types/src/components/pure/ModalContent.test/index.d.ts +0 -2
  633. package/dist/types/src/components/pure/ModalContent.test/specification.d.ts +0 -3
  634. package/dist/types/src/components/pure/ModalContent.test/types.d.ts +0 -45
  635. package/dist/types/src/components/pure/NavBar.d.ts +0 -23
  636. package/dist/types/src/components/pure/ProcessManager.d.ts +0 -8
  637. package/dist/types/src/components/pure/ProcessManagerView.d.ts +0 -20
  638. package/dist/types/src/components/pure/ProjectPageView.d.ts +0 -14
  639. package/dist/types/src/components/pure/ProjectPageView.test/implementation.d.ts +0 -3
  640. package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +0 -2
  641. package/dist/types/src/components/pure/ProjectPageView.test/specification.d.ts +0 -3
  642. package/dist/types/src/components/pure/ProjectPageView.test/types.d.ts +0 -57
  643. package/dist/types/src/components/pure/ProjectsPageView.d.ts +0 -29
  644. package/dist/types/src/components/pure/SettingsButton.d.ts +0 -2
  645. package/dist/types/src/components/pure/TestPageView.d.ts +0 -15
  646. package/dist/types/src/components/pure/TestPageView.test/implementation.d.ts +0 -12
  647. package/dist/types/src/components/pure/TestPageView.test/index.d.ts +0 -3
  648. package/dist/types/src/components/pure/TestPageView.test/specification.d.ts +0 -11
  649. package/dist/types/src/components/pure/TestPageView.test/types.d.ts +0 -65
  650. package/dist/types/src/components/pure/ThemeCard.d.ts +0 -9
  651. package/dist/types/src/components/stateful/FeaturesReporter.d.ts +0 -2
  652. package/dist/types/src/components/stateful/FileTree.d.ts +0 -8
  653. package/dist/types/src/components/stateful/ProcessManagerPage.d.ts +0 -2
  654. package/dist/types/src/components/stateful/ProjectPage.d.ts +0 -1
  655. package/dist/types/src/components/stateful/ProjectsPage.d.ts +0 -1
  656. package/dist/types/src/components/stateful/SettingsPage.d.ts +0 -2
  657. package/dist/types/src/components/stateful/SingleProcessPage.d.ts +0 -2
  658. package/dist/types/src/components/stateful/TestPage.d.ts +0 -1
  659. package/dist/types/src/components/stateful/TextEditorPage.d.ts +0 -1
  660. package/dist/types/src/defaultConfig.d.ts +0 -3
  661. package/dist/types/src/esbuildConfigs/consoleDetectorPlugin.d.ts +0 -2
  662. package/dist/types/src/esbuildConfigs/eslint-formatter-testeranto.d.ts +0 -2
  663. package/dist/types/src/esbuildConfigs/featuresPlugin.d.ts +0 -5
  664. package/dist/types/src/esbuildConfigs/index.d.ts +0 -4
  665. package/dist/types/src/esbuildConfigs/inputFilesPlugin.d.ts +0 -7
  666. package/dist/types/src/esbuildConfigs/nativeImportDetectorPlugin.d.ts +0 -2
  667. package/dist/types/src/esbuildConfigs/node.d.ts +0 -4
  668. package/dist/types/src/esbuildConfigs/pure.d.ts +0 -4
  669. package/dist/types/src/esbuildConfigs/rebuildPlugin.d.ts +0 -6
  670. package/dist/types/src/esbuildConfigs/web.d.ts +0 -4
  671. package/dist/types/src/init-docs.d.ts +0 -1
  672. package/dist/types/src/lib/BaseGiven.d.ts +0 -44
  673. package/dist/types/src/lib/BaseSuite.d.ts +0 -46
  674. package/dist/types/src/lib/BaseSuite.test/mock.d.ts +0 -21
  675. package/dist/types/src/lib/BaseSuite.test/node.test.d.ts +0 -2
  676. package/dist/types/src/lib/BaseSuite.test/pure.test.d.ts +0 -2
  677. package/dist/types/src/lib/BaseSuite.test/test.d.ts +0 -36
  678. package/dist/types/src/lib/BaseSuite.test/web.test.d.ts +0 -2
  679. package/dist/types/src/lib/BaseThen.d.ts +0 -27
  680. package/dist/types/src/lib/BaseWhen.d.ts +0 -27
  681. package/dist/types/src/lib/Sidecar.d.ts +0 -5
  682. package/dist/types/src/lib/Tiposkripto.d.ts +0 -35
  683. package/dist/types/src/lib/Tiposkripto.test/MockTiposkripto.d.ts +0 -15
  684. package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.adapter.d.ts +0 -3
  685. package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.d.ts +0 -2
  686. package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.implementation.d.ts +0 -3
  687. package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.specification.d.ts +0 -3
  688. package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.types.d.ts +0 -53
  689. package/dist/types/src/lib/abstractBase.test/MockGiven.d.ts +0 -9
  690. package/dist/types/src/lib/abstractBase.test/MockThen.d.ts +0 -6
  691. package/dist/types/src/lib/abstractBase.test/MockWhen.d.ts +0 -6
  692. package/dist/types/src/lib/abstractBase.test/adapter.d.ts +0 -3
  693. package/dist/types/src/lib/abstractBase.test/implementation.d.ts +0 -3
  694. package/dist/types/src/lib/abstractBase.test/index.d.ts +0 -2
  695. package/dist/types/src/lib/abstractBase.test/specification.d.ts +0 -3
  696. package/dist/types/src/lib/abstractBase.test/types.d.ts +0 -39
  697. package/dist/types/src/lib/index.d.ts +0 -67
  698. package/dist/types/src/lib/pmProxy.d.ts +0 -12
  699. package/dist/types/src/lib/pmProxy.test/adapter.d.ts +0 -3
  700. package/dist/types/src/lib/pmProxy.test/implementation.d.ts +0 -3
  701. package/dist/types/src/lib/pmProxy.test/index.d.ts +0 -6
  702. package/dist/types/src/lib/pmProxy.test/mockPM.d.ts +0 -10
  703. package/dist/types/src/lib/pmProxy.test/mockPMBase.d.ts +0 -40
  704. package/dist/types/src/lib/pmProxy.test/specification.d.ts +0 -3
  705. package/dist/types/src/lib/pmProxy.test/types.d.ts +0 -42
  706. package/dist/types/src/lib/types.d.ts +0 -24
  707. package/dist/types/src/mothership/index.d.ts +0 -2
  708. package/dist/types/src/mothership/test.d.ts +0 -2
  709. package/dist/types/src/testeranto.d.ts +0 -1
  710. package/dist/types/src/types/features.d.ts +0 -7
  711. package/dist/types/src/utils/api.d.ts +0 -9
  712. package/dist/types/src/utils/buildTemplates.d.ts +0 -1
  713. package/dist/types/src/utils/featureUtils.d.ts +0 -6
  714. package/dist/types/src/utils/golingvuMetafile.d.ts +0 -19
  715. package/dist/types/src/utils/logFiles.d.ts +0 -75
  716. package/dist/types/src/utils/makePrompt.d.ts +0 -2
  717. package/dist/types/src/utils/pitonoMetafile.d.ts +0 -7
  718. package/dist/types/src/utils/queue.d.ts +0 -11
  719. package/dist/types/src/utils.d.ts +0 -20
  720. package/dist/types/src/web.html.d.ts +0 -2
  721. package/dist/types/tsconfig.types.tsbuildinfo +0 -1
  722. package/pitono/__init__.py +0 -54
  723. package/pitono/types.py +0 -78
  724. package/src/golingvu/base_suite_test.go +0 -197
  725. package/src/templates/frontpage.html +0 -340
  726. package/src/templates/frontpage.md +0 -79
  727. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/tests.json +0 -29
  728. /package/{pitono → src/pitono}/core_generator.py +0 -0
  729. /package/{pitono → src/pitono}/pitono.egg-info/dependency_links.txt +0 -0
  730. /package/{pitono → src/pitono}/pitono.egg-info/entry_points.txt +0 -0
  731. /package/{pitono → src/pitono}/pitono.egg-info/top_level.txt +0 -0
  732. /package/{pitono → src/pitono}/pyproject.toml +0 -0
  733. /package/{pitono → src/pitono}/setup.py +0 -0
  734. /package/{pitono → src/pitono}/simple_adapter.py +0 -0
  735. /package/{dist/types/src/PM/types.d.ts → testeranto/helpo_chat_message.txt} +0 -0
  736. /package/{dist/types/src/components/SunriseAnimation.test/implementation.d.ts → testeranto/reports/core/example/test_example/python/stdout.log} +0 -0
  737. /package/{dist/types/src/components/SunriseAnimation.test/index.d.ts → testeranto/reports/core/src/Pure.test/pure/exit.log} +0 -0
  738. /package/{dist/types/src/components/SunriseAnimation.test/specification.d.ts → testeranto/reports/core/src/Pure.test/pure/lint_errors.txt} +0 -0
  739. /package/{dist/types/src/components/pure/SingleProcessView.d.ts → testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/debug.log} +0 -0
  740. /package/{dist/types/src/run.d.ts → testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/error.log} +0 -0
@@ -0,0 +1,4795 @@
1
+ import { createRequire } from 'module';const require = createRequire(import.meta.url);
2
+ import {
3
+ Node_default,
4
+ andWhenProxy,
5
+ butThenProxy
6
+ } from "../../../chunk-MJTSYIAQ.mjs";
7
+
8
+ // src/lib/pmProxy.test/mockPMBase.ts
9
+ var MockPMBase = class {
10
+ constructor(configs) {
11
+ this.calls = {};
12
+ this.testResourceConfiguration = {};
13
+ this.configs = configs || {};
14
+ }
15
+ // Common tracking functionality
16
+ trackCall(method, args) {
17
+ if (!this.calls[method]) {
18
+ this.calls[method] = [];
19
+ }
20
+ this.calls[method].push(args);
21
+ }
22
+ getCallCount(method) {
23
+ return this.calls[method]?.length || 0;
24
+ }
25
+ getLastCall(method) {
26
+ const calls = this.calls[method];
27
+ return calls ? calls[calls.length - 1] : null;
28
+ }
29
+ // Add missing methods used in tests
30
+ // writeFileSync(path: string, content: string): Promise<boolean> {
31
+ // this.trackCall('writeFileSync', { path, content });
32
+ // return Promise.resolve(true);
33
+ // }
34
+ // end(uid: number): Promise<boolean> {
35
+ // this.trackCall('end', { uid });
36
+ // return Promise.resolve(true);
37
+ // }
38
+ // Minimal implementations of required methods
39
+ launchSideCar(n, testName, projectName) {
40
+ this.trackCall("launchSideCar", { n, testName, projectName });
41
+ return Promise.resolve();
42
+ }
43
+ end(uid) {
44
+ this.trackCall("end", { uid });
45
+ console.debug(`Ending test with uid ${uid}`);
46
+ return Promise.resolve(true);
47
+ }
48
+ // Add debug method
49
+ debug(message) {
50
+ console.debug(`[MockPMBase] ${message}`);
51
+ this.trackCall("debug", { message });
52
+ }
53
+ writeFileSync(path, content, testName) {
54
+ this.trackCall("writeFileSync", { path, content, testName });
55
+ return Promise.resolve(true);
56
+ }
57
+ createWriteStream(path, testName) {
58
+ this.trackCall("createWriteStream", { path, testName });
59
+ return Promise.resolve(0);
60
+ }
61
+ screencast(opts, testName, page) {
62
+ this.trackCall("screencast", { opts, testName, page });
63
+ return Promise.resolve({});
64
+ }
65
+ customScreenShot(opts, testName, pageUid) {
66
+ this.trackCall("customScreenShot", { opts, testName, pageUid });
67
+ return Promise.resolve({});
68
+ }
69
+ testArtiFactoryfileWriter(tLog, callback) {
70
+ return (fPath, value) => {
71
+ this.trackCall("testArtiFactoryfileWriter", { fPath, value });
72
+ callback(Promise.resolve());
73
+ };
74
+ }
75
+ // Other required PM_Base methods with minimal implementations
76
+ closePage(p) {
77
+ return Promise.resolve();
78
+ }
79
+ $(selector, p) {
80
+ return Promise.resolve();
81
+ }
82
+ click(selector, page) {
83
+ return Promise.resolve();
84
+ }
85
+ goto(p, url) {
86
+ return Promise.resolve();
87
+ }
88
+ newPage() {
89
+ return Promise.resolve("mock-page");
90
+ }
91
+ pages() {
92
+ return Promise.resolve(["mock-page"]);
93
+ }
94
+ waitForSelector(p, s) {
95
+ return Promise.resolve(true);
96
+ }
97
+ focusOn(selector, p) {
98
+ return Promise.resolve();
99
+ }
100
+ typeInto(value, p) {
101
+ return Promise.resolve();
102
+ }
103
+ getAttribute(selector, attribute, p) {
104
+ return Promise.resolve();
105
+ }
106
+ getInnerHtml(selector, p) {
107
+ return Promise.resolve();
108
+ }
109
+ isDisabled(selector, p) {
110
+ return Promise.resolve(false);
111
+ }
112
+ screencastStop(s) {
113
+ return Promise.resolve();
114
+ }
115
+ existsSync(destFolder) {
116
+ return false;
117
+ }
118
+ mkdirSync(fp) {
119
+ return Promise.resolve();
120
+ }
121
+ write(uid, contents) {
122
+ return Promise.resolve(true);
123
+ }
124
+ page(p) {
125
+ return "mock-page";
126
+ }
127
+ doInPage(p, cb) {
128
+ return Promise.resolve();
129
+ }
130
+ customclose() {
131
+ return Promise.resolve();
132
+ }
133
+ };
134
+
135
+ // src/lib/pmProxy.test/implementation.ts
136
+ var implementation = {
137
+ suites: {
138
+ Default: "PM Proxy Tests"
139
+ },
140
+ givens: {
141
+ SomeBaseString: (s) => s
142
+ },
143
+ whens: {
144
+ // functions have no mutations
145
+ },
146
+ thens: {
147
+ theButTheProxyReturns: (method, expectedPath) => async (store) => {
148
+ const mockPm = new MockPMBase();
149
+ const filepath = "test/path";
150
+ let actualPath;
151
+ const originalWriteFileSync = mockPm.writeFileSync;
152
+ mockPm.writeFileSync = async (path, content, testName) => {
153
+ actualPath = path;
154
+ return originalWriteFileSync.call(mockPm, path, content, testName);
155
+ };
156
+ const originalCreateWriteStream = mockPm.createWriteStream;
157
+ mockPm.createWriteStream = async (path, testName) => {
158
+ actualPath = path;
159
+ return originalCreateWriteStream.call(mockPm, path, testName);
160
+ };
161
+ const originalScreencast = mockPm.screencast;
162
+ mockPm.screencast = async (opts, testName, page) => {
163
+ actualPath = opts.path;
164
+ return originalScreencast.call(mockPm, opts, testName, page);
165
+ };
166
+ const originalCustomScreenShot = mockPm.customScreenShot;
167
+ mockPm.customScreenShot = async (opts, testName, pageUid) => {
168
+ actualPath = opts.path;
169
+ return originalCustomScreenShot.call(mockPm, opts, testName, pageUid);
170
+ };
171
+ try {
172
+ switch (method) {
173
+ case "writeFileSync":
174
+ await butThenProxy(mockPm, filepath, {}).writeFileSync(
175
+ "test.txt",
176
+ "content",
177
+ "test"
178
+ );
179
+ break;
180
+ case "createWriteStream":
181
+ await butThenProxy(mockPm, filepath, {}).createWriteStream(
182
+ "stream.txt",
183
+ "test"
184
+ );
185
+ break;
186
+ case "screencast":
187
+ await butThenProxy(mockPm, filepath, {}).screencast(
188
+ { path: "screen.png" },
189
+ "test"
190
+ );
191
+ break;
192
+ case "customScreenShot":
193
+ await butThenProxy(mockPm, filepath, {}).customScreenShot(
194
+ { path: "shot.png" },
195
+ "test"
196
+ );
197
+ break;
198
+ default:
199
+ throw new Error(`Unknown method: ${method}`);
200
+ }
201
+ return actualPath;
202
+ } catch (error) {
203
+ throw error;
204
+ }
205
+ },
206
+ verifyContent: (expectedContent) => (result) => {
207
+ const actualContent = result[2];
208
+ if (JSON.stringify(actualContent) !== JSON.stringify(expectedContent)) {
209
+ throw new Error(
210
+ `Content mismatch. Expected: ${JSON.stringify(
211
+ expectedContent
212
+ )}, Got: ${JSON.stringify(actualContent)}`
213
+ );
214
+ }
215
+ return result;
216
+ },
217
+ // Test to verify tests.json is written correctly
218
+ verifyTestsJsonWrite: () => async (store) => {
219
+ const mockPm = new MockPMBase();
220
+ let actualArgs;
221
+ const originalWriteFileSync = mockPm.writeFileSync;
222
+ mockPm.writeFileSync = async (...args) => {
223
+ actualArgs = args;
224
+ if (args[0] && typeof args[0] === "string") {
225
+ console.log(
226
+ `[TESTS.JSON DEBUG] First argument length: ${args[0].length}, value: "${args[0]}"`
227
+ );
228
+ }
229
+ return originalWriteFileSync.apply(mockPm, args);
230
+ };
231
+ const testData = { test: "data" };
232
+ if (actualArgs && actualArgs[0] === "test/path/butThen/tests.json" && actualArgs[1] === JSON.stringify(testData, null, 2) && actualArgs[2] === "test") {
233
+ return "PASS";
234
+ } else {
235
+ return `FAIL: args=${JSON.stringify(actualArgs)}`;
236
+ }
237
+ }
238
+ }
239
+ };
240
+
241
+ // src/lib/pmProxy.test/specification.ts
242
+ console.log("wtf");
243
+ var specification = (Suite, Given, When, Then) => [
244
+ Suite.Default("PM Proxy Functionality", {
245
+ // Basic path rewriting tests
246
+ writeFileProxyTest: Given.SomeBaseString(
247
+ ["butThenProxy should rewrite writeFileSync paths"],
248
+ [],
249
+ [
250
+ Then.theButTheProxyReturns(
251
+ "writeFileSync",
252
+ "test/path/butThen/test.txt"
253
+ )
254
+ ],
255
+ "writeFileSync test"
256
+ )
257
+ // createWriteStreamProxyTest: Given.SomeBaseString(
258
+ // ["butThenProxy should rewrite createWriteStream paths"],
259
+ // [],
260
+ // [
261
+ // Then.theButTheProxyReturns(
262
+ // "createWriteStream",
263
+ // "test/path/butThen/stream.txt"
264
+ // ),
265
+ // ],
266
+ // "createWriteStream test"
267
+ // ),
268
+ // screencastProxyTest: Given.SomeBaseString(
269
+ // ["butThenProxy should rewrite screencast paths"],
270
+ // [],
271
+ // [
272
+ // Then.theButTheProxyReturns(
273
+ // "screencast",
274
+ // "test/path/butThen/screen.png"
275
+ // ),
276
+ // ],
277
+ // "screencast test"
278
+ // ),
279
+ // customScreenShotProxyTest: Given.SomeBaseString(
280
+ // ["butThenProxy should rewrite customScreenShot paths"],
281
+ // [],
282
+ // [
283
+ // Then.theButTheProxyReturns(
284
+ // "customScreenShot",
285
+ // "test/path/butThen/shot.png"
286
+ // ),
287
+ // ],
288
+ // "customScreenShot test"
289
+ // ),
290
+ // // Edge cases
291
+ // emptyPathTest: Given.SomeBaseString(
292
+ // ["butThenProxy should handle empty paths"],
293
+ // [],
294
+ // [Then.theButTheProxyReturns("writeFileSync", "test/path/butThen/")],
295
+ // "empty path test"
296
+ // ),
297
+ // nestedPathTest: Given.SomeBaseString(
298
+ // ["butThenProxy should handle nested paths"],
299
+ // [],
300
+ // [
301
+ // Then.theButTheProxyReturns(
302
+ // "writeFileSync",
303
+ // "test/path/butThen/nested/folder/test.txt"
304
+ // ),
305
+ // ],
306
+ // "nested path test"
307
+ // ),
308
+ // specialCharsTest: Given.SomeBaseString(
309
+ // ["butThenProxy should handle special characters in paths"],
310
+ // [],
311
+ // [
312
+ // Then.theButTheProxyReturns(
313
+ // "writeFileSync",
314
+ // "test/path/butThen/file with spaces.txt"
315
+ // ),
316
+ // ],
317
+ // "special chars test"
318
+ // ),
319
+ // testsJsonTest: Given.SomeBaseString(
320
+ // ["butThenProxy should handle tests.json correctly"],
321
+ // [],
322
+ // [
323
+ // Then.theButTheProxyReturns(
324
+ // "writeFileSync",
325
+ // "test/path/butThen/tests.json"
326
+ // ),
327
+ // ],
328
+ // "tests.json test"
329
+ // ),
330
+ })
331
+ // Suite.Default("Proxy Type Coverage", {
332
+ // // Test all proxy types
333
+ // butThenProxyTest: Given.SomeBaseString(
334
+ // ["butThenProxy should work correctly"],
335
+ // [],
336
+ // [
337
+ // Then.theButTheProxyReturns(
338
+ // "writeFileSync",
339
+ // "test/path/butThen/test.txt"
340
+ // ),
341
+ // ],
342
+ // "butThenProxy test"
343
+ // ),
344
+ // andWhenProxyTest: Given.SomeBaseString(
345
+ // ["andWhenProxy should work correctly"],
346
+ // [],
347
+ // [
348
+ // Then.theButTheProxyReturns(
349
+ // "writeFileSync",
350
+ // "test/path/andWhen/test.txt"
351
+ // ),
352
+ // ],
353
+ // "andWhenProxy test"
354
+ // ),
355
+ // beforeEachProxyTest: Given.SomeBaseString(
356
+ // ["beforeEachProxy should work correctly"],
357
+ // [],
358
+ // [
359
+ // Then.theButTheProxyReturns(
360
+ // "writeFileSync",
361
+ // "suite-1/beforeEach/test.txt"
362
+ // ),
363
+ // ],
364
+ // "beforeEachProxy test"
365
+ // ),
366
+ // afterEachProxyTest: Given.SomeBaseString(
367
+ // ["afterEachProxy should work correctly"],
368
+ // [],
369
+ // [
370
+ // Then.theButTheProxyReturns(
371
+ // "writeFileSync",
372
+ // "suite-1/given-1/afterEach/test.txt"
373
+ // ),
374
+ // ],
375
+ // "afterEachProxy test"
376
+ // ),
377
+ // }),
378
+ // Suite.Default("Content Preservation", {
379
+ // // Verify content is preserved
380
+ // contentPreservationTest: Given.SomeBaseString(
381
+ // ["Proxies should preserve file content"],
382
+ // [],
383
+ // [
384
+ // Then.theButTheProxyReturns(
385
+ // "writeFileSync",
386
+ // "test/path/butThen/test.txt"
387
+ // ),
388
+ // Then.verifyContent("test content"),
389
+ // ],
390
+ // "content preservation test"
391
+ // ),
392
+ // objectContentTest: Given.SomeBaseString(
393
+ // ["Proxies should preserve object content"],
394
+ // [],
395
+ // [
396
+ // Then.theButTheProxyReturns(
397
+ // "screencast",
398
+ // "test/path/butThen/screen.png"
399
+ // ),
400
+ // Then.verifyContent({ quality: 80, fullPage: true }),
401
+ // ],
402
+ // "object content test"
403
+ // ),
404
+ // }),
405
+ // Suite.Default("Error Cases", {
406
+ // invalidPathTest: Given.SomeBaseString(
407
+ // ["Proxies should handle invalid paths"],
408
+ // [],
409
+ // [
410
+ // Then.theButTheProxyReturns(
411
+ // "writeFileSync",
412
+ // "test/path/butThen/../invalid.txt"
413
+ // ),
414
+ // ],
415
+ // "invalid path test"
416
+ // ),
417
+ // undefinedInputTest: Given.SomeBaseString(
418
+ // ["Proxies should handle undefined inputs"],
419
+ // [],
420
+ // [Then.theButTheProxyReturns("writeFileSync", undefined)],
421
+ // "undefined input test"
422
+ // ),
423
+ // }),
424
+ ];
425
+
426
+ // node_modules/chai/index.js
427
+ var __defProp = Object.defineProperty;
428
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
429
+ var __export = (target, all) => {
430
+ for (var name in all)
431
+ __defProp(target, name, { get: all[name], enumerable: true });
432
+ };
433
+ var utils_exports = {};
434
+ __export(utils_exports, {
435
+ addChainableMethod: () => addChainableMethod,
436
+ addLengthGuard: () => addLengthGuard,
437
+ addMethod: () => addMethod,
438
+ addProperty: () => addProperty,
439
+ checkError: () => check_error_exports,
440
+ compareByInspect: () => compareByInspect,
441
+ eql: () => deep_eql_default,
442
+ expectTypes: () => expectTypes,
443
+ flag: () => flag,
444
+ getActual: () => getActual,
445
+ getMessage: () => getMessage2,
446
+ getName: () => getName,
447
+ getOperator: () => getOperator,
448
+ getOwnEnumerableProperties: () => getOwnEnumerableProperties,
449
+ getOwnEnumerablePropertySymbols: () => getOwnEnumerablePropertySymbols,
450
+ getPathInfo: () => getPathInfo,
451
+ hasProperty: () => hasProperty,
452
+ inspect: () => inspect2,
453
+ isNaN: () => isNaN2,
454
+ isNumeric: () => isNumeric,
455
+ isProxyEnabled: () => isProxyEnabled,
456
+ isRegExp: () => isRegExp2,
457
+ objDisplay: () => objDisplay,
458
+ overwriteChainableMethod: () => overwriteChainableMethod,
459
+ overwriteMethod: () => overwriteMethod,
460
+ overwriteProperty: () => overwriteProperty,
461
+ proxify: () => proxify,
462
+ test: () => test,
463
+ transferFlags: () => transferFlags,
464
+ type: () => type
465
+ });
466
+ var check_error_exports = {};
467
+ __export(check_error_exports, {
468
+ compatibleConstructor: () => compatibleConstructor,
469
+ compatibleInstance: () => compatibleInstance,
470
+ compatibleMessage: () => compatibleMessage,
471
+ getConstructorName: () => getConstructorName,
472
+ getMessage: () => getMessage
473
+ });
474
+ function isErrorInstance(obj) {
475
+ return obj instanceof Error || Object.prototype.toString.call(obj) === "[object Error]";
476
+ }
477
+ __name(isErrorInstance, "isErrorInstance");
478
+ function isRegExp(obj) {
479
+ return Object.prototype.toString.call(obj) === "[object RegExp]";
480
+ }
481
+ __name(isRegExp, "isRegExp");
482
+ function compatibleInstance(thrown, errorLike) {
483
+ return isErrorInstance(errorLike) && thrown === errorLike;
484
+ }
485
+ __name(compatibleInstance, "compatibleInstance");
486
+ function compatibleConstructor(thrown, errorLike) {
487
+ if (isErrorInstance(errorLike)) {
488
+ return thrown.constructor === errorLike.constructor || thrown instanceof errorLike.constructor;
489
+ } else if ((typeof errorLike === "object" || typeof errorLike === "function") && errorLike.prototype) {
490
+ return thrown.constructor === errorLike || thrown instanceof errorLike;
491
+ }
492
+ return false;
493
+ }
494
+ __name(compatibleConstructor, "compatibleConstructor");
495
+ function compatibleMessage(thrown, errMatcher) {
496
+ const comparisonString = typeof thrown === "string" ? thrown : thrown.message;
497
+ if (isRegExp(errMatcher)) {
498
+ return errMatcher.test(comparisonString);
499
+ } else if (typeof errMatcher === "string") {
500
+ return comparisonString.indexOf(errMatcher) !== -1;
501
+ }
502
+ return false;
503
+ }
504
+ __name(compatibleMessage, "compatibleMessage");
505
+ function getConstructorName(errorLike) {
506
+ let constructorName = errorLike;
507
+ if (isErrorInstance(errorLike)) {
508
+ constructorName = errorLike.constructor.name;
509
+ } else if (typeof errorLike === "function") {
510
+ constructorName = errorLike.name;
511
+ if (constructorName === "") {
512
+ const newConstructorName = new errorLike().name;
513
+ constructorName = newConstructorName || constructorName;
514
+ }
515
+ }
516
+ return constructorName;
517
+ }
518
+ __name(getConstructorName, "getConstructorName");
519
+ function getMessage(errorLike) {
520
+ let msg = "";
521
+ if (errorLike && errorLike.message) {
522
+ msg = errorLike.message;
523
+ } else if (typeof errorLike === "string") {
524
+ msg = errorLike;
525
+ }
526
+ return msg;
527
+ }
528
+ __name(getMessage, "getMessage");
529
+ function flag(obj, key, value) {
530
+ let flags = obj.__flags || (obj.__flags = /* @__PURE__ */ Object.create(null));
531
+ if (arguments.length === 3) {
532
+ flags[key] = value;
533
+ } else {
534
+ return flags[key];
535
+ }
536
+ }
537
+ __name(flag, "flag");
538
+ function test(obj, args) {
539
+ let negate = flag(obj, "negate"), expr = args[0];
540
+ return negate ? !expr : expr;
541
+ }
542
+ __name(test, "test");
543
+ function type(obj) {
544
+ if (typeof obj === "undefined") {
545
+ return "undefined";
546
+ }
547
+ if (obj === null) {
548
+ return "null";
549
+ }
550
+ const stringTag = obj[Symbol.toStringTag];
551
+ if (typeof stringTag === "string") {
552
+ return stringTag;
553
+ }
554
+ const type3 = Object.prototype.toString.call(obj).slice(8, -1);
555
+ return type3;
556
+ }
557
+ __name(type, "type");
558
+ var canElideFrames = "captureStackTrace" in Error;
559
+ var AssertionError = class _AssertionError extends Error {
560
+ static {
561
+ __name(this, "AssertionError");
562
+ }
563
+ message;
564
+ get name() {
565
+ return "AssertionError";
566
+ }
567
+ get ok() {
568
+ return false;
569
+ }
570
+ constructor(message = "Unspecified AssertionError", props, ssf) {
571
+ super(message);
572
+ this.message = message;
573
+ if (canElideFrames) {
574
+ Error.captureStackTrace(this, ssf || _AssertionError);
575
+ }
576
+ for (const key in props) {
577
+ if (!(key in this)) {
578
+ this[key] = props[key];
579
+ }
580
+ }
581
+ }
582
+ toJSON(stack) {
583
+ return {
584
+ ...this,
585
+ name: this.name,
586
+ message: this.message,
587
+ ok: false,
588
+ stack: stack !== false ? this.stack : void 0
589
+ };
590
+ }
591
+ };
592
+ function expectTypes(obj, types) {
593
+ let flagMsg = flag(obj, "message");
594
+ let ssfi = flag(obj, "ssfi");
595
+ flagMsg = flagMsg ? flagMsg + ": " : "";
596
+ obj = flag(obj, "object");
597
+ types = types.map(function(t) {
598
+ return t.toLowerCase();
599
+ });
600
+ types.sort();
601
+ let str = types.map(function(t, index) {
602
+ let art = ~["a", "e", "i", "o", "u"].indexOf(t.charAt(0)) ? "an" : "a";
603
+ let or = types.length > 1 && index === types.length - 1 ? "or " : "";
604
+ return or + art + " " + t;
605
+ }).join(", ");
606
+ let objType = type(obj).toLowerCase();
607
+ if (!types.some(function(expected) {
608
+ return objType === expected;
609
+ })) {
610
+ throw new AssertionError(
611
+ flagMsg + "object tested must be " + str + ", but " + objType + " given",
612
+ void 0,
613
+ ssfi
614
+ );
615
+ }
616
+ }
617
+ __name(expectTypes, "expectTypes");
618
+ function getActual(obj, args) {
619
+ return args.length > 4 ? args[4] : obj._obj;
620
+ }
621
+ __name(getActual, "getActual");
622
+ var ansiColors = {
623
+ bold: ["1", "22"],
624
+ dim: ["2", "22"],
625
+ italic: ["3", "23"],
626
+ underline: ["4", "24"],
627
+ // 5 & 6 are blinking
628
+ inverse: ["7", "27"],
629
+ hidden: ["8", "28"],
630
+ strike: ["9", "29"],
631
+ // 10-20 are fonts
632
+ // 21-29 are resets for 1-9
633
+ black: ["30", "39"],
634
+ red: ["31", "39"],
635
+ green: ["32", "39"],
636
+ yellow: ["33", "39"],
637
+ blue: ["34", "39"],
638
+ magenta: ["35", "39"],
639
+ cyan: ["36", "39"],
640
+ white: ["37", "39"],
641
+ brightblack: ["30;1", "39"],
642
+ brightred: ["31;1", "39"],
643
+ brightgreen: ["32;1", "39"],
644
+ brightyellow: ["33;1", "39"],
645
+ brightblue: ["34;1", "39"],
646
+ brightmagenta: ["35;1", "39"],
647
+ brightcyan: ["36;1", "39"],
648
+ brightwhite: ["37;1", "39"],
649
+ grey: ["90", "39"]
650
+ };
651
+ var styles = {
652
+ special: "cyan",
653
+ number: "yellow",
654
+ bigint: "yellow",
655
+ boolean: "yellow",
656
+ undefined: "grey",
657
+ null: "bold",
658
+ string: "green",
659
+ symbol: "green",
660
+ date: "magenta",
661
+ regexp: "red"
662
+ };
663
+ var truncator = "\u2026";
664
+ function colorise(value, styleType) {
665
+ const color = ansiColors[styles[styleType]] || ansiColors[styleType] || "";
666
+ if (!color) {
667
+ return String(value);
668
+ }
669
+ return `\x1B[${color[0]}m${String(value)}\x1B[${color[1]}m`;
670
+ }
671
+ __name(colorise, "colorise");
672
+ function normaliseOptions({
673
+ showHidden = false,
674
+ depth = 2,
675
+ colors = false,
676
+ customInspect = true,
677
+ showProxy = false,
678
+ maxArrayLength = Infinity,
679
+ breakLength = Infinity,
680
+ seen = [],
681
+ // eslint-disable-next-line no-shadow
682
+ truncate: truncate2 = Infinity,
683
+ stylize = String
684
+ } = {}, inspect3) {
685
+ const options = {
686
+ showHidden: Boolean(showHidden),
687
+ depth: Number(depth),
688
+ colors: Boolean(colors),
689
+ customInspect: Boolean(customInspect),
690
+ showProxy: Boolean(showProxy),
691
+ maxArrayLength: Number(maxArrayLength),
692
+ breakLength: Number(breakLength),
693
+ truncate: Number(truncate2),
694
+ seen,
695
+ inspect: inspect3,
696
+ stylize
697
+ };
698
+ if (options.colors) {
699
+ options.stylize = colorise;
700
+ }
701
+ return options;
702
+ }
703
+ __name(normaliseOptions, "normaliseOptions");
704
+ function isHighSurrogate(char) {
705
+ return char >= "\uD800" && char <= "\uDBFF";
706
+ }
707
+ __name(isHighSurrogate, "isHighSurrogate");
708
+ function truncate(string, length, tail = truncator) {
709
+ string = String(string);
710
+ const tailLength = tail.length;
711
+ const stringLength = string.length;
712
+ if (tailLength > length && stringLength > tailLength) {
713
+ return tail;
714
+ }
715
+ if (stringLength > length && stringLength > tailLength) {
716
+ let end = length - tailLength;
717
+ if (end > 0 && isHighSurrogate(string[end - 1])) {
718
+ end = end - 1;
719
+ }
720
+ return `${string.slice(0, end)}${tail}`;
721
+ }
722
+ return string;
723
+ }
724
+ __name(truncate, "truncate");
725
+ function inspectList(list, options, inspectItem, separator = ", ") {
726
+ inspectItem = inspectItem || options.inspect;
727
+ const size = list.length;
728
+ if (size === 0)
729
+ return "";
730
+ const originalLength = options.truncate;
731
+ let output = "";
732
+ let peek = "";
733
+ let truncated = "";
734
+ for (let i = 0; i < size; i += 1) {
735
+ const last = i + 1 === list.length;
736
+ const secondToLast = i + 2 === list.length;
737
+ truncated = `${truncator}(${list.length - i})`;
738
+ const value = list[i];
739
+ options.truncate = originalLength - output.length - (last ? 0 : separator.length);
740
+ const string = peek || inspectItem(value, options) + (last ? "" : separator);
741
+ const nextLength = output.length + string.length;
742
+ const truncatedLength = nextLength + truncated.length;
743
+ if (last && nextLength > originalLength && output.length + truncated.length <= originalLength) {
744
+ break;
745
+ }
746
+ if (!last && !secondToLast && truncatedLength > originalLength) {
747
+ break;
748
+ }
749
+ peek = last ? "" : inspectItem(list[i + 1], options) + (secondToLast ? "" : separator);
750
+ if (!last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength) {
751
+ break;
752
+ }
753
+ output += string;
754
+ if (!last && !secondToLast && nextLength + peek.length >= originalLength) {
755
+ truncated = `${truncator}(${list.length - i - 1})`;
756
+ break;
757
+ }
758
+ truncated = "";
759
+ }
760
+ return `${output}${truncated}`;
761
+ }
762
+ __name(inspectList, "inspectList");
763
+ function quoteComplexKey(key) {
764
+ if (key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)) {
765
+ return key;
766
+ }
767
+ return JSON.stringify(key).replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
768
+ }
769
+ __name(quoteComplexKey, "quoteComplexKey");
770
+ function inspectProperty([key, value], options) {
771
+ options.truncate -= 2;
772
+ if (typeof key === "string") {
773
+ key = quoteComplexKey(key);
774
+ } else if (typeof key !== "number") {
775
+ key = `[${options.inspect(key, options)}]`;
776
+ }
777
+ options.truncate -= key.length;
778
+ value = options.inspect(value, options);
779
+ return `${key}: ${value}`;
780
+ }
781
+ __name(inspectProperty, "inspectProperty");
782
+ function inspectArray(array, options) {
783
+ const nonIndexProperties = Object.keys(array).slice(array.length);
784
+ if (!array.length && !nonIndexProperties.length)
785
+ return "[]";
786
+ options.truncate -= 4;
787
+ const listContents = inspectList(array, options);
788
+ options.truncate -= listContents.length;
789
+ let propertyContents = "";
790
+ if (nonIndexProperties.length) {
791
+ propertyContents = inspectList(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty);
792
+ }
793
+ return `[ ${listContents}${propertyContents ? `, ${propertyContents}` : ""} ]`;
794
+ }
795
+ __name(inspectArray, "inspectArray");
796
+ var getArrayName = /* @__PURE__ */ __name((array) => {
797
+ if (typeof Buffer === "function" && array instanceof Buffer) {
798
+ return "Buffer";
799
+ }
800
+ if (array[Symbol.toStringTag]) {
801
+ return array[Symbol.toStringTag];
802
+ }
803
+ return array.constructor.name;
804
+ }, "getArrayName");
805
+ function inspectTypedArray(array, options) {
806
+ const name = getArrayName(array);
807
+ options.truncate -= name.length + 4;
808
+ const nonIndexProperties = Object.keys(array).slice(array.length);
809
+ if (!array.length && !nonIndexProperties.length)
810
+ return `${name}[]`;
811
+ let output = "";
812
+ for (let i = 0; i < array.length; i++) {
813
+ const string = `${options.stylize(truncate(array[i], options.truncate), "number")}${i === array.length - 1 ? "" : ", "}`;
814
+ options.truncate -= string.length;
815
+ if (array[i] !== array.length && options.truncate <= 3) {
816
+ output += `${truncator}(${array.length - array[i] + 1})`;
817
+ break;
818
+ }
819
+ output += string;
820
+ }
821
+ let propertyContents = "";
822
+ if (nonIndexProperties.length) {
823
+ propertyContents = inspectList(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty);
824
+ }
825
+ return `${name}[ ${output}${propertyContents ? `, ${propertyContents}` : ""} ]`;
826
+ }
827
+ __name(inspectTypedArray, "inspectTypedArray");
828
+ function inspectDate(dateObject, options) {
829
+ const stringRepresentation = dateObject.toJSON();
830
+ if (stringRepresentation === null) {
831
+ return "Invalid Date";
832
+ }
833
+ const split = stringRepresentation.split("T");
834
+ const date = split[0];
835
+ return options.stylize(`${date}T${truncate(split[1], options.truncate - date.length - 1)}`, "date");
836
+ }
837
+ __name(inspectDate, "inspectDate");
838
+ function inspectFunction(func, options) {
839
+ const functionType = func[Symbol.toStringTag] || "Function";
840
+ const name = func.name;
841
+ if (!name) {
842
+ return options.stylize(`[${functionType}]`, "special");
843
+ }
844
+ return options.stylize(`[${functionType} ${truncate(name, options.truncate - 11)}]`, "special");
845
+ }
846
+ __name(inspectFunction, "inspectFunction");
847
+ function inspectMapEntry([key, value], options) {
848
+ options.truncate -= 4;
849
+ key = options.inspect(key, options);
850
+ options.truncate -= key.length;
851
+ value = options.inspect(value, options);
852
+ return `${key} => ${value}`;
853
+ }
854
+ __name(inspectMapEntry, "inspectMapEntry");
855
+ function mapToEntries(map) {
856
+ const entries = [];
857
+ map.forEach((value, key) => {
858
+ entries.push([key, value]);
859
+ });
860
+ return entries;
861
+ }
862
+ __name(mapToEntries, "mapToEntries");
863
+ function inspectMap(map, options) {
864
+ if (map.size === 0)
865
+ return "Map{}";
866
+ options.truncate -= 7;
867
+ return `Map{ ${inspectList(mapToEntries(map), options, inspectMapEntry)} }`;
868
+ }
869
+ __name(inspectMap, "inspectMap");
870
+ var isNaN = Number.isNaN || ((i) => i !== i);
871
+ function inspectNumber(number, options) {
872
+ if (isNaN(number)) {
873
+ return options.stylize("NaN", "number");
874
+ }
875
+ if (number === Infinity) {
876
+ return options.stylize("Infinity", "number");
877
+ }
878
+ if (number === -Infinity) {
879
+ return options.stylize("-Infinity", "number");
880
+ }
881
+ if (number === 0) {
882
+ return options.stylize(1 / number === Infinity ? "+0" : "-0", "number");
883
+ }
884
+ return options.stylize(truncate(String(number), options.truncate), "number");
885
+ }
886
+ __name(inspectNumber, "inspectNumber");
887
+ function inspectBigInt(number, options) {
888
+ let nums = truncate(number.toString(), options.truncate - 1);
889
+ if (nums !== truncator)
890
+ nums += "n";
891
+ return options.stylize(nums, "bigint");
892
+ }
893
+ __name(inspectBigInt, "inspectBigInt");
894
+ function inspectRegExp(value, options) {
895
+ const flags = value.toString().split("/")[2];
896
+ const sourceLength = options.truncate - (2 + flags.length);
897
+ const source = value.source;
898
+ return options.stylize(`/${truncate(source, sourceLength)}/${flags}`, "regexp");
899
+ }
900
+ __name(inspectRegExp, "inspectRegExp");
901
+ function arrayFromSet(set2) {
902
+ const values = [];
903
+ set2.forEach((value) => {
904
+ values.push(value);
905
+ });
906
+ return values;
907
+ }
908
+ __name(arrayFromSet, "arrayFromSet");
909
+ function inspectSet(set2, options) {
910
+ if (set2.size === 0)
911
+ return "Set{}";
912
+ options.truncate -= 7;
913
+ return `Set{ ${inspectList(arrayFromSet(set2), options)} }`;
914
+ }
915
+ __name(inspectSet, "inspectSet");
916
+ var stringEscapeChars = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]", "g");
917
+ var escapeCharacters = {
918
+ "\b": "\\b",
919
+ " ": "\\t",
920
+ "\n": "\\n",
921
+ "\f": "\\f",
922
+ "\r": "\\r",
923
+ "'": "\\'",
924
+ "\\": "\\\\"
925
+ };
926
+ var hex = 16;
927
+ var unicodeLength = 4;
928
+ function escape(char) {
929
+ return escapeCharacters[char] || `\\u${`0000${char.charCodeAt(0).toString(hex)}`.slice(-unicodeLength)}`;
930
+ }
931
+ __name(escape, "escape");
932
+ function inspectString(string, options) {
933
+ if (stringEscapeChars.test(string)) {
934
+ string = string.replace(stringEscapeChars, escape);
935
+ }
936
+ return options.stylize(`'${truncate(string, options.truncate - 2)}'`, "string");
937
+ }
938
+ __name(inspectString, "inspectString");
939
+ function inspectSymbol(value) {
940
+ if ("description" in Symbol.prototype) {
941
+ return value.description ? `Symbol(${value.description})` : "Symbol()";
942
+ }
943
+ return value.toString();
944
+ }
945
+ __name(inspectSymbol, "inspectSymbol");
946
+ var getPromiseValue = /* @__PURE__ */ __name(() => "Promise{\u2026}", "getPromiseValue");
947
+ var promise_default = getPromiseValue;
948
+ function inspectObject(object, options) {
949
+ const properties = Object.getOwnPropertyNames(object);
950
+ const symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [];
951
+ if (properties.length === 0 && symbols.length === 0) {
952
+ return "{}";
953
+ }
954
+ options.truncate -= 4;
955
+ options.seen = options.seen || [];
956
+ if (options.seen.includes(object)) {
957
+ return "[Circular]";
958
+ }
959
+ options.seen.push(object);
960
+ const propertyContents = inspectList(properties.map((key) => [key, object[key]]), options, inspectProperty);
961
+ const symbolContents = inspectList(symbols.map((key) => [key, object[key]]), options, inspectProperty);
962
+ options.seen.pop();
963
+ let sep = "";
964
+ if (propertyContents && symbolContents) {
965
+ sep = ", ";
966
+ }
967
+ return `{ ${propertyContents}${sep}${symbolContents} }`;
968
+ }
969
+ __name(inspectObject, "inspectObject");
970
+ var toStringTag = typeof Symbol !== "undefined" && Symbol.toStringTag ? Symbol.toStringTag : false;
971
+ function inspectClass(value, options) {
972
+ let name = "";
973
+ if (toStringTag && toStringTag in value) {
974
+ name = value[toStringTag];
975
+ }
976
+ name = name || value.constructor.name;
977
+ if (!name || name === "_class") {
978
+ name = "<Anonymous Class>";
979
+ }
980
+ options.truncate -= name.length;
981
+ return `${name}${inspectObject(value, options)}`;
982
+ }
983
+ __name(inspectClass, "inspectClass");
984
+ function inspectArguments(args, options) {
985
+ if (args.length === 0)
986
+ return "Arguments[]";
987
+ options.truncate -= 13;
988
+ return `Arguments[ ${inspectList(args, options)} ]`;
989
+ }
990
+ __name(inspectArguments, "inspectArguments");
991
+ var errorKeys = [
992
+ "stack",
993
+ "line",
994
+ "column",
995
+ "name",
996
+ "message",
997
+ "fileName",
998
+ "lineNumber",
999
+ "columnNumber",
1000
+ "number",
1001
+ "description",
1002
+ "cause"
1003
+ ];
1004
+ function inspectObject2(error, options) {
1005
+ const properties = Object.getOwnPropertyNames(error).filter((key) => errorKeys.indexOf(key) === -1);
1006
+ const name = error.name;
1007
+ options.truncate -= name.length;
1008
+ let message = "";
1009
+ if (typeof error.message === "string") {
1010
+ message = truncate(error.message, options.truncate);
1011
+ } else {
1012
+ properties.unshift("message");
1013
+ }
1014
+ message = message ? `: ${message}` : "";
1015
+ options.truncate -= message.length + 5;
1016
+ options.seen = options.seen || [];
1017
+ if (options.seen.includes(error)) {
1018
+ return "[Circular]";
1019
+ }
1020
+ options.seen.push(error);
1021
+ const propertyContents = inspectList(properties.map((key) => [key, error[key]]), options, inspectProperty);
1022
+ return `${name}${message}${propertyContents ? ` { ${propertyContents} }` : ""}`;
1023
+ }
1024
+ __name(inspectObject2, "inspectObject");
1025
+ function inspectAttribute([key, value], options) {
1026
+ options.truncate -= 3;
1027
+ if (!value) {
1028
+ return `${options.stylize(String(key), "yellow")}`;
1029
+ }
1030
+ return `${options.stylize(String(key), "yellow")}=${options.stylize(`"${value}"`, "string")}`;
1031
+ }
1032
+ __name(inspectAttribute, "inspectAttribute");
1033
+ function inspectNodeCollection(collection, options) {
1034
+ return inspectList(collection, options, inspectNode, "\n");
1035
+ }
1036
+ __name(inspectNodeCollection, "inspectNodeCollection");
1037
+ function inspectNode(node, options) {
1038
+ switch (node.nodeType) {
1039
+ case 1:
1040
+ return inspectHTML(node, options);
1041
+ case 3:
1042
+ return options.inspect(node.data, options);
1043
+ default:
1044
+ return options.inspect(node, options);
1045
+ }
1046
+ }
1047
+ __name(inspectNode, "inspectNode");
1048
+ function inspectHTML(element, options) {
1049
+ const properties = element.getAttributeNames();
1050
+ const name = element.tagName.toLowerCase();
1051
+ const head = options.stylize(`<${name}`, "special");
1052
+ const headClose = options.stylize(`>`, "special");
1053
+ const tail = options.stylize(`</${name}>`, "special");
1054
+ options.truncate -= name.length * 2 + 5;
1055
+ let propertyContents = "";
1056
+ if (properties.length > 0) {
1057
+ propertyContents += " ";
1058
+ propertyContents += inspectList(properties.map((key) => [key, element.getAttribute(key)]), options, inspectAttribute, " ");
1059
+ }
1060
+ options.truncate -= propertyContents.length;
1061
+ const truncate2 = options.truncate;
1062
+ let children = inspectNodeCollection(element.children, options);
1063
+ if (children && children.length > truncate2) {
1064
+ children = `${truncator}(${element.children.length})`;
1065
+ }
1066
+ return `${head}${propertyContents}${headClose}${children}${tail}`;
1067
+ }
1068
+ __name(inspectHTML, "inspectHTML");
1069
+ var symbolsSupported = typeof Symbol === "function" && typeof Symbol.for === "function";
1070
+ var chaiInspect = symbolsSupported ? Symbol.for("chai/inspect") : "@@chai/inspect";
1071
+ var nodeInspect = Symbol.for("nodejs.util.inspect.custom");
1072
+ var constructorMap = /* @__PURE__ */ new WeakMap();
1073
+ var stringTagMap = {};
1074
+ var baseTypesMap = {
1075
+ undefined: /* @__PURE__ */ __name((value, options) => options.stylize("undefined", "undefined"), "undefined"),
1076
+ null: /* @__PURE__ */ __name((value, options) => options.stylize("null", "null"), "null"),
1077
+ boolean: /* @__PURE__ */ __name((value, options) => options.stylize(String(value), "boolean"), "boolean"),
1078
+ Boolean: /* @__PURE__ */ __name((value, options) => options.stylize(String(value), "boolean"), "Boolean"),
1079
+ number: inspectNumber,
1080
+ Number: inspectNumber,
1081
+ bigint: inspectBigInt,
1082
+ BigInt: inspectBigInt,
1083
+ string: inspectString,
1084
+ String: inspectString,
1085
+ function: inspectFunction,
1086
+ Function: inspectFunction,
1087
+ symbol: inspectSymbol,
1088
+ // A Symbol polyfill will return `Symbol` not `symbol` from typedetect
1089
+ Symbol: inspectSymbol,
1090
+ Array: inspectArray,
1091
+ Date: inspectDate,
1092
+ Map: inspectMap,
1093
+ Set: inspectSet,
1094
+ RegExp: inspectRegExp,
1095
+ Promise: promise_default,
1096
+ // WeakSet, WeakMap are totally opaque to us
1097
+ WeakSet: /* @__PURE__ */ __name((value, options) => options.stylize("WeakSet{\u2026}", "special"), "WeakSet"),
1098
+ WeakMap: /* @__PURE__ */ __name((value, options) => options.stylize("WeakMap{\u2026}", "special"), "WeakMap"),
1099
+ Arguments: inspectArguments,
1100
+ Int8Array: inspectTypedArray,
1101
+ Uint8Array: inspectTypedArray,
1102
+ Uint8ClampedArray: inspectTypedArray,
1103
+ Int16Array: inspectTypedArray,
1104
+ Uint16Array: inspectTypedArray,
1105
+ Int32Array: inspectTypedArray,
1106
+ Uint32Array: inspectTypedArray,
1107
+ Float32Array: inspectTypedArray,
1108
+ Float64Array: inspectTypedArray,
1109
+ Generator: /* @__PURE__ */ __name(() => "", "Generator"),
1110
+ DataView: /* @__PURE__ */ __name(() => "", "DataView"),
1111
+ ArrayBuffer: /* @__PURE__ */ __name(() => "", "ArrayBuffer"),
1112
+ Error: inspectObject2,
1113
+ HTMLCollection: inspectNodeCollection,
1114
+ NodeList: inspectNodeCollection
1115
+ };
1116
+ var inspectCustom = /* @__PURE__ */ __name((value, options, type3) => {
1117
+ if (chaiInspect in value && typeof value[chaiInspect] === "function") {
1118
+ return value[chaiInspect](options);
1119
+ }
1120
+ if (nodeInspect in value && typeof value[nodeInspect] === "function") {
1121
+ return value[nodeInspect](options.depth, options);
1122
+ }
1123
+ if ("inspect" in value && typeof value.inspect === "function") {
1124
+ return value.inspect(options.depth, options);
1125
+ }
1126
+ if ("constructor" in value && constructorMap.has(value.constructor)) {
1127
+ return constructorMap.get(value.constructor)(value, options);
1128
+ }
1129
+ if (stringTagMap[type3]) {
1130
+ return stringTagMap[type3](value, options);
1131
+ }
1132
+ return "";
1133
+ }, "inspectCustom");
1134
+ var toString = Object.prototype.toString;
1135
+ function inspect(value, opts = {}) {
1136
+ const options = normaliseOptions(opts, inspect);
1137
+ const { customInspect } = options;
1138
+ let type3 = value === null ? "null" : typeof value;
1139
+ if (type3 === "object") {
1140
+ type3 = toString.call(value).slice(8, -1);
1141
+ }
1142
+ if (type3 in baseTypesMap) {
1143
+ return baseTypesMap[type3](value, options);
1144
+ }
1145
+ if (customInspect && value) {
1146
+ const output = inspectCustom(value, options, type3);
1147
+ if (output) {
1148
+ if (typeof output === "string")
1149
+ return output;
1150
+ return inspect(output, options);
1151
+ }
1152
+ }
1153
+ const proto = value ? Object.getPrototypeOf(value) : false;
1154
+ if (proto === Object.prototype || proto === null) {
1155
+ return inspectObject(value, options);
1156
+ }
1157
+ if (value && typeof HTMLElement === "function" && value instanceof HTMLElement) {
1158
+ return inspectHTML(value, options);
1159
+ }
1160
+ if ("constructor" in value) {
1161
+ if (value.constructor !== Object) {
1162
+ return inspectClass(value, options);
1163
+ }
1164
+ return inspectObject(value, options);
1165
+ }
1166
+ if (value === Object(value)) {
1167
+ return inspectObject(value, options);
1168
+ }
1169
+ return options.stylize(String(value), type3);
1170
+ }
1171
+ __name(inspect, "inspect");
1172
+ var config = {
1173
+ /**
1174
+ * ### config.includeStack
1175
+ *
1176
+ * User configurable property, influences whether stack trace
1177
+ * is included in Assertion error message. Default of false
1178
+ * suppresses stack trace in the error message.
1179
+ *
1180
+ * chai.config.includeStack = true; // enable stack on error
1181
+ *
1182
+ * @param {boolean}
1183
+ * @public
1184
+ */
1185
+ includeStack: false,
1186
+ /**
1187
+ * ### config.showDiff
1188
+ *
1189
+ * User configurable property, influences whether or not
1190
+ * the `showDiff` flag should be included in the thrown
1191
+ * AssertionErrors. `false` will always be `false`; `true`
1192
+ * will be true when the assertion has requested a diff
1193
+ * be shown.
1194
+ *
1195
+ * @param {boolean}
1196
+ * @public
1197
+ */
1198
+ showDiff: true,
1199
+ /**
1200
+ * ### config.truncateThreshold
1201
+ *
1202
+ * User configurable property, sets length threshold for actual and
1203
+ * expected values in assertion errors. If this threshold is exceeded, for
1204
+ * example for large data structures, the value is replaced with something
1205
+ * like `[ Array(3) ]` or `{ Object (prop1, prop2) }`.
1206
+ *
1207
+ * Set it to zero if you want to disable truncating altogether.
1208
+ *
1209
+ * This is especially userful when doing assertions on arrays: having this
1210
+ * set to a reasonable large value makes the failure messages readily
1211
+ * inspectable.
1212
+ *
1213
+ * chai.config.truncateThreshold = 0; // disable truncating
1214
+ *
1215
+ * @param {number}
1216
+ * @public
1217
+ */
1218
+ truncateThreshold: 40,
1219
+ /**
1220
+ * ### config.useProxy
1221
+ *
1222
+ * User configurable property, defines if chai will use a Proxy to throw
1223
+ * an error when a non-existent property is read, which protects users
1224
+ * from typos when using property-based assertions.
1225
+ *
1226
+ * Set it to false if you want to disable this feature.
1227
+ *
1228
+ * chai.config.useProxy = false; // disable use of Proxy
1229
+ *
1230
+ * This feature is automatically disabled regardless of this config value
1231
+ * in environments that don't support proxies.
1232
+ *
1233
+ * @param {boolean}
1234
+ * @public
1235
+ */
1236
+ useProxy: true,
1237
+ /**
1238
+ * ### config.proxyExcludedKeys
1239
+ *
1240
+ * User configurable property, defines which properties should be ignored
1241
+ * instead of throwing an error if they do not exist on the assertion.
1242
+ * This is only applied if the environment Chai is running in supports proxies and
1243
+ * if the `useProxy` configuration setting is enabled.
1244
+ * By default, `then` and `inspect` will not throw an error if they do not exist on the
1245
+ * assertion object because the `.inspect` property is read by `util.inspect` (for example, when
1246
+ * using `console.log` on the assertion object) and `.then` is necessary for promise type-checking.
1247
+ *
1248
+ * // By default these keys will not throw an error if they do not exist on the assertion object
1249
+ * chai.config.proxyExcludedKeys = ['then', 'inspect'];
1250
+ *
1251
+ * @param {Array}
1252
+ * @public
1253
+ */
1254
+ proxyExcludedKeys: ["then", "catch", "inspect", "toJSON"],
1255
+ /**
1256
+ * ### config.deepEqual
1257
+ *
1258
+ * User configurable property, defines which a custom function to use for deepEqual
1259
+ * comparisons.
1260
+ * By default, the function used is the one from the `deep-eql` package without custom comparator.
1261
+ *
1262
+ * // use a custom comparator
1263
+ * chai.config.deepEqual = (expected, actual) => {
1264
+ * return chai.util.eql(expected, actual, {
1265
+ * comparator: (expected, actual) => {
1266
+ * // for non number comparison, use the default behavior
1267
+ * if(typeof expected !== 'number') return null;
1268
+ * // allow a difference of 10 between compared numbers
1269
+ * return typeof actual === 'number' && Math.abs(actual - expected) < 10
1270
+ * }
1271
+ * })
1272
+ * };
1273
+ *
1274
+ * @param {Function}
1275
+ * @public
1276
+ */
1277
+ deepEqual: null
1278
+ };
1279
+ function inspect2(obj, showHidden, depth, colors) {
1280
+ let options = {
1281
+ colors,
1282
+ depth: typeof depth === "undefined" ? 2 : depth,
1283
+ showHidden,
1284
+ truncate: config.truncateThreshold ? config.truncateThreshold : Infinity
1285
+ };
1286
+ return inspect(obj, options);
1287
+ }
1288
+ __name(inspect2, "inspect");
1289
+ function objDisplay(obj) {
1290
+ let str = inspect2(obj), type3 = Object.prototype.toString.call(obj);
1291
+ if (config.truncateThreshold && str.length >= config.truncateThreshold) {
1292
+ if (type3 === "[object Function]") {
1293
+ return !obj.name || obj.name === "" ? "[Function]" : "[Function: " + obj.name + "]";
1294
+ } else if (type3 === "[object Array]") {
1295
+ return "[ Array(" + obj.length + ") ]";
1296
+ } else if (type3 === "[object Object]") {
1297
+ let keys = Object.keys(obj), kstr = keys.length > 2 ? keys.splice(0, 2).join(", ") + ", ..." : keys.join(", ");
1298
+ return "{ Object (" + kstr + ") }";
1299
+ } else {
1300
+ return str;
1301
+ }
1302
+ } else {
1303
+ return str;
1304
+ }
1305
+ }
1306
+ __name(objDisplay, "objDisplay");
1307
+ function getMessage2(obj, args) {
1308
+ let negate = flag(obj, "negate");
1309
+ let val = flag(obj, "object");
1310
+ let expected = args[3];
1311
+ let actual = getActual(obj, args);
1312
+ let msg = negate ? args[2] : args[1];
1313
+ let flagMsg = flag(obj, "message");
1314
+ if (typeof msg === "function")
1315
+ msg = msg();
1316
+ msg = msg || "";
1317
+ msg = msg.replace(/#\{this\}/g, function() {
1318
+ return objDisplay(val);
1319
+ }).replace(/#\{act\}/g, function() {
1320
+ return objDisplay(actual);
1321
+ }).replace(/#\{exp\}/g, function() {
1322
+ return objDisplay(expected);
1323
+ });
1324
+ return flagMsg ? flagMsg + ": " + msg : msg;
1325
+ }
1326
+ __name(getMessage2, "getMessage");
1327
+ function transferFlags(assertion, object, includeAll) {
1328
+ let flags = assertion.__flags || (assertion.__flags = /* @__PURE__ */ Object.create(null));
1329
+ if (!object.__flags) {
1330
+ object.__flags = /* @__PURE__ */ Object.create(null);
1331
+ }
1332
+ includeAll = arguments.length === 3 ? includeAll : true;
1333
+ for (let flag3 in flags) {
1334
+ if (includeAll || flag3 !== "object" && flag3 !== "ssfi" && flag3 !== "lockSsfi" && flag3 != "message") {
1335
+ object.__flags[flag3] = flags[flag3];
1336
+ }
1337
+ }
1338
+ }
1339
+ __name(transferFlags, "transferFlags");
1340
+ function type2(obj) {
1341
+ if (typeof obj === "undefined") {
1342
+ return "undefined";
1343
+ }
1344
+ if (obj === null) {
1345
+ return "null";
1346
+ }
1347
+ const stringTag = obj[Symbol.toStringTag];
1348
+ if (typeof stringTag === "string") {
1349
+ return stringTag;
1350
+ }
1351
+ const sliceStart = 8;
1352
+ const sliceEnd = -1;
1353
+ return Object.prototype.toString.call(obj).slice(sliceStart, sliceEnd);
1354
+ }
1355
+ __name(type2, "type");
1356
+ function FakeMap() {
1357
+ this._key = "chai/deep-eql__" + Math.random() + Date.now();
1358
+ }
1359
+ __name(FakeMap, "FakeMap");
1360
+ FakeMap.prototype = {
1361
+ get: /* @__PURE__ */ __name(function get(key) {
1362
+ return key[this._key];
1363
+ }, "get"),
1364
+ set: /* @__PURE__ */ __name(function set(key, value) {
1365
+ if (Object.isExtensible(key)) {
1366
+ Object.defineProperty(key, this._key, {
1367
+ value,
1368
+ configurable: true
1369
+ });
1370
+ }
1371
+ }, "set")
1372
+ };
1373
+ var MemoizeMap = typeof WeakMap === "function" ? WeakMap : FakeMap;
1374
+ function memoizeCompare(leftHandOperand, rightHandOperand, memoizeMap) {
1375
+ if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {
1376
+ return null;
1377
+ }
1378
+ var leftHandMap = memoizeMap.get(leftHandOperand);
1379
+ if (leftHandMap) {
1380
+ var result = leftHandMap.get(rightHandOperand);
1381
+ if (typeof result === "boolean") {
1382
+ return result;
1383
+ }
1384
+ }
1385
+ return null;
1386
+ }
1387
+ __name(memoizeCompare, "memoizeCompare");
1388
+ function memoizeSet(leftHandOperand, rightHandOperand, memoizeMap, result) {
1389
+ if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {
1390
+ return;
1391
+ }
1392
+ var leftHandMap = memoizeMap.get(leftHandOperand);
1393
+ if (leftHandMap) {
1394
+ leftHandMap.set(rightHandOperand, result);
1395
+ } else {
1396
+ leftHandMap = new MemoizeMap();
1397
+ leftHandMap.set(rightHandOperand, result);
1398
+ memoizeMap.set(leftHandOperand, leftHandMap);
1399
+ }
1400
+ }
1401
+ __name(memoizeSet, "memoizeSet");
1402
+ var deep_eql_default = deepEqual;
1403
+ function deepEqual(leftHandOperand, rightHandOperand, options) {
1404
+ if (options && options.comparator) {
1405
+ return extensiveDeepEqual(leftHandOperand, rightHandOperand, options);
1406
+ }
1407
+ var simpleResult = simpleEqual(leftHandOperand, rightHandOperand);
1408
+ if (simpleResult !== null) {
1409
+ return simpleResult;
1410
+ }
1411
+ return extensiveDeepEqual(leftHandOperand, rightHandOperand, options);
1412
+ }
1413
+ __name(deepEqual, "deepEqual");
1414
+ function simpleEqual(leftHandOperand, rightHandOperand) {
1415
+ if (leftHandOperand === rightHandOperand) {
1416
+ return leftHandOperand !== 0 || 1 / leftHandOperand === 1 / rightHandOperand;
1417
+ }
1418
+ if (leftHandOperand !== leftHandOperand && // eslint-disable-line no-self-compare
1419
+ rightHandOperand !== rightHandOperand) {
1420
+ return true;
1421
+ }
1422
+ if (isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {
1423
+ return false;
1424
+ }
1425
+ return null;
1426
+ }
1427
+ __name(simpleEqual, "simpleEqual");
1428
+ function extensiveDeepEqual(leftHandOperand, rightHandOperand, options) {
1429
+ options = options || {};
1430
+ options.memoize = options.memoize === false ? false : options.memoize || new MemoizeMap();
1431
+ var comparator = options && options.comparator;
1432
+ var memoizeResultLeft = memoizeCompare(leftHandOperand, rightHandOperand, options.memoize);
1433
+ if (memoizeResultLeft !== null) {
1434
+ return memoizeResultLeft;
1435
+ }
1436
+ var memoizeResultRight = memoizeCompare(rightHandOperand, leftHandOperand, options.memoize);
1437
+ if (memoizeResultRight !== null) {
1438
+ return memoizeResultRight;
1439
+ }
1440
+ if (comparator) {
1441
+ var comparatorResult = comparator(leftHandOperand, rightHandOperand);
1442
+ if (comparatorResult === false || comparatorResult === true) {
1443
+ memoizeSet(leftHandOperand, rightHandOperand, options.memoize, comparatorResult);
1444
+ return comparatorResult;
1445
+ }
1446
+ var simpleResult = simpleEqual(leftHandOperand, rightHandOperand);
1447
+ if (simpleResult !== null) {
1448
+ return simpleResult;
1449
+ }
1450
+ }
1451
+ var leftHandType = type2(leftHandOperand);
1452
+ if (leftHandType !== type2(rightHandOperand)) {
1453
+ memoizeSet(leftHandOperand, rightHandOperand, options.memoize, false);
1454
+ return false;
1455
+ }
1456
+ memoizeSet(leftHandOperand, rightHandOperand, options.memoize, true);
1457
+ var result = extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options);
1458
+ memoizeSet(leftHandOperand, rightHandOperand, options.memoize, result);
1459
+ return result;
1460
+ }
1461
+ __name(extensiveDeepEqual, "extensiveDeepEqual");
1462
+ function extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options) {
1463
+ switch (leftHandType) {
1464
+ case "String":
1465
+ case "Number":
1466
+ case "Boolean":
1467
+ case "Date":
1468
+ return deepEqual(leftHandOperand.valueOf(), rightHandOperand.valueOf());
1469
+ case "Promise":
1470
+ case "Symbol":
1471
+ case "function":
1472
+ case "WeakMap":
1473
+ case "WeakSet":
1474
+ return leftHandOperand === rightHandOperand;
1475
+ case "Error":
1476
+ return keysEqual(leftHandOperand, rightHandOperand, ["name", "message", "code"], options);
1477
+ case "Arguments":
1478
+ case "Int8Array":
1479
+ case "Uint8Array":
1480
+ case "Uint8ClampedArray":
1481
+ case "Int16Array":
1482
+ case "Uint16Array":
1483
+ case "Int32Array":
1484
+ case "Uint32Array":
1485
+ case "Float32Array":
1486
+ case "Float64Array":
1487
+ case "Array":
1488
+ return iterableEqual(leftHandOperand, rightHandOperand, options);
1489
+ case "RegExp":
1490
+ return regexpEqual(leftHandOperand, rightHandOperand);
1491
+ case "Generator":
1492
+ return generatorEqual(leftHandOperand, rightHandOperand, options);
1493
+ case "DataView":
1494
+ return iterableEqual(new Uint8Array(leftHandOperand.buffer), new Uint8Array(rightHandOperand.buffer), options);
1495
+ case "ArrayBuffer":
1496
+ return iterableEqual(new Uint8Array(leftHandOperand), new Uint8Array(rightHandOperand), options);
1497
+ case "Set":
1498
+ return entriesEqual(leftHandOperand, rightHandOperand, options);
1499
+ case "Map":
1500
+ return entriesEqual(leftHandOperand, rightHandOperand, options);
1501
+ case "Temporal.PlainDate":
1502
+ case "Temporal.PlainTime":
1503
+ case "Temporal.PlainDateTime":
1504
+ case "Temporal.Instant":
1505
+ case "Temporal.ZonedDateTime":
1506
+ case "Temporal.PlainYearMonth":
1507
+ case "Temporal.PlainMonthDay":
1508
+ return leftHandOperand.equals(rightHandOperand);
1509
+ case "Temporal.Duration":
1510
+ return leftHandOperand.total("nanoseconds") === rightHandOperand.total("nanoseconds");
1511
+ case "Temporal.TimeZone":
1512
+ case "Temporal.Calendar":
1513
+ return leftHandOperand.toString() === rightHandOperand.toString();
1514
+ default:
1515
+ return objectEqual(leftHandOperand, rightHandOperand, options);
1516
+ }
1517
+ }
1518
+ __name(extensiveDeepEqualByType, "extensiveDeepEqualByType");
1519
+ function regexpEqual(leftHandOperand, rightHandOperand) {
1520
+ return leftHandOperand.toString() === rightHandOperand.toString();
1521
+ }
1522
+ __name(regexpEqual, "regexpEqual");
1523
+ function entriesEqual(leftHandOperand, rightHandOperand, options) {
1524
+ try {
1525
+ if (leftHandOperand.size !== rightHandOperand.size) {
1526
+ return false;
1527
+ }
1528
+ if (leftHandOperand.size === 0) {
1529
+ return true;
1530
+ }
1531
+ } catch (sizeError) {
1532
+ return false;
1533
+ }
1534
+ var leftHandItems = [];
1535
+ var rightHandItems = [];
1536
+ leftHandOperand.forEach(/* @__PURE__ */ __name(function gatherEntries(key, value) {
1537
+ leftHandItems.push([key, value]);
1538
+ }, "gatherEntries"));
1539
+ rightHandOperand.forEach(/* @__PURE__ */ __name(function gatherEntries(key, value) {
1540
+ rightHandItems.push([key, value]);
1541
+ }, "gatherEntries"));
1542
+ return iterableEqual(leftHandItems.sort(), rightHandItems.sort(), options);
1543
+ }
1544
+ __name(entriesEqual, "entriesEqual");
1545
+ function iterableEqual(leftHandOperand, rightHandOperand, options) {
1546
+ var length = leftHandOperand.length;
1547
+ if (length !== rightHandOperand.length) {
1548
+ return false;
1549
+ }
1550
+ if (length === 0) {
1551
+ return true;
1552
+ }
1553
+ var index = -1;
1554
+ while (++index < length) {
1555
+ if (deepEqual(leftHandOperand[index], rightHandOperand[index], options) === false) {
1556
+ return false;
1557
+ }
1558
+ }
1559
+ return true;
1560
+ }
1561
+ __name(iterableEqual, "iterableEqual");
1562
+ function generatorEqual(leftHandOperand, rightHandOperand, options) {
1563
+ return iterableEqual(getGeneratorEntries(leftHandOperand), getGeneratorEntries(rightHandOperand), options);
1564
+ }
1565
+ __name(generatorEqual, "generatorEqual");
1566
+ function hasIteratorFunction(target) {
1567
+ return typeof Symbol !== "undefined" && typeof target === "object" && typeof Symbol.iterator !== "undefined" && typeof target[Symbol.iterator] === "function";
1568
+ }
1569
+ __name(hasIteratorFunction, "hasIteratorFunction");
1570
+ function getIteratorEntries(target) {
1571
+ if (hasIteratorFunction(target)) {
1572
+ try {
1573
+ return getGeneratorEntries(target[Symbol.iterator]());
1574
+ } catch (iteratorError) {
1575
+ return [];
1576
+ }
1577
+ }
1578
+ return [];
1579
+ }
1580
+ __name(getIteratorEntries, "getIteratorEntries");
1581
+ function getGeneratorEntries(generator) {
1582
+ var generatorResult = generator.next();
1583
+ var accumulator = [generatorResult.value];
1584
+ while (generatorResult.done === false) {
1585
+ generatorResult = generator.next();
1586
+ accumulator.push(generatorResult.value);
1587
+ }
1588
+ return accumulator;
1589
+ }
1590
+ __name(getGeneratorEntries, "getGeneratorEntries");
1591
+ function getEnumerableKeys(target) {
1592
+ var keys = [];
1593
+ for (var key in target) {
1594
+ keys.push(key);
1595
+ }
1596
+ return keys;
1597
+ }
1598
+ __name(getEnumerableKeys, "getEnumerableKeys");
1599
+ function getEnumerableSymbols(target) {
1600
+ var keys = [];
1601
+ var allKeys = Object.getOwnPropertySymbols(target);
1602
+ for (var i = 0; i < allKeys.length; i += 1) {
1603
+ var key = allKeys[i];
1604
+ if (Object.getOwnPropertyDescriptor(target, key).enumerable) {
1605
+ keys.push(key);
1606
+ }
1607
+ }
1608
+ return keys;
1609
+ }
1610
+ __name(getEnumerableSymbols, "getEnumerableSymbols");
1611
+ function keysEqual(leftHandOperand, rightHandOperand, keys, options) {
1612
+ var length = keys.length;
1613
+ if (length === 0) {
1614
+ return true;
1615
+ }
1616
+ for (var i = 0; i < length; i += 1) {
1617
+ if (deepEqual(leftHandOperand[keys[i]], rightHandOperand[keys[i]], options) === false) {
1618
+ return false;
1619
+ }
1620
+ }
1621
+ return true;
1622
+ }
1623
+ __name(keysEqual, "keysEqual");
1624
+ function objectEqual(leftHandOperand, rightHandOperand, options) {
1625
+ var leftHandKeys = getEnumerableKeys(leftHandOperand);
1626
+ var rightHandKeys = getEnumerableKeys(rightHandOperand);
1627
+ var leftHandSymbols = getEnumerableSymbols(leftHandOperand);
1628
+ var rightHandSymbols = getEnumerableSymbols(rightHandOperand);
1629
+ leftHandKeys = leftHandKeys.concat(leftHandSymbols);
1630
+ rightHandKeys = rightHandKeys.concat(rightHandSymbols);
1631
+ if (leftHandKeys.length && leftHandKeys.length === rightHandKeys.length) {
1632
+ if (iterableEqual(mapSymbols(leftHandKeys).sort(), mapSymbols(rightHandKeys).sort()) === false) {
1633
+ return false;
1634
+ }
1635
+ return keysEqual(leftHandOperand, rightHandOperand, leftHandKeys, options);
1636
+ }
1637
+ var leftHandEntries = getIteratorEntries(leftHandOperand);
1638
+ var rightHandEntries = getIteratorEntries(rightHandOperand);
1639
+ if (leftHandEntries.length && leftHandEntries.length === rightHandEntries.length) {
1640
+ leftHandEntries.sort();
1641
+ rightHandEntries.sort();
1642
+ return iterableEqual(leftHandEntries, rightHandEntries, options);
1643
+ }
1644
+ if (leftHandKeys.length === 0 && leftHandEntries.length === 0 && rightHandKeys.length === 0 && rightHandEntries.length === 0) {
1645
+ return true;
1646
+ }
1647
+ return false;
1648
+ }
1649
+ __name(objectEqual, "objectEqual");
1650
+ function isPrimitive(value) {
1651
+ return value === null || typeof value !== "object";
1652
+ }
1653
+ __name(isPrimitive, "isPrimitive");
1654
+ function mapSymbols(arr) {
1655
+ return arr.map(/* @__PURE__ */ __name(function mapSymbol(entry) {
1656
+ if (typeof entry === "symbol") {
1657
+ return entry.toString();
1658
+ }
1659
+ return entry;
1660
+ }, "mapSymbol"));
1661
+ }
1662
+ __name(mapSymbols, "mapSymbols");
1663
+ function hasProperty(obj, name) {
1664
+ if (typeof obj === "undefined" || obj === null) {
1665
+ return false;
1666
+ }
1667
+ return name in Object(obj);
1668
+ }
1669
+ __name(hasProperty, "hasProperty");
1670
+ function parsePath(path) {
1671
+ const str = path.replace(/([^\\])\[/g, "$1.[");
1672
+ const parts = str.match(/(\\\.|[^.]+?)+/g);
1673
+ return parts.map((value) => {
1674
+ if (value === "constructor" || value === "__proto__" || value === "prototype") {
1675
+ return {};
1676
+ }
1677
+ const regexp = /^\[(\d+)\]$/;
1678
+ const mArr = regexp.exec(value);
1679
+ let parsed = null;
1680
+ if (mArr) {
1681
+ parsed = { i: parseFloat(mArr[1]) };
1682
+ } else {
1683
+ parsed = { p: value.replace(/\\([.[\]])/g, "$1") };
1684
+ }
1685
+ return parsed;
1686
+ });
1687
+ }
1688
+ __name(parsePath, "parsePath");
1689
+ function internalGetPathValue(obj, parsed, pathDepth) {
1690
+ let temporaryValue = obj;
1691
+ let res = null;
1692
+ pathDepth = typeof pathDepth === "undefined" ? parsed.length : pathDepth;
1693
+ for (let i = 0; i < pathDepth; i++) {
1694
+ const part = parsed[i];
1695
+ if (temporaryValue) {
1696
+ if (typeof part.p === "undefined") {
1697
+ temporaryValue = temporaryValue[part.i];
1698
+ } else {
1699
+ temporaryValue = temporaryValue[part.p];
1700
+ }
1701
+ if (i === pathDepth - 1) {
1702
+ res = temporaryValue;
1703
+ }
1704
+ }
1705
+ }
1706
+ return res;
1707
+ }
1708
+ __name(internalGetPathValue, "internalGetPathValue");
1709
+ function getPathInfo(obj, path) {
1710
+ const parsed = parsePath(path);
1711
+ const last = parsed[parsed.length - 1];
1712
+ const info = {
1713
+ parent: parsed.length > 1 ? internalGetPathValue(obj, parsed, parsed.length - 1) : obj,
1714
+ name: last.p || last.i,
1715
+ value: internalGetPathValue(obj, parsed)
1716
+ };
1717
+ info.exists = hasProperty(info.parent, info.name);
1718
+ return info;
1719
+ }
1720
+ __name(getPathInfo, "getPathInfo");
1721
+ var Assertion = class _Assertion {
1722
+ static {
1723
+ __name(this, "Assertion");
1724
+ }
1725
+ /** @type {{}} */
1726
+ __flags = {};
1727
+ /**
1728
+ * Creates object for chaining.
1729
+ * `Assertion` objects contain metadata in the form of flags. Three flags can
1730
+ * be assigned during instantiation by passing arguments to this constructor:
1731
+ *
1732
+ * - `object`: This flag contains the target of the assertion. For example, in
1733
+ * the assertion `expect(numKittens).to.equal(7);`, the `object` flag will
1734
+ * contain `numKittens` so that the `equal` assertion can reference it when
1735
+ * needed.
1736
+ *
1737
+ * - `message`: This flag contains an optional custom error message to be
1738
+ * prepended to the error message that's generated by the assertion when it
1739
+ * fails.
1740
+ *
1741
+ * - `ssfi`: This flag stands for "start stack function indicator". It
1742
+ * contains a function reference that serves as the starting point for
1743
+ * removing frames from the stack trace of the error that's created by the
1744
+ * assertion when it fails. The goal is to provide a cleaner stack trace to
1745
+ * end users by removing Chai's internal functions. Note that it only works
1746
+ * in environments that support `Error.captureStackTrace`, and only when
1747
+ * `Chai.config.includeStack` hasn't been set to `false`.
1748
+ *
1749
+ * - `lockSsfi`: This flag controls whether or not the given `ssfi` flag
1750
+ * should retain its current value, even as assertions are chained off of
1751
+ * this object. This is usually set to `true` when creating a new assertion
1752
+ * from within another assertion. It's also temporarily set to `true` before
1753
+ * an overwritten assertion gets called by the overwriting assertion.
1754
+ *
1755
+ * - `eql`: This flag contains the deepEqual function to be used by the assertion.
1756
+ *
1757
+ * @param {unknown} obj target of the assertion
1758
+ * @param {string} [msg] (optional) custom error message
1759
+ * @param {Function} [ssfi] (optional) starting point for removing stack frames
1760
+ * @param {boolean} [lockSsfi] (optional) whether or not the ssfi flag is locked
1761
+ */
1762
+ constructor(obj, msg, ssfi, lockSsfi) {
1763
+ flag(this, "ssfi", ssfi || _Assertion);
1764
+ flag(this, "lockSsfi", lockSsfi);
1765
+ flag(this, "object", obj);
1766
+ flag(this, "message", msg);
1767
+ flag(this, "eql", config.deepEqual || deep_eql_default);
1768
+ return proxify(this);
1769
+ }
1770
+ /** @returns {boolean} */
1771
+ static get includeStack() {
1772
+ console.warn(
1773
+ "Assertion.includeStack is deprecated, use chai.config.includeStack instead."
1774
+ );
1775
+ return config.includeStack;
1776
+ }
1777
+ /** @param {boolean} value */
1778
+ static set includeStack(value) {
1779
+ console.warn(
1780
+ "Assertion.includeStack is deprecated, use chai.config.includeStack instead."
1781
+ );
1782
+ config.includeStack = value;
1783
+ }
1784
+ /** @returns {boolean} */
1785
+ static get showDiff() {
1786
+ console.warn(
1787
+ "Assertion.showDiff is deprecated, use chai.config.showDiff instead."
1788
+ );
1789
+ return config.showDiff;
1790
+ }
1791
+ /** @param {boolean} value */
1792
+ static set showDiff(value) {
1793
+ console.warn(
1794
+ "Assertion.showDiff is deprecated, use chai.config.showDiff instead."
1795
+ );
1796
+ config.showDiff = value;
1797
+ }
1798
+ /**
1799
+ * @param {string} name
1800
+ * @param {Function} fn
1801
+ */
1802
+ static addProperty(name, fn) {
1803
+ addProperty(this.prototype, name, fn);
1804
+ }
1805
+ /**
1806
+ * @param {string} name
1807
+ * @param {Function} fn
1808
+ */
1809
+ static addMethod(name, fn) {
1810
+ addMethod(this.prototype, name, fn);
1811
+ }
1812
+ /**
1813
+ * @param {string} name
1814
+ * @param {Function} fn
1815
+ * @param {Function} chainingBehavior
1816
+ */
1817
+ static addChainableMethod(name, fn, chainingBehavior) {
1818
+ addChainableMethod(this.prototype, name, fn, chainingBehavior);
1819
+ }
1820
+ /**
1821
+ * @param {string} name
1822
+ * @param {Function} fn
1823
+ */
1824
+ static overwriteProperty(name, fn) {
1825
+ overwriteProperty(this.prototype, name, fn);
1826
+ }
1827
+ /**
1828
+ * @param {string} name
1829
+ * @param {Function} fn
1830
+ */
1831
+ static overwriteMethod(name, fn) {
1832
+ overwriteMethod(this.prototype, name, fn);
1833
+ }
1834
+ /**
1835
+ * @param {string} name
1836
+ * @param {Function} fn
1837
+ * @param {Function} chainingBehavior
1838
+ */
1839
+ static overwriteChainableMethod(name, fn, chainingBehavior) {
1840
+ overwriteChainableMethod(this.prototype, name, fn, chainingBehavior);
1841
+ }
1842
+ /**
1843
+ * ### .assert(expression, message, negateMessage, expected, actual, showDiff)
1844
+ *
1845
+ * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass.
1846
+ *
1847
+ * @name assert
1848
+ * @param {unknown} _expr to be tested
1849
+ * @param {string | Function} msg or function that returns message to display if expression fails
1850
+ * @param {string | Function} _negateMsg or function that returns negatedMessage to display if negated expression fails
1851
+ * @param {unknown} expected value (remember to check for negation)
1852
+ * @param {unknown} _actual (optional) will default to `this.obj`
1853
+ * @param {boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails
1854
+ * @returns {void}
1855
+ */
1856
+ assert(_expr, msg, _negateMsg, expected, _actual, showDiff) {
1857
+ const ok = test(this, arguments);
1858
+ if (false !== showDiff)
1859
+ showDiff = true;
1860
+ if (void 0 === expected && void 0 === _actual)
1861
+ showDiff = false;
1862
+ if (true !== config.showDiff)
1863
+ showDiff = false;
1864
+ if (!ok) {
1865
+ msg = getMessage2(this, arguments);
1866
+ const actual = getActual(this, arguments);
1867
+ const assertionErrorObjectProperties = {
1868
+ actual,
1869
+ expected,
1870
+ showDiff
1871
+ };
1872
+ const operator = getOperator(this, arguments);
1873
+ if (operator) {
1874
+ assertionErrorObjectProperties.operator = operator;
1875
+ }
1876
+ throw new AssertionError(
1877
+ msg,
1878
+ assertionErrorObjectProperties,
1879
+ // @ts-expect-error Not sure what to do about these types yet
1880
+ config.includeStack ? this.assert : flag(this, "ssfi")
1881
+ );
1882
+ }
1883
+ }
1884
+ /**
1885
+ * Quick reference to stored `actual` value for plugin developers.
1886
+ *
1887
+ * @returns {unknown}
1888
+ */
1889
+ get _obj() {
1890
+ return flag(this, "object");
1891
+ }
1892
+ /**
1893
+ * Quick reference to stored `actual` value for plugin developers.
1894
+ *
1895
+ * @param {unknown} val
1896
+ */
1897
+ set _obj(val) {
1898
+ flag(this, "object", val);
1899
+ }
1900
+ };
1901
+ function isProxyEnabled() {
1902
+ return config.useProxy && typeof Proxy !== "undefined" && typeof Reflect !== "undefined";
1903
+ }
1904
+ __name(isProxyEnabled, "isProxyEnabled");
1905
+ function addProperty(ctx, name, getter) {
1906
+ getter = getter === void 0 ? function() {
1907
+ } : getter;
1908
+ Object.defineProperty(ctx, name, {
1909
+ get: /* @__PURE__ */ __name(function propertyGetter() {
1910
+ if (!isProxyEnabled() && !flag(this, "lockSsfi")) {
1911
+ flag(this, "ssfi", propertyGetter);
1912
+ }
1913
+ let result = getter.call(this);
1914
+ if (result !== void 0)
1915
+ return result;
1916
+ let newAssertion = new Assertion();
1917
+ transferFlags(this, newAssertion);
1918
+ return newAssertion;
1919
+ }, "propertyGetter"),
1920
+ configurable: true
1921
+ });
1922
+ }
1923
+ __name(addProperty, "addProperty");
1924
+ var fnLengthDesc = Object.getOwnPropertyDescriptor(function() {
1925
+ }, "length");
1926
+ function addLengthGuard(fn, assertionName, isChainable) {
1927
+ if (!fnLengthDesc.configurable)
1928
+ return fn;
1929
+ Object.defineProperty(fn, "length", {
1930
+ get: /* @__PURE__ */ __name(function() {
1931
+ if (isChainable) {
1932
+ throw Error(
1933
+ "Invalid Chai property: " + assertionName + '.length. Due to a compatibility issue, "length" cannot directly follow "' + assertionName + '". Use "' + assertionName + '.lengthOf" instead.'
1934
+ );
1935
+ }
1936
+ throw Error(
1937
+ "Invalid Chai property: " + assertionName + '.length. See docs for proper usage of "' + assertionName + '".'
1938
+ );
1939
+ }, "get")
1940
+ });
1941
+ return fn;
1942
+ }
1943
+ __name(addLengthGuard, "addLengthGuard");
1944
+ function getProperties(object) {
1945
+ let result = Object.getOwnPropertyNames(object);
1946
+ function addProperty2(property) {
1947
+ if (result.indexOf(property) === -1) {
1948
+ result.push(property);
1949
+ }
1950
+ }
1951
+ __name(addProperty2, "addProperty");
1952
+ let proto = Object.getPrototypeOf(object);
1953
+ while (proto !== null) {
1954
+ Object.getOwnPropertyNames(proto).forEach(addProperty2);
1955
+ proto = Object.getPrototypeOf(proto);
1956
+ }
1957
+ return result;
1958
+ }
1959
+ __name(getProperties, "getProperties");
1960
+ var builtins = ["__flags", "__methods", "_obj", "assert"];
1961
+ function proxify(obj, nonChainableMethodName) {
1962
+ if (!isProxyEnabled())
1963
+ return obj;
1964
+ return new Proxy(obj, {
1965
+ get: /* @__PURE__ */ __name(function proxyGetter(target, property) {
1966
+ if (typeof property === "string" && config.proxyExcludedKeys.indexOf(property) === -1 && !Reflect.has(target, property)) {
1967
+ if (nonChainableMethodName) {
1968
+ throw Error(
1969
+ "Invalid Chai property: " + nonChainableMethodName + "." + property + '. See docs for proper usage of "' + nonChainableMethodName + '".'
1970
+ );
1971
+ }
1972
+ let suggestion = null;
1973
+ let suggestionDistance = 4;
1974
+ getProperties(target).forEach(function(prop) {
1975
+ if (
1976
+ // we actually mean to check `Object.prototype` here
1977
+ // eslint-disable-next-line no-prototype-builtins
1978
+ !Object.prototype.hasOwnProperty(prop) && builtins.indexOf(prop) === -1
1979
+ ) {
1980
+ let dist = stringDistanceCapped(property, prop, suggestionDistance);
1981
+ if (dist < suggestionDistance) {
1982
+ suggestion = prop;
1983
+ suggestionDistance = dist;
1984
+ }
1985
+ }
1986
+ });
1987
+ if (suggestion !== null) {
1988
+ throw Error(
1989
+ "Invalid Chai property: " + property + '. Did you mean "' + suggestion + '"?'
1990
+ );
1991
+ } else {
1992
+ throw Error("Invalid Chai property: " + property);
1993
+ }
1994
+ }
1995
+ if (builtins.indexOf(property) === -1 && !flag(target, "lockSsfi")) {
1996
+ flag(target, "ssfi", proxyGetter);
1997
+ }
1998
+ return Reflect.get(target, property);
1999
+ }, "proxyGetter")
2000
+ });
2001
+ }
2002
+ __name(proxify, "proxify");
2003
+ function stringDistanceCapped(strA, strB, cap) {
2004
+ if (Math.abs(strA.length - strB.length) >= cap) {
2005
+ return cap;
2006
+ }
2007
+ let memo = [];
2008
+ for (let i = 0; i <= strA.length; i++) {
2009
+ memo[i] = Array(strB.length + 1).fill(0);
2010
+ memo[i][0] = i;
2011
+ }
2012
+ for (let j = 0; j < strB.length; j++) {
2013
+ memo[0][j] = j;
2014
+ }
2015
+ for (let i = 1; i <= strA.length; i++) {
2016
+ let ch = strA.charCodeAt(i - 1);
2017
+ for (let j = 1; j <= strB.length; j++) {
2018
+ if (Math.abs(i - j) >= cap) {
2019
+ memo[i][j] = cap;
2020
+ continue;
2021
+ }
2022
+ memo[i][j] = Math.min(
2023
+ memo[i - 1][j] + 1,
2024
+ memo[i][j - 1] + 1,
2025
+ memo[i - 1][j - 1] + (ch === strB.charCodeAt(j - 1) ? 0 : 1)
2026
+ );
2027
+ }
2028
+ }
2029
+ return memo[strA.length][strB.length];
2030
+ }
2031
+ __name(stringDistanceCapped, "stringDistanceCapped");
2032
+ function addMethod(ctx, name, method) {
2033
+ let methodWrapper = /* @__PURE__ */ __name(function() {
2034
+ if (!flag(this, "lockSsfi")) {
2035
+ flag(this, "ssfi", methodWrapper);
2036
+ }
2037
+ let result = method.apply(this, arguments);
2038
+ if (result !== void 0)
2039
+ return result;
2040
+ let newAssertion = new Assertion();
2041
+ transferFlags(this, newAssertion);
2042
+ return newAssertion;
2043
+ }, "methodWrapper");
2044
+ addLengthGuard(methodWrapper, name, false);
2045
+ ctx[name] = proxify(methodWrapper, name);
2046
+ }
2047
+ __name(addMethod, "addMethod");
2048
+ function overwriteProperty(ctx, name, getter) {
2049
+ let _get = Object.getOwnPropertyDescriptor(ctx, name), _super = /* @__PURE__ */ __name(function() {
2050
+ }, "_super");
2051
+ if (_get && "function" === typeof _get.get)
2052
+ _super = _get.get;
2053
+ Object.defineProperty(ctx, name, {
2054
+ get: /* @__PURE__ */ __name(function overwritingPropertyGetter() {
2055
+ if (!isProxyEnabled() && !flag(this, "lockSsfi")) {
2056
+ flag(this, "ssfi", overwritingPropertyGetter);
2057
+ }
2058
+ let origLockSsfi = flag(this, "lockSsfi");
2059
+ flag(this, "lockSsfi", true);
2060
+ let result = getter(_super).call(this);
2061
+ flag(this, "lockSsfi", origLockSsfi);
2062
+ if (result !== void 0) {
2063
+ return result;
2064
+ }
2065
+ let newAssertion = new Assertion();
2066
+ transferFlags(this, newAssertion);
2067
+ return newAssertion;
2068
+ }, "overwritingPropertyGetter"),
2069
+ configurable: true
2070
+ });
2071
+ }
2072
+ __name(overwriteProperty, "overwriteProperty");
2073
+ function overwriteMethod(ctx, name, method) {
2074
+ let _method = ctx[name], _super = /* @__PURE__ */ __name(function() {
2075
+ throw new Error(name + " is not a function");
2076
+ }, "_super");
2077
+ if (_method && "function" === typeof _method)
2078
+ _super = _method;
2079
+ let overwritingMethodWrapper = /* @__PURE__ */ __name(function() {
2080
+ if (!flag(this, "lockSsfi")) {
2081
+ flag(this, "ssfi", overwritingMethodWrapper);
2082
+ }
2083
+ let origLockSsfi = flag(this, "lockSsfi");
2084
+ flag(this, "lockSsfi", true);
2085
+ let result = method(_super).apply(this, arguments);
2086
+ flag(this, "lockSsfi", origLockSsfi);
2087
+ if (result !== void 0) {
2088
+ return result;
2089
+ }
2090
+ let newAssertion = new Assertion();
2091
+ transferFlags(this, newAssertion);
2092
+ return newAssertion;
2093
+ }, "overwritingMethodWrapper");
2094
+ addLengthGuard(overwritingMethodWrapper, name, false);
2095
+ ctx[name] = proxify(overwritingMethodWrapper, name);
2096
+ }
2097
+ __name(overwriteMethod, "overwriteMethod");
2098
+ var canSetPrototype = typeof Object.setPrototypeOf === "function";
2099
+ var testFn = /* @__PURE__ */ __name(function() {
2100
+ }, "testFn");
2101
+ var excludeNames = Object.getOwnPropertyNames(testFn).filter(function(name) {
2102
+ let propDesc = Object.getOwnPropertyDescriptor(testFn, name);
2103
+ if (typeof propDesc !== "object")
2104
+ return true;
2105
+ return !propDesc.configurable;
2106
+ });
2107
+ var call = Function.prototype.call;
2108
+ var apply = Function.prototype.apply;
2109
+ function addChainableMethod(ctx, name, method, chainingBehavior) {
2110
+ if (typeof chainingBehavior !== "function") {
2111
+ chainingBehavior = /* @__PURE__ */ __name(function() {
2112
+ }, "chainingBehavior");
2113
+ }
2114
+ let chainableBehavior = {
2115
+ method,
2116
+ chainingBehavior
2117
+ };
2118
+ if (!ctx.__methods) {
2119
+ ctx.__methods = {};
2120
+ }
2121
+ ctx.__methods[name] = chainableBehavior;
2122
+ Object.defineProperty(ctx, name, {
2123
+ get: /* @__PURE__ */ __name(function chainableMethodGetter() {
2124
+ chainableBehavior.chainingBehavior.call(this);
2125
+ let chainableMethodWrapper = /* @__PURE__ */ __name(function() {
2126
+ if (!flag(this, "lockSsfi")) {
2127
+ flag(this, "ssfi", chainableMethodWrapper);
2128
+ }
2129
+ let result = chainableBehavior.method.apply(this, arguments);
2130
+ if (result !== void 0) {
2131
+ return result;
2132
+ }
2133
+ let newAssertion = new Assertion();
2134
+ transferFlags(this, newAssertion);
2135
+ return newAssertion;
2136
+ }, "chainableMethodWrapper");
2137
+ addLengthGuard(chainableMethodWrapper, name, true);
2138
+ if (canSetPrototype) {
2139
+ let prototype = Object.create(this);
2140
+ prototype.call = call;
2141
+ prototype.apply = apply;
2142
+ Object.setPrototypeOf(chainableMethodWrapper, prototype);
2143
+ } else {
2144
+ let asserterNames = Object.getOwnPropertyNames(ctx);
2145
+ asserterNames.forEach(function(asserterName) {
2146
+ if (excludeNames.indexOf(asserterName) !== -1) {
2147
+ return;
2148
+ }
2149
+ let pd = Object.getOwnPropertyDescriptor(ctx, asserterName);
2150
+ Object.defineProperty(chainableMethodWrapper, asserterName, pd);
2151
+ });
2152
+ }
2153
+ transferFlags(this, chainableMethodWrapper);
2154
+ return proxify(chainableMethodWrapper);
2155
+ }, "chainableMethodGetter"),
2156
+ configurable: true
2157
+ });
2158
+ }
2159
+ __name(addChainableMethod, "addChainableMethod");
2160
+ function overwriteChainableMethod(ctx, name, method, chainingBehavior) {
2161
+ let chainableBehavior = ctx.__methods[name];
2162
+ let _chainingBehavior = chainableBehavior.chainingBehavior;
2163
+ chainableBehavior.chainingBehavior = /* @__PURE__ */ __name(function overwritingChainableMethodGetter() {
2164
+ let result = chainingBehavior(_chainingBehavior).call(this);
2165
+ if (result !== void 0) {
2166
+ return result;
2167
+ }
2168
+ let newAssertion = new Assertion();
2169
+ transferFlags(this, newAssertion);
2170
+ return newAssertion;
2171
+ }, "overwritingChainableMethodGetter");
2172
+ let _method = chainableBehavior.method;
2173
+ chainableBehavior.method = /* @__PURE__ */ __name(function overwritingChainableMethodWrapper() {
2174
+ let result = method(_method).apply(this, arguments);
2175
+ if (result !== void 0) {
2176
+ return result;
2177
+ }
2178
+ let newAssertion = new Assertion();
2179
+ transferFlags(this, newAssertion);
2180
+ return newAssertion;
2181
+ }, "overwritingChainableMethodWrapper");
2182
+ }
2183
+ __name(overwriteChainableMethod, "overwriteChainableMethod");
2184
+ function compareByInspect(a, b) {
2185
+ return inspect2(a) < inspect2(b) ? -1 : 1;
2186
+ }
2187
+ __name(compareByInspect, "compareByInspect");
2188
+ function getOwnEnumerablePropertySymbols(obj) {
2189
+ if (typeof Object.getOwnPropertySymbols !== "function")
2190
+ return [];
2191
+ return Object.getOwnPropertySymbols(obj).filter(function(sym) {
2192
+ return Object.getOwnPropertyDescriptor(obj, sym).enumerable;
2193
+ });
2194
+ }
2195
+ __name(getOwnEnumerablePropertySymbols, "getOwnEnumerablePropertySymbols");
2196
+ function getOwnEnumerableProperties(obj) {
2197
+ return Object.keys(obj).concat(getOwnEnumerablePropertySymbols(obj));
2198
+ }
2199
+ __name(getOwnEnumerableProperties, "getOwnEnumerableProperties");
2200
+ var isNaN2 = Number.isNaN;
2201
+ function isObjectType(obj) {
2202
+ let objectType = type(obj);
2203
+ let objectTypes = ["Array", "Object", "Function"];
2204
+ return objectTypes.indexOf(objectType) !== -1;
2205
+ }
2206
+ __name(isObjectType, "isObjectType");
2207
+ function getOperator(obj, args) {
2208
+ let operator = flag(obj, "operator");
2209
+ let negate = flag(obj, "negate");
2210
+ let expected = args[3];
2211
+ let msg = negate ? args[2] : args[1];
2212
+ if (operator) {
2213
+ return operator;
2214
+ }
2215
+ if (typeof msg === "function")
2216
+ msg = msg();
2217
+ msg = msg || "";
2218
+ if (!msg) {
2219
+ return void 0;
2220
+ }
2221
+ if (/\shave\s/.test(msg)) {
2222
+ return void 0;
2223
+ }
2224
+ let isObject = isObjectType(expected);
2225
+ if (/\snot\s/.test(msg)) {
2226
+ return isObject ? "notDeepStrictEqual" : "notStrictEqual";
2227
+ }
2228
+ return isObject ? "deepStrictEqual" : "strictEqual";
2229
+ }
2230
+ __name(getOperator, "getOperator");
2231
+ function getName(fn) {
2232
+ return fn.name;
2233
+ }
2234
+ __name(getName, "getName");
2235
+ function isRegExp2(obj) {
2236
+ return Object.prototype.toString.call(obj) === "[object RegExp]";
2237
+ }
2238
+ __name(isRegExp2, "isRegExp");
2239
+ function isNumeric(obj) {
2240
+ return ["Number", "BigInt"].includes(type(obj));
2241
+ }
2242
+ __name(isNumeric, "isNumeric");
2243
+ var { flag: flag2 } = utils_exports;
2244
+ [
2245
+ "to",
2246
+ "be",
2247
+ "been",
2248
+ "is",
2249
+ "and",
2250
+ "has",
2251
+ "have",
2252
+ "with",
2253
+ "that",
2254
+ "which",
2255
+ "at",
2256
+ "of",
2257
+ "same",
2258
+ "but",
2259
+ "does",
2260
+ "still",
2261
+ "also"
2262
+ ].forEach(function(chain) {
2263
+ Assertion.addProperty(chain);
2264
+ });
2265
+ Assertion.addProperty("not", function() {
2266
+ flag2(this, "negate", true);
2267
+ });
2268
+ Assertion.addProperty("deep", function() {
2269
+ flag2(this, "deep", true);
2270
+ });
2271
+ Assertion.addProperty("nested", function() {
2272
+ flag2(this, "nested", true);
2273
+ });
2274
+ Assertion.addProperty("own", function() {
2275
+ flag2(this, "own", true);
2276
+ });
2277
+ Assertion.addProperty("ordered", function() {
2278
+ flag2(this, "ordered", true);
2279
+ });
2280
+ Assertion.addProperty("any", function() {
2281
+ flag2(this, "any", true);
2282
+ flag2(this, "all", false);
2283
+ });
2284
+ Assertion.addProperty("all", function() {
2285
+ flag2(this, "all", true);
2286
+ flag2(this, "any", false);
2287
+ });
2288
+ var functionTypes = {
2289
+ function: [
2290
+ "function",
2291
+ "asyncfunction",
2292
+ "generatorfunction",
2293
+ "asyncgeneratorfunction"
2294
+ ],
2295
+ asyncfunction: ["asyncfunction", "asyncgeneratorfunction"],
2296
+ generatorfunction: ["generatorfunction", "asyncgeneratorfunction"],
2297
+ asyncgeneratorfunction: ["asyncgeneratorfunction"]
2298
+ };
2299
+ function an(type3, msg) {
2300
+ if (msg)
2301
+ flag2(this, "message", msg);
2302
+ type3 = type3.toLowerCase();
2303
+ let obj = flag2(this, "object"), article = ~["a", "e", "i", "o", "u"].indexOf(type3.charAt(0)) ? "an " : "a ";
2304
+ const detectedType = type(obj).toLowerCase();
2305
+ if (functionTypes["function"].includes(type3)) {
2306
+ this.assert(
2307
+ functionTypes[type3].includes(detectedType),
2308
+ "expected #{this} to be " + article + type3,
2309
+ "expected #{this} not to be " + article + type3
2310
+ );
2311
+ } else {
2312
+ this.assert(
2313
+ type3 === detectedType,
2314
+ "expected #{this} to be " + article + type3,
2315
+ "expected #{this} not to be " + article + type3
2316
+ );
2317
+ }
2318
+ }
2319
+ __name(an, "an");
2320
+ Assertion.addChainableMethod("an", an);
2321
+ Assertion.addChainableMethod("a", an);
2322
+ function SameValueZero(a, b) {
2323
+ return isNaN2(a) && isNaN2(b) || a === b;
2324
+ }
2325
+ __name(SameValueZero, "SameValueZero");
2326
+ function includeChainingBehavior() {
2327
+ flag2(this, "contains", true);
2328
+ }
2329
+ __name(includeChainingBehavior, "includeChainingBehavior");
2330
+ function include(val, msg) {
2331
+ if (msg)
2332
+ flag2(this, "message", msg);
2333
+ let obj = flag2(this, "object"), objType = type(obj).toLowerCase(), flagMsg = flag2(this, "message"), negate = flag2(this, "negate"), ssfi = flag2(this, "ssfi"), isDeep = flag2(this, "deep"), descriptor = isDeep ? "deep " : "", isEql = isDeep ? flag2(this, "eql") : SameValueZero;
2334
+ flagMsg = flagMsg ? flagMsg + ": " : "";
2335
+ let included = false;
2336
+ switch (objType) {
2337
+ case "string":
2338
+ included = obj.indexOf(val) !== -1;
2339
+ break;
2340
+ case "weakset":
2341
+ if (isDeep) {
2342
+ throw new AssertionError(
2343
+ flagMsg + "unable to use .deep.include with WeakSet",
2344
+ void 0,
2345
+ ssfi
2346
+ );
2347
+ }
2348
+ included = obj.has(val);
2349
+ break;
2350
+ case "map":
2351
+ obj.forEach(function(item) {
2352
+ included = included || isEql(item, val);
2353
+ });
2354
+ break;
2355
+ case "set":
2356
+ if (isDeep) {
2357
+ obj.forEach(function(item) {
2358
+ included = included || isEql(item, val);
2359
+ });
2360
+ } else {
2361
+ included = obj.has(val);
2362
+ }
2363
+ break;
2364
+ case "array":
2365
+ if (isDeep) {
2366
+ included = obj.some(function(item) {
2367
+ return isEql(item, val);
2368
+ });
2369
+ } else {
2370
+ included = obj.indexOf(val) !== -1;
2371
+ }
2372
+ break;
2373
+ default: {
2374
+ if (val !== Object(val)) {
2375
+ throw new AssertionError(
2376
+ flagMsg + "the given combination of arguments (" + objType + " and " + type(val).toLowerCase() + ") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a " + type(val).toLowerCase(),
2377
+ void 0,
2378
+ ssfi
2379
+ );
2380
+ }
2381
+ let props = Object.keys(val);
2382
+ let firstErr = null;
2383
+ let numErrs = 0;
2384
+ props.forEach(function(prop) {
2385
+ let propAssertion = new Assertion(obj);
2386
+ transferFlags(this, propAssertion, true);
2387
+ flag2(propAssertion, "lockSsfi", true);
2388
+ if (!negate || props.length === 1) {
2389
+ propAssertion.property(prop, val[prop]);
2390
+ return;
2391
+ }
2392
+ try {
2393
+ propAssertion.property(prop, val[prop]);
2394
+ } catch (err) {
2395
+ if (!check_error_exports.compatibleConstructor(err, AssertionError)) {
2396
+ throw err;
2397
+ }
2398
+ if (firstErr === null)
2399
+ firstErr = err;
2400
+ numErrs++;
2401
+ }
2402
+ }, this);
2403
+ if (negate && props.length > 1 && numErrs === props.length) {
2404
+ throw firstErr;
2405
+ }
2406
+ return;
2407
+ }
2408
+ }
2409
+ this.assert(
2410
+ included,
2411
+ "expected #{this} to " + descriptor + "include " + inspect2(val),
2412
+ "expected #{this} to not " + descriptor + "include " + inspect2(val)
2413
+ );
2414
+ }
2415
+ __name(include, "include");
2416
+ Assertion.addChainableMethod("include", include, includeChainingBehavior);
2417
+ Assertion.addChainableMethod("contain", include, includeChainingBehavior);
2418
+ Assertion.addChainableMethod("contains", include, includeChainingBehavior);
2419
+ Assertion.addChainableMethod("includes", include, includeChainingBehavior);
2420
+ Assertion.addProperty("ok", function() {
2421
+ this.assert(
2422
+ flag2(this, "object"),
2423
+ "expected #{this} to be truthy",
2424
+ "expected #{this} to be falsy"
2425
+ );
2426
+ });
2427
+ Assertion.addProperty("true", function() {
2428
+ this.assert(
2429
+ true === flag2(this, "object"),
2430
+ "expected #{this} to be true",
2431
+ "expected #{this} to be false",
2432
+ flag2(this, "negate") ? false : true
2433
+ );
2434
+ });
2435
+ Assertion.addProperty("numeric", function() {
2436
+ const object = flag2(this, "object");
2437
+ this.assert(
2438
+ ["Number", "BigInt"].includes(type(object)),
2439
+ "expected #{this} to be numeric",
2440
+ "expected #{this} to not be numeric",
2441
+ flag2(this, "negate") ? false : true
2442
+ );
2443
+ });
2444
+ Assertion.addProperty("callable", function() {
2445
+ const val = flag2(this, "object");
2446
+ const ssfi = flag2(this, "ssfi");
2447
+ const message = flag2(this, "message");
2448
+ const msg = message ? `${message}: ` : "";
2449
+ const negate = flag2(this, "negate");
2450
+ const assertionMessage = negate ? `${msg}expected ${inspect2(val)} not to be a callable function` : `${msg}expected ${inspect2(val)} to be a callable function`;
2451
+ const isCallable = [
2452
+ "Function",
2453
+ "AsyncFunction",
2454
+ "GeneratorFunction",
2455
+ "AsyncGeneratorFunction"
2456
+ ].includes(type(val));
2457
+ if (isCallable && negate || !isCallable && !negate) {
2458
+ throw new AssertionError(assertionMessage, void 0, ssfi);
2459
+ }
2460
+ });
2461
+ Assertion.addProperty("false", function() {
2462
+ this.assert(
2463
+ false === flag2(this, "object"),
2464
+ "expected #{this} to be false",
2465
+ "expected #{this} to be true",
2466
+ flag2(this, "negate") ? true : false
2467
+ );
2468
+ });
2469
+ Assertion.addProperty("null", function() {
2470
+ this.assert(
2471
+ null === flag2(this, "object"),
2472
+ "expected #{this} to be null",
2473
+ "expected #{this} not to be null"
2474
+ );
2475
+ });
2476
+ Assertion.addProperty("undefined", function() {
2477
+ this.assert(
2478
+ void 0 === flag2(this, "object"),
2479
+ "expected #{this} to be undefined",
2480
+ "expected #{this} not to be undefined"
2481
+ );
2482
+ });
2483
+ Assertion.addProperty("NaN", function() {
2484
+ this.assert(
2485
+ isNaN2(flag2(this, "object")),
2486
+ "expected #{this} to be NaN",
2487
+ "expected #{this} not to be NaN"
2488
+ );
2489
+ });
2490
+ function assertExist() {
2491
+ let val = flag2(this, "object");
2492
+ this.assert(
2493
+ val !== null && val !== void 0,
2494
+ "expected #{this} to exist",
2495
+ "expected #{this} to not exist"
2496
+ );
2497
+ }
2498
+ __name(assertExist, "assertExist");
2499
+ Assertion.addProperty("exist", assertExist);
2500
+ Assertion.addProperty("exists", assertExist);
2501
+ Assertion.addProperty("empty", function() {
2502
+ let val = flag2(this, "object"), ssfi = flag2(this, "ssfi"), flagMsg = flag2(this, "message"), itemsCount;
2503
+ flagMsg = flagMsg ? flagMsg + ": " : "";
2504
+ switch (type(val).toLowerCase()) {
2505
+ case "array":
2506
+ case "string":
2507
+ itemsCount = val.length;
2508
+ break;
2509
+ case "map":
2510
+ case "set":
2511
+ itemsCount = val.size;
2512
+ break;
2513
+ case "weakmap":
2514
+ case "weakset":
2515
+ throw new AssertionError(
2516
+ flagMsg + ".empty was passed a weak collection",
2517
+ void 0,
2518
+ ssfi
2519
+ );
2520
+ case "function": {
2521
+ const msg = flagMsg + ".empty was passed a function " + getName(val);
2522
+ throw new AssertionError(msg.trim(), void 0, ssfi);
2523
+ }
2524
+ default:
2525
+ if (val !== Object(val)) {
2526
+ throw new AssertionError(
2527
+ flagMsg + ".empty was passed non-string primitive " + inspect2(val),
2528
+ void 0,
2529
+ ssfi
2530
+ );
2531
+ }
2532
+ itemsCount = Object.keys(val).length;
2533
+ }
2534
+ this.assert(
2535
+ 0 === itemsCount,
2536
+ "expected #{this} to be empty",
2537
+ "expected #{this} not to be empty"
2538
+ );
2539
+ });
2540
+ function checkArguments() {
2541
+ let obj = flag2(this, "object"), type3 = type(obj);
2542
+ this.assert(
2543
+ "Arguments" === type3,
2544
+ "expected #{this} to be arguments but got " + type3,
2545
+ "expected #{this} to not be arguments"
2546
+ );
2547
+ }
2548
+ __name(checkArguments, "checkArguments");
2549
+ Assertion.addProperty("arguments", checkArguments);
2550
+ Assertion.addProperty("Arguments", checkArguments);
2551
+ function assertEqual(val, msg) {
2552
+ if (msg)
2553
+ flag2(this, "message", msg);
2554
+ let obj = flag2(this, "object");
2555
+ if (flag2(this, "deep")) {
2556
+ let prevLockSsfi = flag2(this, "lockSsfi");
2557
+ flag2(this, "lockSsfi", true);
2558
+ this.eql(val);
2559
+ flag2(this, "lockSsfi", prevLockSsfi);
2560
+ } else {
2561
+ this.assert(
2562
+ val === obj,
2563
+ "expected #{this} to equal #{exp}",
2564
+ "expected #{this} to not equal #{exp}",
2565
+ val,
2566
+ this._obj,
2567
+ true
2568
+ );
2569
+ }
2570
+ }
2571
+ __name(assertEqual, "assertEqual");
2572
+ Assertion.addMethod("equal", assertEqual);
2573
+ Assertion.addMethod("equals", assertEqual);
2574
+ Assertion.addMethod("eq", assertEqual);
2575
+ function assertEql(obj, msg) {
2576
+ if (msg)
2577
+ flag2(this, "message", msg);
2578
+ let eql = flag2(this, "eql");
2579
+ this.assert(
2580
+ eql(obj, flag2(this, "object")),
2581
+ "expected #{this} to deeply equal #{exp}",
2582
+ "expected #{this} to not deeply equal #{exp}",
2583
+ obj,
2584
+ this._obj,
2585
+ true
2586
+ );
2587
+ }
2588
+ __name(assertEql, "assertEql");
2589
+ Assertion.addMethod("eql", assertEql);
2590
+ Assertion.addMethod("eqls", assertEql);
2591
+ function assertAbove(n, msg) {
2592
+ if (msg)
2593
+ flag2(this, "message", msg);
2594
+ let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), nType = type(n).toLowerCase();
2595
+ if (doLength && objType !== "map" && objType !== "set") {
2596
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property("length");
2597
+ }
2598
+ if (!doLength && objType === "date" && nType !== "date") {
2599
+ throw new AssertionError(
2600
+ msgPrefix + "the argument to above must be a date",
2601
+ void 0,
2602
+ ssfi
2603
+ );
2604
+ } else if (!isNumeric(n) && (doLength || isNumeric(obj))) {
2605
+ throw new AssertionError(
2606
+ msgPrefix + "the argument to above must be a number",
2607
+ void 0,
2608
+ ssfi
2609
+ );
2610
+ } else if (!doLength && objType !== "date" && !isNumeric(obj)) {
2611
+ let printObj = objType === "string" ? "'" + obj + "'" : obj;
2612
+ throw new AssertionError(
2613
+ msgPrefix + "expected " + printObj + " to be a number or a date",
2614
+ void 0,
2615
+ ssfi
2616
+ );
2617
+ }
2618
+ if (doLength) {
2619
+ let descriptor = "length", itemsCount;
2620
+ if (objType === "map" || objType === "set") {
2621
+ descriptor = "size";
2622
+ itemsCount = obj.size;
2623
+ } else {
2624
+ itemsCount = obj.length;
2625
+ }
2626
+ this.assert(
2627
+ itemsCount > n,
2628
+ "expected #{this} to have a " + descriptor + " above #{exp} but got #{act}",
2629
+ "expected #{this} to not have a " + descriptor + " above #{exp}",
2630
+ n,
2631
+ itemsCount
2632
+ );
2633
+ } else {
2634
+ this.assert(
2635
+ obj > n,
2636
+ "expected #{this} to be above #{exp}",
2637
+ "expected #{this} to be at most #{exp}",
2638
+ n
2639
+ );
2640
+ }
2641
+ }
2642
+ __name(assertAbove, "assertAbove");
2643
+ Assertion.addMethod("above", assertAbove);
2644
+ Assertion.addMethod("gt", assertAbove);
2645
+ Assertion.addMethod("greaterThan", assertAbove);
2646
+ function assertLeast(n, msg) {
2647
+ if (msg)
2648
+ flag2(this, "message", msg);
2649
+ let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), nType = type(n).toLowerCase(), errorMessage, shouldThrow = true;
2650
+ if (doLength && objType !== "map" && objType !== "set") {
2651
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property("length");
2652
+ }
2653
+ if (!doLength && objType === "date" && nType !== "date") {
2654
+ errorMessage = msgPrefix + "the argument to least must be a date";
2655
+ } else if (!isNumeric(n) && (doLength || isNumeric(obj))) {
2656
+ errorMessage = msgPrefix + "the argument to least must be a number";
2657
+ } else if (!doLength && objType !== "date" && !isNumeric(obj)) {
2658
+ let printObj = objType === "string" ? "'" + obj + "'" : obj;
2659
+ errorMessage = msgPrefix + "expected " + printObj + " to be a number or a date";
2660
+ } else {
2661
+ shouldThrow = false;
2662
+ }
2663
+ if (shouldThrow) {
2664
+ throw new AssertionError(errorMessage, void 0, ssfi);
2665
+ }
2666
+ if (doLength) {
2667
+ let descriptor = "length", itemsCount;
2668
+ if (objType === "map" || objType === "set") {
2669
+ descriptor = "size";
2670
+ itemsCount = obj.size;
2671
+ } else {
2672
+ itemsCount = obj.length;
2673
+ }
2674
+ this.assert(
2675
+ itemsCount >= n,
2676
+ "expected #{this} to have a " + descriptor + " at least #{exp} but got #{act}",
2677
+ "expected #{this} to have a " + descriptor + " below #{exp}",
2678
+ n,
2679
+ itemsCount
2680
+ );
2681
+ } else {
2682
+ this.assert(
2683
+ obj >= n,
2684
+ "expected #{this} to be at least #{exp}",
2685
+ "expected #{this} to be below #{exp}",
2686
+ n
2687
+ );
2688
+ }
2689
+ }
2690
+ __name(assertLeast, "assertLeast");
2691
+ Assertion.addMethod("least", assertLeast);
2692
+ Assertion.addMethod("gte", assertLeast);
2693
+ Assertion.addMethod("greaterThanOrEqual", assertLeast);
2694
+ function assertBelow(n, msg) {
2695
+ if (msg)
2696
+ flag2(this, "message", msg);
2697
+ let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), nType = type(n).toLowerCase(), errorMessage, shouldThrow = true;
2698
+ if (doLength && objType !== "map" && objType !== "set") {
2699
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property("length");
2700
+ }
2701
+ if (!doLength && objType === "date" && nType !== "date") {
2702
+ errorMessage = msgPrefix + "the argument to below must be a date";
2703
+ } else if (!isNumeric(n) && (doLength || isNumeric(obj))) {
2704
+ errorMessage = msgPrefix + "the argument to below must be a number";
2705
+ } else if (!doLength && objType !== "date" && !isNumeric(obj)) {
2706
+ let printObj = objType === "string" ? "'" + obj + "'" : obj;
2707
+ errorMessage = msgPrefix + "expected " + printObj + " to be a number or a date";
2708
+ } else {
2709
+ shouldThrow = false;
2710
+ }
2711
+ if (shouldThrow) {
2712
+ throw new AssertionError(errorMessage, void 0, ssfi);
2713
+ }
2714
+ if (doLength) {
2715
+ let descriptor = "length", itemsCount;
2716
+ if (objType === "map" || objType === "set") {
2717
+ descriptor = "size";
2718
+ itemsCount = obj.size;
2719
+ } else {
2720
+ itemsCount = obj.length;
2721
+ }
2722
+ this.assert(
2723
+ itemsCount < n,
2724
+ "expected #{this} to have a " + descriptor + " below #{exp} but got #{act}",
2725
+ "expected #{this} to not have a " + descriptor + " below #{exp}",
2726
+ n,
2727
+ itemsCount
2728
+ );
2729
+ } else {
2730
+ this.assert(
2731
+ obj < n,
2732
+ "expected #{this} to be below #{exp}",
2733
+ "expected #{this} to be at least #{exp}",
2734
+ n
2735
+ );
2736
+ }
2737
+ }
2738
+ __name(assertBelow, "assertBelow");
2739
+ Assertion.addMethod("below", assertBelow);
2740
+ Assertion.addMethod("lt", assertBelow);
2741
+ Assertion.addMethod("lessThan", assertBelow);
2742
+ function assertMost(n, msg) {
2743
+ if (msg)
2744
+ flag2(this, "message", msg);
2745
+ let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), nType = type(n).toLowerCase(), errorMessage, shouldThrow = true;
2746
+ if (doLength && objType !== "map" && objType !== "set") {
2747
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property("length");
2748
+ }
2749
+ if (!doLength && objType === "date" && nType !== "date") {
2750
+ errorMessage = msgPrefix + "the argument to most must be a date";
2751
+ } else if (!isNumeric(n) && (doLength || isNumeric(obj))) {
2752
+ errorMessage = msgPrefix + "the argument to most must be a number";
2753
+ } else if (!doLength && objType !== "date" && !isNumeric(obj)) {
2754
+ let printObj = objType === "string" ? "'" + obj + "'" : obj;
2755
+ errorMessage = msgPrefix + "expected " + printObj + " to be a number or a date";
2756
+ } else {
2757
+ shouldThrow = false;
2758
+ }
2759
+ if (shouldThrow) {
2760
+ throw new AssertionError(errorMessage, void 0, ssfi);
2761
+ }
2762
+ if (doLength) {
2763
+ let descriptor = "length", itemsCount;
2764
+ if (objType === "map" || objType === "set") {
2765
+ descriptor = "size";
2766
+ itemsCount = obj.size;
2767
+ } else {
2768
+ itemsCount = obj.length;
2769
+ }
2770
+ this.assert(
2771
+ itemsCount <= n,
2772
+ "expected #{this} to have a " + descriptor + " at most #{exp} but got #{act}",
2773
+ "expected #{this} to have a " + descriptor + " above #{exp}",
2774
+ n,
2775
+ itemsCount
2776
+ );
2777
+ } else {
2778
+ this.assert(
2779
+ obj <= n,
2780
+ "expected #{this} to be at most #{exp}",
2781
+ "expected #{this} to be above #{exp}",
2782
+ n
2783
+ );
2784
+ }
2785
+ }
2786
+ __name(assertMost, "assertMost");
2787
+ Assertion.addMethod("most", assertMost);
2788
+ Assertion.addMethod("lte", assertMost);
2789
+ Assertion.addMethod("lessThanOrEqual", assertMost);
2790
+ Assertion.addMethod("within", function(start, finish, msg) {
2791
+ if (msg)
2792
+ flag2(this, "message", msg);
2793
+ let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), startType = type(start).toLowerCase(), finishType = type(finish).toLowerCase(), errorMessage, shouldThrow = true, range = startType === "date" && finishType === "date" ? start.toISOString() + ".." + finish.toISOString() : start + ".." + finish;
2794
+ if (doLength && objType !== "map" && objType !== "set") {
2795
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property("length");
2796
+ }
2797
+ if (!doLength && objType === "date" && (startType !== "date" || finishType !== "date")) {
2798
+ errorMessage = msgPrefix + "the arguments to within must be dates";
2799
+ } else if ((!isNumeric(start) || !isNumeric(finish)) && (doLength || isNumeric(obj))) {
2800
+ errorMessage = msgPrefix + "the arguments to within must be numbers";
2801
+ } else if (!doLength && objType !== "date" && !isNumeric(obj)) {
2802
+ let printObj = objType === "string" ? "'" + obj + "'" : obj;
2803
+ errorMessage = msgPrefix + "expected " + printObj + " to be a number or a date";
2804
+ } else {
2805
+ shouldThrow = false;
2806
+ }
2807
+ if (shouldThrow) {
2808
+ throw new AssertionError(errorMessage, void 0, ssfi);
2809
+ }
2810
+ if (doLength) {
2811
+ let descriptor = "length", itemsCount;
2812
+ if (objType === "map" || objType === "set") {
2813
+ descriptor = "size";
2814
+ itemsCount = obj.size;
2815
+ } else {
2816
+ itemsCount = obj.length;
2817
+ }
2818
+ this.assert(
2819
+ itemsCount >= start && itemsCount <= finish,
2820
+ "expected #{this} to have a " + descriptor + " within " + range,
2821
+ "expected #{this} to not have a " + descriptor + " within " + range
2822
+ );
2823
+ } else {
2824
+ this.assert(
2825
+ obj >= start && obj <= finish,
2826
+ "expected #{this} to be within " + range,
2827
+ "expected #{this} to not be within " + range
2828
+ );
2829
+ }
2830
+ });
2831
+ function assertInstanceOf(constructor, msg) {
2832
+ if (msg)
2833
+ flag2(this, "message", msg);
2834
+ let target = flag2(this, "object");
2835
+ let ssfi = flag2(this, "ssfi");
2836
+ let flagMsg = flag2(this, "message");
2837
+ let isInstanceOf;
2838
+ try {
2839
+ isInstanceOf = target instanceof constructor;
2840
+ } catch (err) {
2841
+ if (err instanceof TypeError) {
2842
+ flagMsg = flagMsg ? flagMsg + ": " : "";
2843
+ throw new AssertionError(
2844
+ flagMsg + "The instanceof assertion needs a constructor but " + type(constructor) + " was given.",
2845
+ void 0,
2846
+ ssfi
2847
+ );
2848
+ }
2849
+ throw err;
2850
+ }
2851
+ let name = getName(constructor);
2852
+ if (name == null) {
2853
+ name = "an unnamed constructor";
2854
+ }
2855
+ this.assert(
2856
+ isInstanceOf,
2857
+ "expected #{this} to be an instance of " + name,
2858
+ "expected #{this} to not be an instance of " + name
2859
+ );
2860
+ }
2861
+ __name(assertInstanceOf, "assertInstanceOf");
2862
+ Assertion.addMethod("instanceof", assertInstanceOf);
2863
+ Assertion.addMethod("instanceOf", assertInstanceOf);
2864
+ function assertProperty(name, val, msg) {
2865
+ if (msg)
2866
+ flag2(this, "message", msg);
2867
+ let isNested = flag2(this, "nested"), isOwn = flag2(this, "own"), flagMsg = flag2(this, "message"), obj = flag2(this, "object"), ssfi = flag2(this, "ssfi"), nameType = typeof name;
2868
+ flagMsg = flagMsg ? flagMsg + ": " : "";
2869
+ if (isNested) {
2870
+ if (nameType !== "string") {
2871
+ throw new AssertionError(
2872
+ flagMsg + "the argument to property must be a string when using nested syntax",
2873
+ void 0,
2874
+ ssfi
2875
+ );
2876
+ }
2877
+ } else {
2878
+ if (nameType !== "string" && nameType !== "number" && nameType !== "symbol") {
2879
+ throw new AssertionError(
2880
+ flagMsg + "the argument to property must be a string, number, or symbol",
2881
+ void 0,
2882
+ ssfi
2883
+ );
2884
+ }
2885
+ }
2886
+ if (isNested && isOwn) {
2887
+ throw new AssertionError(
2888
+ flagMsg + 'The "nested" and "own" flags cannot be combined.',
2889
+ void 0,
2890
+ ssfi
2891
+ );
2892
+ }
2893
+ if (obj === null || obj === void 0) {
2894
+ throw new AssertionError(
2895
+ flagMsg + "Target cannot be null or undefined.",
2896
+ void 0,
2897
+ ssfi
2898
+ );
2899
+ }
2900
+ let isDeep = flag2(this, "deep"), negate = flag2(this, "negate"), pathInfo = isNested ? getPathInfo(obj, name) : null, value = isNested ? pathInfo.value : obj[name], isEql = isDeep ? flag2(this, "eql") : (val1, val2) => val1 === val2;
2901
+ let descriptor = "";
2902
+ if (isDeep)
2903
+ descriptor += "deep ";
2904
+ if (isOwn)
2905
+ descriptor += "own ";
2906
+ if (isNested)
2907
+ descriptor += "nested ";
2908
+ descriptor += "property ";
2909
+ let hasProperty2;
2910
+ if (isOwn)
2911
+ hasProperty2 = Object.prototype.hasOwnProperty.call(obj, name);
2912
+ else if (isNested)
2913
+ hasProperty2 = pathInfo.exists;
2914
+ else
2915
+ hasProperty2 = hasProperty(obj, name);
2916
+ if (!negate || arguments.length === 1) {
2917
+ this.assert(
2918
+ hasProperty2,
2919
+ "expected #{this} to have " + descriptor + inspect2(name),
2920
+ "expected #{this} to not have " + descriptor + inspect2(name)
2921
+ );
2922
+ }
2923
+ if (arguments.length > 1) {
2924
+ this.assert(
2925
+ hasProperty2 && isEql(val, value),
2926
+ "expected #{this} to have " + descriptor + inspect2(name) + " of #{exp}, but got #{act}",
2927
+ "expected #{this} to not have " + descriptor + inspect2(name) + " of #{act}",
2928
+ val,
2929
+ value
2930
+ );
2931
+ }
2932
+ flag2(this, "object", value);
2933
+ }
2934
+ __name(assertProperty, "assertProperty");
2935
+ Assertion.addMethod("property", assertProperty);
2936
+ function assertOwnProperty(_name, _value, _msg) {
2937
+ flag2(this, "own", true);
2938
+ assertProperty.apply(this, arguments);
2939
+ }
2940
+ __name(assertOwnProperty, "assertOwnProperty");
2941
+ Assertion.addMethod("ownProperty", assertOwnProperty);
2942
+ Assertion.addMethod("haveOwnProperty", assertOwnProperty);
2943
+ function assertOwnPropertyDescriptor(name, descriptor, msg) {
2944
+ if (typeof descriptor === "string") {
2945
+ msg = descriptor;
2946
+ descriptor = null;
2947
+ }
2948
+ if (msg)
2949
+ flag2(this, "message", msg);
2950
+ let obj = flag2(this, "object");
2951
+ let actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name);
2952
+ let eql = flag2(this, "eql");
2953
+ if (actualDescriptor && descriptor) {
2954
+ this.assert(
2955
+ eql(descriptor, actualDescriptor),
2956
+ "expected the own property descriptor for " + inspect2(name) + " on #{this} to match " + inspect2(descriptor) + ", got " + inspect2(actualDescriptor),
2957
+ "expected the own property descriptor for " + inspect2(name) + " on #{this} to not match " + inspect2(descriptor),
2958
+ descriptor,
2959
+ actualDescriptor,
2960
+ true
2961
+ );
2962
+ } else {
2963
+ this.assert(
2964
+ actualDescriptor,
2965
+ "expected #{this} to have an own property descriptor for " + inspect2(name),
2966
+ "expected #{this} to not have an own property descriptor for " + inspect2(name)
2967
+ );
2968
+ }
2969
+ flag2(this, "object", actualDescriptor);
2970
+ }
2971
+ __name(assertOwnPropertyDescriptor, "assertOwnPropertyDescriptor");
2972
+ Assertion.addMethod("ownPropertyDescriptor", assertOwnPropertyDescriptor);
2973
+ Assertion.addMethod("haveOwnPropertyDescriptor", assertOwnPropertyDescriptor);
2974
+ function assertLengthChain() {
2975
+ flag2(this, "doLength", true);
2976
+ }
2977
+ __name(assertLengthChain, "assertLengthChain");
2978
+ function assertLength(n, msg) {
2979
+ if (msg)
2980
+ flag2(this, "message", msg);
2981
+ let obj = flag2(this, "object"), objType = type(obj).toLowerCase(), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi"), descriptor = "length", itemsCount;
2982
+ switch (objType) {
2983
+ case "map":
2984
+ case "set":
2985
+ descriptor = "size";
2986
+ itemsCount = obj.size;
2987
+ break;
2988
+ default:
2989
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property("length");
2990
+ itemsCount = obj.length;
2991
+ }
2992
+ this.assert(
2993
+ itemsCount == n,
2994
+ "expected #{this} to have a " + descriptor + " of #{exp} but got #{act}",
2995
+ "expected #{this} to not have a " + descriptor + " of #{act}",
2996
+ n,
2997
+ itemsCount
2998
+ );
2999
+ }
3000
+ __name(assertLength, "assertLength");
3001
+ Assertion.addChainableMethod("length", assertLength, assertLengthChain);
3002
+ Assertion.addChainableMethod("lengthOf", assertLength, assertLengthChain);
3003
+ function assertMatch(re, msg) {
3004
+ if (msg)
3005
+ flag2(this, "message", msg);
3006
+ let obj = flag2(this, "object");
3007
+ this.assert(
3008
+ re.exec(obj),
3009
+ "expected #{this} to match " + re,
3010
+ "expected #{this} not to match " + re
3011
+ );
3012
+ }
3013
+ __name(assertMatch, "assertMatch");
3014
+ Assertion.addMethod("match", assertMatch);
3015
+ Assertion.addMethod("matches", assertMatch);
3016
+ Assertion.addMethod("string", function(str, msg) {
3017
+ if (msg)
3018
+ flag2(this, "message", msg);
3019
+ let obj = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
3020
+ new Assertion(obj, flagMsg, ssfi, true).is.a("string");
3021
+ this.assert(
3022
+ ~obj.indexOf(str),
3023
+ "expected #{this} to contain " + inspect2(str),
3024
+ "expected #{this} to not contain " + inspect2(str)
3025
+ );
3026
+ });
3027
+ function assertKeys(keys) {
3028
+ let obj = flag2(this, "object"), objType = type(obj), keysType = type(keys), ssfi = flag2(this, "ssfi"), isDeep = flag2(this, "deep"), str, deepStr = "", actual, ok = true, flagMsg = flag2(this, "message");
3029
+ flagMsg = flagMsg ? flagMsg + ": " : "";
3030
+ let mixedArgsMsg = flagMsg + "when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";
3031
+ if (objType === "Map" || objType === "Set") {
3032
+ deepStr = isDeep ? "deeply " : "";
3033
+ actual = [];
3034
+ obj.forEach(function(val, key) {
3035
+ actual.push(key);
3036
+ });
3037
+ if (keysType !== "Array") {
3038
+ keys = Array.prototype.slice.call(arguments);
3039
+ }
3040
+ } else {
3041
+ actual = getOwnEnumerableProperties(obj);
3042
+ switch (keysType) {
3043
+ case "Array":
3044
+ if (arguments.length > 1) {
3045
+ throw new AssertionError(mixedArgsMsg, void 0, ssfi);
3046
+ }
3047
+ break;
3048
+ case "Object":
3049
+ if (arguments.length > 1) {
3050
+ throw new AssertionError(mixedArgsMsg, void 0, ssfi);
3051
+ }
3052
+ keys = Object.keys(keys);
3053
+ break;
3054
+ default:
3055
+ keys = Array.prototype.slice.call(arguments);
3056
+ }
3057
+ keys = keys.map(function(val) {
3058
+ return typeof val === "symbol" ? val : String(val);
3059
+ });
3060
+ }
3061
+ if (!keys.length) {
3062
+ throw new AssertionError(flagMsg + "keys required", void 0, ssfi);
3063
+ }
3064
+ let len = keys.length, any = flag2(this, "any"), all = flag2(this, "all"), expected = keys, isEql = isDeep ? flag2(this, "eql") : (val1, val2) => val1 === val2;
3065
+ if (!any && !all) {
3066
+ all = true;
3067
+ }
3068
+ if (any) {
3069
+ ok = expected.some(function(expectedKey) {
3070
+ return actual.some(function(actualKey) {
3071
+ return isEql(expectedKey, actualKey);
3072
+ });
3073
+ });
3074
+ }
3075
+ if (all) {
3076
+ ok = expected.every(function(expectedKey) {
3077
+ return actual.some(function(actualKey) {
3078
+ return isEql(expectedKey, actualKey);
3079
+ });
3080
+ });
3081
+ if (!flag2(this, "contains")) {
3082
+ ok = ok && keys.length == actual.length;
3083
+ }
3084
+ }
3085
+ if (len > 1) {
3086
+ keys = keys.map(function(key) {
3087
+ return inspect2(key);
3088
+ });
3089
+ let last = keys.pop();
3090
+ if (all) {
3091
+ str = keys.join(", ") + ", and " + last;
3092
+ }
3093
+ if (any) {
3094
+ str = keys.join(", ") + ", or " + last;
3095
+ }
3096
+ } else {
3097
+ str = inspect2(keys[0]);
3098
+ }
3099
+ str = (len > 1 ? "keys " : "key ") + str;
3100
+ str = (flag2(this, "contains") ? "contain " : "have ") + str;
3101
+ this.assert(
3102
+ ok,
3103
+ "expected #{this} to " + deepStr + str,
3104
+ "expected #{this} to not " + deepStr + str,
3105
+ expected.slice(0).sort(compareByInspect),
3106
+ actual.sort(compareByInspect),
3107
+ true
3108
+ );
3109
+ }
3110
+ __name(assertKeys, "assertKeys");
3111
+ Assertion.addMethod("keys", assertKeys);
3112
+ Assertion.addMethod("key", assertKeys);
3113
+ function assertThrows(errorLike, errMsgMatcher, msg) {
3114
+ if (msg)
3115
+ flag2(this, "message", msg);
3116
+ let obj = flag2(this, "object"), ssfi = flag2(this, "ssfi"), flagMsg = flag2(this, "message"), negate = flag2(this, "negate") || false;
3117
+ new Assertion(obj, flagMsg, ssfi, true).is.a("function");
3118
+ if (isRegExp2(errorLike) || typeof errorLike === "string") {
3119
+ errMsgMatcher = errorLike;
3120
+ errorLike = null;
3121
+ }
3122
+ let caughtErr;
3123
+ let errorWasThrown = false;
3124
+ try {
3125
+ obj();
3126
+ } catch (err) {
3127
+ errorWasThrown = true;
3128
+ caughtErr = err;
3129
+ }
3130
+ let everyArgIsUndefined = errorLike === void 0 && errMsgMatcher === void 0;
3131
+ let everyArgIsDefined = Boolean(errorLike && errMsgMatcher);
3132
+ let errorLikeFail = false;
3133
+ let errMsgMatcherFail = false;
3134
+ if (everyArgIsUndefined || !everyArgIsUndefined && !negate) {
3135
+ let errorLikeString = "an error";
3136
+ if (errorLike instanceof Error) {
3137
+ errorLikeString = "#{exp}";
3138
+ } else if (errorLike) {
3139
+ errorLikeString = check_error_exports.getConstructorName(errorLike);
3140
+ }
3141
+ let actual = caughtErr;
3142
+ if (caughtErr instanceof Error) {
3143
+ actual = caughtErr.toString();
3144
+ } else if (typeof caughtErr === "string") {
3145
+ actual = caughtErr;
3146
+ } else if (caughtErr && (typeof caughtErr === "object" || typeof caughtErr === "function")) {
3147
+ try {
3148
+ actual = check_error_exports.getConstructorName(caughtErr);
3149
+ } catch (_err) {
3150
+ }
3151
+ }
3152
+ this.assert(
3153
+ errorWasThrown,
3154
+ "expected #{this} to throw " + errorLikeString,
3155
+ "expected #{this} to not throw an error but #{act} was thrown",
3156
+ errorLike && errorLike.toString(),
3157
+ actual
3158
+ );
3159
+ }
3160
+ if (errorLike && caughtErr) {
3161
+ if (errorLike instanceof Error) {
3162
+ let isCompatibleInstance = check_error_exports.compatibleInstance(
3163
+ caughtErr,
3164
+ errorLike
3165
+ );
3166
+ if (isCompatibleInstance === negate) {
3167
+ if (everyArgIsDefined && negate) {
3168
+ errorLikeFail = true;
3169
+ } else {
3170
+ this.assert(
3171
+ negate,
3172
+ "expected #{this} to throw #{exp} but #{act} was thrown",
3173
+ "expected #{this} to not throw #{exp}" + (caughtErr && !negate ? " but #{act} was thrown" : ""),
3174
+ errorLike.toString(),
3175
+ caughtErr.toString()
3176
+ );
3177
+ }
3178
+ }
3179
+ }
3180
+ let isCompatibleConstructor = check_error_exports.compatibleConstructor(
3181
+ caughtErr,
3182
+ errorLike
3183
+ );
3184
+ if (isCompatibleConstructor === negate) {
3185
+ if (everyArgIsDefined && negate) {
3186
+ errorLikeFail = true;
3187
+ } else {
3188
+ this.assert(
3189
+ negate,
3190
+ "expected #{this} to throw #{exp} but #{act} was thrown",
3191
+ "expected #{this} to not throw #{exp}" + (caughtErr ? " but #{act} was thrown" : ""),
3192
+ errorLike instanceof Error ? errorLike.toString() : errorLike && check_error_exports.getConstructorName(errorLike),
3193
+ caughtErr instanceof Error ? caughtErr.toString() : caughtErr && check_error_exports.getConstructorName(caughtErr)
3194
+ );
3195
+ }
3196
+ }
3197
+ }
3198
+ if (caughtErr && errMsgMatcher !== void 0 && errMsgMatcher !== null) {
3199
+ let placeholder = "including";
3200
+ if (isRegExp2(errMsgMatcher)) {
3201
+ placeholder = "matching";
3202
+ }
3203
+ let isCompatibleMessage = check_error_exports.compatibleMessage(
3204
+ caughtErr,
3205
+ errMsgMatcher
3206
+ );
3207
+ if (isCompatibleMessage === negate) {
3208
+ if (everyArgIsDefined && negate) {
3209
+ errMsgMatcherFail = true;
3210
+ } else {
3211
+ this.assert(
3212
+ negate,
3213
+ "expected #{this} to throw error " + placeholder + " #{exp} but got #{act}",
3214
+ "expected #{this} to throw error not " + placeholder + " #{exp}",
3215
+ errMsgMatcher,
3216
+ check_error_exports.getMessage(caughtErr)
3217
+ );
3218
+ }
3219
+ }
3220
+ }
3221
+ if (errorLikeFail && errMsgMatcherFail) {
3222
+ this.assert(
3223
+ negate,
3224
+ "expected #{this} to throw #{exp} but #{act} was thrown",
3225
+ "expected #{this} to not throw #{exp}" + (caughtErr ? " but #{act} was thrown" : ""),
3226
+ errorLike instanceof Error ? errorLike.toString() : errorLike && check_error_exports.getConstructorName(errorLike),
3227
+ caughtErr instanceof Error ? caughtErr.toString() : caughtErr && check_error_exports.getConstructorName(caughtErr)
3228
+ );
3229
+ }
3230
+ flag2(this, "object", caughtErr);
3231
+ }
3232
+ __name(assertThrows, "assertThrows");
3233
+ Assertion.addMethod("throw", assertThrows);
3234
+ Assertion.addMethod("throws", assertThrows);
3235
+ Assertion.addMethod("Throw", assertThrows);
3236
+ function respondTo(method, msg) {
3237
+ if (msg)
3238
+ flag2(this, "message", msg);
3239
+ let obj = flag2(this, "object"), itself = flag2(this, "itself"), context = "function" === typeof obj && !itself ? obj.prototype[method] : obj[method];
3240
+ this.assert(
3241
+ "function" === typeof context,
3242
+ "expected #{this} to respond to " + inspect2(method),
3243
+ "expected #{this} to not respond to " + inspect2(method)
3244
+ );
3245
+ }
3246
+ __name(respondTo, "respondTo");
3247
+ Assertion.addMethod("respondTo", respondTo);
3248
+ Assertion.addMethod("respondsTo", respondTo);
3249
+ Assertion.addProperty("itself", function() {
3250
+ flag2(this, "itself", true);
3251
+ });
3252
+ function satisfy(matcher, msg) {
3253
+ if (msg)
3254
+ flag2(this, "message", msg);
3255
+ let obj = flag2(this, "object");
3256
+ let result = matcher(obj);
3257
+ this.assert(
3258
+ result,
3259
+ "expected #{this} to satisfy " + objDisplay(matcher),
3260
+ "expected #{this} to not satisfy" + objDisplay(matcher),
3261
+ flag2(this, "negate") ? false : true,
3262
+ result
3263
+ );
3264
+ }
3265
+ __name(satisfy, "satisfy");
3266
+ Assertion.addMethod("satisfy", satisfy);
3267
+ Assertion.addMethod("satisfies", satisfy);
3268
+ function closeTo(expected, delta, msg) {
3269
+ if (msg)
3270
+ flag2(this, "message", msg);
3271
+ let obj = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
3272
+ new Assertion(obj, flagMsg, ssfi, true).is.numeric;
3273
+ let message = "A `delta` value is required for `closeTo`";
3274
+ if (delta == void 0) {
3275
+ throw new AssertionError(
3276
+ flagMsg ? `${flagMsg}: ${message}` : message,
3277
+ void 0,
3278
+ ssfi
3279
+ );
3280
+ }
3281
+ new Assertion(delta, flagMsg, ssfi, true).is.numeric;
3282
+ message = "A `expected` value is required for `closeTo`";
3283
+ if (expected == void 0) {
3284
+ throw new AssertionError(
3285
+ flagMsg ? `${flagMsg}: ${message}` : message,
3286
+ void 0,
3287
+ ssfi
3288
+ );
3289
+ }
3290
+ new Assertion(expected, flagMsg, ssfi, true).is.numeric;
3291
+ const abs = /* @__PURE__ */ __name((x) => x < 0n ? -x : x, "abs");
3292
+ const strip = /* @__PURE__ */ __name((number) => parseFloat(parseFloat(number).toPrecision(12)), "strip");
3293
+ this.assert(
3294
+ strip(abs(obj - expected)) <= delta,
3295
+ "expected #{this} to be close to " + expected + " +/- " + delta,
3296
+ "expected #{this} not to be close to " + expected + " +/- " + delta
3297
+ );
3298
+ }
3299
+ __name(closeTo, "closeTo");
3300
+ Assertion.addMethod("closeTo", closeTo);
3301
+ Assertion.addMethod("approximately", closeTo);
3302
+ function isSubsetOf(_subset, _superset, cmp, contains, ordered) {
3303
+ let superset = Array.from(_superset);
3304
+ let subset = Array.from(_subset);
3305
+ if (!contains) {
3306
+ if (subset.length !== superset.length)
3307
+ return false;
3308
+ superset = superset.slice();
3309
+ }
3310
+ return subset.every(function(elem, idx) {
3311
+ if (ordered)
3312
+ return cmp ? cmp(elem, superset[idx]) : elem === superset[idx];
3313
+ if (!cmp) {
3314
+ let matchIdx = superset.indexOf(elem);
3315
+ if (matchIdx === -1)
3316
+ return false;
3317
+ if (!contains)
3318
+ superset.splice(matchIdx, 1);
3319
+ return true;
3320
+ }
3321
+ return superset.some(function(elem2, matchIdx) {
3322
+ if (!cmp(elem, elem2))
3323
+ return false;
3324
+ if (!contains)
3325
+ superset.splice(matchIdx, 1);
3326
+ return true;
3327
+ });
3328
+ });
3329
+ }
3330
+ __name(isSubsetOf, "isSubsetOf");
3331
+ Assertion.addMethod("members", function(subset, msg) {
3332
+ if (msg)
3333
+ flag2(this, "message", msg);
3334
+ let obj = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
3335
+ new Assertion(obj, flagMsg, ssfi, true).to.be.iterable;
3336
+ new Assertion(subset, flagMsg, ssfi, true).to.be.iterable;
3337
+ let contains = flag2(this, "contains");
3338
+ let ordered = flag2(this, "ordered");
3339
+ let subject, failMsg, failNegateMsg;
3340
+ if (contains) {
3341
+ subject = ordered ? "an ordered superset" : "a superset";
3342
+ failMsg = "expected #{this} to be " + subject + " of #{exp}";
3343
+ failNegateMsg = "expected #{this} to not be " + subject + " of #{exp}";
3344
+ } else {
3345
+ subject = ordered ? "ordered members" : "members";
3346
+ failMsg = "expected #{this} to have the same " + subject + " as #{exp}";
3347
+ failNegateMsg = "expected #{this} to not have the same " + subject + " as #{exp}";
3348
+ }
3349
+ let cmp = flag2(this, "deep") ? flag2(this, "eql") : void 0;
3350
+ this.assert(
3351
+ isSubsetOf(subset, obj, cmp, contains, ordered),
3352
+ failMsg,
3353
+ failNegateMsg,
3354
+ subset,
3355
+ obj,
3356
+ true
3357
+ );
3358
+ });
3359
+ Assertion.addProperty("iterable", function(msg) {
3360
+ if (msg)
3361
+ flag2(this, "message", msg);
3362
+ let obj = flag2(this, "object");
3363
+ this.assert(
3364
+ obj != void 0 && obj[Symbol.iterator],
3365
+ "expected #{this} to be an iterable",
3366
+ "expected #{this} to not be an iterable",
3367
+ obj
3368
+ );
3369
+ });
3370
+ function oneOf(list, msg) {
3371
+ if (msg)
3372
+ flag2(this, "message", msg);
3373
+ let expected = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi"), contains = flag2(this, "contains"), isDeep = flag2(this, "deep"), eql = flag2(this, "eql");
3374
+ new Assertion(list, flagMsg, ssfi, true).to.be.an("array");
3375
+ if (contains) {
3376
+ this.assert(
3377
+ list.some(function(possibility) {
3378
+ return expected.indexOf(possibility) > -1;
3379
+ }),
3380
+ "expected #{this} to contain one of #{exp}",
3381
+ "expected #{this} to not contain one of #{exp}",
3382
+ list,
3383
+ expected
3384
+ );
3385
+ } else {
3386
+ if (isDeep) {
3387
+ this.assert(
3388
+ list.some(function(possibility) {
3389
+ return eql(expected, possibility);
3390
+ }),
3391
+ "expected #{this} to deeply equal one of #{exp}",
3392
+ "expected #{this} to deeply equal one of #{exp}",
3393
+ list,
3394
+ expected
3395
+ );
3396
+ } else {
3397
+ this.assert(
3398
+ list.indexOf(expected) > -1,
3399
+ "expected #{this} to be one of #{exp}",
3400
+ "expected #{this} to not be one of #{exp}",
3401
+ list,
3402
+ expected
3403
+ );
3404
+ }
3405
+ }
3406
+ }
3407
+ __name(oneOf, "oneOf");
3408
+ Assertion.addMethod("oneOf", oneOf);
3409
+ function assertChanges(subject, prop, msg) {
3410
+ if (msg)
3411
+ flag2(this, "message", msg);
3412
+ let fn = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
3413
+ new Assertion(fn, flagMsg, ssfi, true).is.a("function");
3414
+ let initial;
3415
+ if (!prop) {
3416
+ new Assertion(subject, flagMsg, ssfi, true).is.a("function");
3417
+ initial = subject();
3418
+ } else {
3419
+ new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);
3420
+ initial = subject[prop];
3421
+ }
3422
+ fn();
3423
+ let final = prop === void 0 || prop === null ? subject() : subject[prop];
3424
+ let msgObj = prop === void 0 || prop === null ? initial : "." + prop;
3425
+ flag2(this, "deltaMsgObj", msgObj);
3426
+ flag2(this, "initialDeltaValue", initial);
3427
+ flag2(this, "finalDeltaValue", final);
3428
+ flag2(this, "deltaBehavior", "change");
3429
+ flag2(this, "realDelta", final !== initial);
3430
+ this.assert(
3431
+ initial !== final,
3432
+ "expected " + msgObj + " to change",
3433
+ "expected " + msgObj + " to not change"
3434
+ );
3435
+ }
3436
+ __name(assertChanges, "assertChanges");
3437
+ Assertion.addMethod("change", assertChanges);
3438
+ Assertion.addMethod("changes", assertChanges);
3439
+ function assertIncreases(subject, prop, msg) {
3440
+ if (msg)
3441
+ flag2(this, "message", msg);
3442
+ let fn = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
3443
+ new Assertion(fn, flagMsg, ssfi, true).is.a("function");
3444
+ let initial;
3445
+ if (!prop) {
3446
+ new Assertion(subject, flagMsg, ssfi, true).is.a("function");
3447
+ initial = subject();
3448
+ } else {
3449
+ new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);
3450
+ initial = subject[prop];
3451
+ }
3452
+ new Assertion(initial, flagMsg, ssfi, true).is.a("number");
3453
+ fn();
3454
+ let final = prop === void 0 || prop === null ? subject() : subject[prop];
3455
+ let msgObj = prop === void 0 || prop === null ? initial : "." + prop;
3456
+ flag2(this, "deltaMsgObj", msgObj);
3457
+ flag2(this, "initialDeltaValue", initial);
3458
+ flag2(this, "finalDeltaValue", final);
3459
+ flag2(this, "deltaBehavior", "increase");
3460
+ flag2(this, "realDelta", final - initial);
3461
+ this.assert(
3462
+ final - initial > 0,
3463
+ "expected " + msgObj + " to increase",
3464
+ "expected " + msgObj + " to not increase"
3465
+ );
3466
+ }
3467
+ __name(assertIncreases, "assertIncreases");
3468
+ Assertion.addMethod("increase", assertIncreases);
3469
+ Assertion.addMethod("increases", assertIncreases);
3470
+ function assertDecreases(subject, prop, msg) {
3471
+ if (msg)
3472
+ flag2(this, "message", msg);
3473
+ let fn = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
3474
+ new Assertion(fn, flagMsg, ssfi, true).is.a("function");
3475
+ let initial;
3476
+ if (!prop) {
3477
+ new Assertion(subject, flagMsg, ssfi, true).is.a("function");
3478
+ initial = subject();
3479
+ } else {
3480
+ new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);
3481
+ initial = subject[prop];
3482
+ }
3483
+ new Assertion(initial, flagMsg, ssfi, true).is.a("number");
3484
+ fn();
3485
+ let final = prop === void 0 || prop === null ? subject() : subject[prop];
3486
+ let msgObj = prop === void 0 || prop === null ? initial : "." + prop;
3487
+ flag2(this, "deltaMsgObj", msgObj);
3488
+ flag2(this, "initialDeltaValue", initial);
3489
+ flag2(this, "finalDeltaValue", final);
3490
+ flag2(this, "deltaBehavior", "decrease");
3491
+ flag2(this, "realDelta", initial - final);
3492
+ this.assert(
3493
+ final - initial < 0,
3494
+ "expected " + msgObj + " to decrease",
3495
+ "expected " + msgObj + " to not decrease"
3496
+ );
3497
+ }
3498
+ __name(assertDecreases, "assertDecreases");
3499
+ Assertion.addMethod("decrease", assertDecreases);
3500
+ Assertion.addMethod("decreases", assertDecreases);
3501
+ function assertDelta(delta, msg) {
3502
+ if (msg)
3503
+ flag2(this, "message", msg);
3504
+ let msgObj = flag2(this, "deltaMsgObj");
3505
+ let initial = flag2(this, "initialDeltaValue");
3506
+ let final = flag2(this, "finalDeltaValue");
3507
+ let behavior = flag2(this, "deltaBehavior");
3508
+ let realDelta = flag2(this, "realDelta");
3509
+ let expression;
3510
+ if (behavior === "change") {
3511
+ expression = Math.abs(final - initial) === Math.abs(delta);
3512
+ } else {
3513
+ expression = realDelta === Math.abs(delta);
3514
+ }
3515
+ this.assert(
3516
+ expression,
3517
+ "expected " + msgObj + " to " + behavior + " by " + delta,
3518
+ "expected " + msgObj + " to not " + behavior + " by " + delta
3519
+ );
3520
+ }
3521
+ __name(assertDelta, "assertDelta");
3522
+ Assertion.addMethod("by", assertDelta);
3523
+ Assertion.addProperty("extensible", function() {
3524
+ let obj = flag2(this, "object");
3525
+ let isExtensible = obj === Object(obj) && Object.isExtensible(obj);
3526
+ this.assert(
3527
+ isExtensible,
3528
+ "expected #{this} to be extensible",
3529
+ "expected #{this} to not be extensible"
3530
+ );
3531
+ });
3532
+ Assertion.addProperty("sealed", function() {
3533
+ let obj = flag2(this, "object");
3534
+ let isSealed = obj === Object(obj) ? Object.isSealed(obj) : true;
3535
+ this.assert(
3536
+ isSealed,
3537
+ "expected #{this} to be sealed",
3538
+ "expected #{this} to not be sealed"
3539
+ );
3540
+ });
3541
+ Assertion.addProperty("frozen", function() {
3542
+ let obj = flag2(this, "object");
3543
+ let isFrozen = obj === Object(obj) ? Object.isFrozen(obj) : true;
3544
+ this.assert(
3545
+ isFrozen,
3546
+ "expected #{this} to be frozen",
3547
+ "expected #{this} to not be frozen"
3548
+ );
3549
+ });
3550
+ Assertion.addProperty("finite", function(_msg) {
3551
+ let obj = flag2(this, "object");
3552
+ this.assert(
3553
+ typeof obj === "number" && isFinite(obj),
3554
+ "expected #{this} to be a finite number",
3555
+ "expected #{this} to not be a finite number"
3556
+ );
3557
+ });
3558
+ function compareSubset(expected, actual) {
3559
+ if (expected === actual) {
3560
+ return true;
3561
+ }
3562
+ if (typeof actual !== typeof expected) {
3563
+ return false;
3564
+ }
3565
+ if (typeof expected !== "object" || expected === null) {
3566
+ return expected === actual;
3567
+ }
3568
+ if (!actual) {
3569
+ return false;
3570
+ }
3571
+ if (Array.isArray(expected)) {
3572
+ if (!Array.isArray(actual)) {
3573
+ return false;
3574
+ }
3575
+ return expected.every(function(exp) {
3576
+ return actual.some(function(act) {
3577
+ return compareSubset(exp, act);
3578
+ });
3579
+ });
3580
+ }
3581
+ if (expected instanceof Date) {
3582
+ if (actual instanceof Date) {
3583
+ return expected.getTime() === actual.getTime();
3584
+ } else {
3585
+ return false;
3586
+ }
3587
+ }
3588
+ return Object.keys(expected).every(function(key) {
3589
+ let expectedValue = expected[key];
3590
+ let actualValue = actual[key];
3591
+ if (typeof expectedValue === "object" && expectedValue !== null && actualValue !== null) {
3592
+ return compareSubset(expectedValue, actualValue);
3593
+ }
3594
+ if (typeof expectedValue === "function") {
3595
+ return expectedValue(actualValue);
3596
+ }
3597
+ return actualValue === expectedValue;
3598
+ });
3599
+ }
3600
+ __name(compareSubset, "compareSubset");
3601
+ Assertion.addMethod("containSubset", function(expected) {
3602
+ const actual = flag(this, "object");
3603
+ const showDiff = config.showDiff;
3604
+ this.assert(
3605
+ compareSubset(expected, actual),
3606
+ "expected #{act} to contain subset #{exp}",
3607
+ "expected #{act} to not contain subset #{exp}",
3608
+ expected,
3609
+ actual,
3610
+ showDiff
3611
+ );
3612
+ });
3613
+ function expect(val, message) {
3614
+ return new Assertion(val, message);
3615
+ }
3616
+ __name(expect, "expect");
3617
+ expect.fail = function(actual, expected, message, operator) {
3618
+ if (arguments.length < 2) {
3619
+ message = actual;
3620
+ actual = void 0;
3621
+ }
3622
+ message = message || "expect.fail()";
3623
+ throw new AssertionError(
3624
+ message,
3625
+ {
3626
+ actual,
3627
+ expected,
3628
+ operator
3629
+ },
3630
+ expect.fail
3631
+ );
3632
+ };
3633
+ var should_exports = {};
3634
+ __export(should_exports, {
3635
+ Should: () => Should,
3636
+ should: () => should
3637
+ });
3638
+ function loadShould() {
3639
+ function shouldGetter() {
3640
+ if (this instanceof String || this instanceof Number || this instanceof Boolean || typeof Symbol === "function" && this instanceof Symbol || typeof BigInt === "function" && this instanceof BigInt) {
3641
+ return new Assertion(this.valueOf(), null, shouldGetter);
3642
+ }
3643
+ return new Assertion(this, null, shouldGetter);
3644
+ }
3645
+ __name(shouldGetter, "shouldGetter");
3646
+ function shouldSetter(value) {
3647
+ Object.defineProperty(this, "should", {
3648
+ value,
3649
+ enumerable: true,
3650
+ configurable: true,
3651
+ writable: true
3652
+ });
3653
+ }
3654
+ __name(shouldSetter, "shouldSetter");
3655
+ Object.defineProperty(Object.prototype, "should", {
3656
+ set: shouldSetter,
3657
+ get: shouldGetter,
3658
+ configurable: true
3659
+ });
3660
+ let should2 = {};
3661
+ should2.fail = function(actual, expected, message, operator) {
3662
+ if (arguments.length < 2) {
3663
+ message = actual;
3664
+ actual = void 0;
3665
+ }
3666
+ message = message || "should.fail()";
3667
+ throw new AssertionError(
3668
+ message,
3669
+ {
3670
+ actual,
3671
+ expected,
3672
+ operator
3673
+ },
3674
+ should2.fail
3675
+ );
3676
+ };
3677
+ should2.equal = function(actual, expected, message) {
3678
+ new Assertion(actual, message).to.equal(expected);
3679
+ };
3680
+ should2.Throw = function(fn, errt, errs, msg) {
3681
+ new Assertion(fn, msg).to.Throw(errt, errs);
3682
+ };
3683
+ should2.exist = function(val, msg) {
3684
+ new Assertion(val, msg).to.exist;
3685
+ };
3686
+ should2.not = {};
3687
+ should2.not.equal = function(actual, expected, msg) {
3688
+ new Assertion(actual, msg).to.not.equal(expected);
3689
+ };
3690
+ should2.not.Throw = function(fn, errt, errs, msg) {
3691
+ new Assertion(fn, msg).to.not.Throw(errt, errs);
3692
+ };
3693
+ should2.not.exist = function(val, msg) {
3694
+ new Assertion(val, msg).to.not.exist;
3695
+ };
3696
+ should2["throw"] = should2["Throw"];
3697
+ should2.not["throw"] = should2.not["Throw"];
3698
+ return should2;
3699
+ }
3700
+ __name(loadShould, "loadShould");
3701
+ var should = loadShould;
3702
+ var Should = loadShould;
3703
+ function assert(express, errmsg) {
3704
+ let test2 = new Assertion(null, null, assert, true);
3705
+ test2.assert(express, errmsg, "[ negation message unavailable ]");
3706
+ }
3707
+ __name(assert, "assert");
3708
+ assert.fail = function(actual, expected, message, operator) {
3709
+ if (arguments.length < 2) {
3710
+ message = actual;
3711
+ actual = void 0;
3712
+ }
3713
+ message = message || "assert.fail()";
3714
+ throw new AssertionError(
3715
+ message,
3716
+ {
3717
+ actual,
3718
+ expected,
3719
+ operator
3720
+ },
3721
+ assert.fail
3722
+ );
3723
+ };
3724
+ assert.isOk = function(val, msg) {
3725
+ new Assertion(val, msg, assert.isOk, true).is.ok;
3726
+ };
3727
+ assert.isNotOk = function(val, msg) {
3728
+ new Assertion(val, msg, assert.isNotOk, true).is.not.ok;
3729
+ };
3730
+ assert.equal = function(act, exp, msg) {
3731
+ let test2 = new Assertion(act, msg, assert.equal, true);
3732
+ test2.assert(
3733
+ exp == flag(test2, "object"),
3734
+ "expected #{this} to equal #{exp}",
3735
+ "expected #{this} to not equal #{act}",
3736
+ exp,
3737
+ act,
3738
+ true
3739
+ );
3740
+ };
3741
+ assert.notEqual = function(act, exp, msg) {
3742
+ let test2 = new Assertion(act, msg, assert.notEqual, true);
3743
+ test2.assert(
3744
+ exp != flag(test2, "object"),
3745
+ "expected #{this} to not equal #{exp}",
3746
+ "expected #{this} to equal #{act}",
3747
+ exp,
3748
+ act,
3749
+ true
3750
+ );
3751
+ };
3752
+ assert.strictEqual = function(act, exp, msg) {
3753
+ new Assertion(act, msg, assert.strictEqual, true).to.equal(exp);
3754
+ };
3755
+ assert.notStrictEqual = function(act, exp, msg) {
3756
+ new Assertion(act, msg, assert.notStrictEqual, true).to.not.equal(exp);
3757
+ };
3758
+ assert.deepEqual = assert.deepStrictEqual = function(act, exp, msg) {
3759
+ new Assertion(act, msg, assert.deepEqual, true).to.eql(exp);
3760
+ };
3761
+ assert.notDeepEqual = function(act, exp, msg) {
3762
+ new Assertion(act, msg, assert.notDeepEqual, true).to.not.eql(exp);
3763
+ };
3764
+ assert.isAbove = function(val, abv, msg) {
3765
+ new Assertion(val, msg, assert.isAbove, true).to.be.above(abv);
3766
+ };
3767
+ assert.isAtLeast = function(val, atlst, msg) {
3768
+ new Assertion(val, msg, assert.isAtLeast, true).to.be.least(atlst);
3769
+ };
3770
+ assert.isBelow = function(val, blw, msg) {
3771
+ new Assertion(val, msg, assert.isBelow, true).to.be.below(blw);
3772
+ };
3773
+ assert.isAtMost = function(val, atmst, msg) {
3774
+ new Assertion(val, msg, assert.isAtMost, true).to.be.most(atmst);
3775
+ };
3776
+ assert.isTrue = function(val, msg) {
3777
+ new Assertion(val, msg, assert.isTrue, true).is["true"];
3778
+ };
3779
+ assert.isNotTrue = function(val, msg) {
3780
+ new Assertion(val, msg, assert.isNotTrue, true).to.not.equal(true);
3781
+ };
3782
+ assert.isFalse = function(val, msg) {
3783
+ new Assertion(val, msg, assert.isFalse, true).is["false"];
3784
+ };
3785
+ assert.isNotFalse = function(val, msg) {
3786
+ new Assertion(val, msg, assert.isNotFalse, true).to.not.equal(false);
3787
+ };
3788
+ assert.isNull = function(val, msg) {
3789
+ new Assertion(val, msg, assert.isNull, true).to.equal(null);
3790
+ };
3791
+ assert.isNotNull = function(val, msg) {
3792
+ new Assertion(val, msg, assert.isNotNull, true).to.not.equal(null);
3793
+ };
3794
+ assert.isNaN = function(val, msg) {
3795
+ new Assertion(val, msg, assert.isNaN, true).to.be.NaN;
3796
+ };
3797
+ assert.isNotNaN = function(value, message) {
3798
+ new Assertion(value, message, assert.isNotNaN, true).not.to.be.NaN;
3799
+ };
3800
+ assert.exists = function(val, msg) {
3801
+ new Assertion(val, msg, assert.exists, true).to.exist;
3802
+ };
3803
+ assert.notExists = function(val, msg) {
3804
+ new Assertion(val, msg, assert.notExists, true).to.not.exist;
3805
+ };
3806
+ assert.isUndefined = function(val, msg) {
3807
+ new Assertion(val, msg, assert.isUndefined, true).to.equal(void 0);
3808
+ };
3809
+ assert.isDefined = function(val, msg) {
3810
+ new Assertion(val, msg, assert.isDefined, true).to.not.equal(void 0);
3811
+ };
3812
+ assert.isCallable = function(value, message) {
3813
+ new Assertion(value, message, assert.isCallable, true).is.callable;
3814
+ };
3815
+ assert.isNotCallable = function(value, message) {
3816
+ new Assertion(value, message, assert.isNotCallable, true).is.not.callable;
3817
+ };
3818
+ assert.isObject = function(val, msg) {
3819
+ new Assertion(val, msg, assert.isObject, true).to.be.a("object");
3820
+ };
3821
+ assert.isNotObject = function(val, msg) {
3822
+ new Assertion(val, msg, assert.isNotObject, true).to.not.be.a("object");
3823
+ };
3824
+ assert.isArray = function(val, msg) {
3825
+ new Assertion(val, msg, assert.isArray, true).to.be.an("array");
3826
+ };
3827
+ assert.isNotArray = function(val, msg) {
3828
+ new Assertion(val, msg, assert.isNotArray, true).to.not.be.an("array");
3829
+ };
3830
+ assert.isString = function(val, msg) {
3831
+ new Assertion(val, msg, assert.isString, true).to.be.a("string");
3832
+ };
3833
+ assert.isNotString = function(val, msg) {
3834
+ new Assertion(val, msg, assert.isNotString, true).to.not.be.a("string");
3835
+ };
3836
+ assert.isNumber = function(val, msg) {
3837
+ new Assertion(val, msg, assert.isNumber, true).to.be.a("number");
3838
+ };
3839
+ assert.isNotNumber = function(val, msg) {
3840
+ new Assertion(val, msg, assert.isNotNumber, true).to.not.be.a("number");
3841
+ };
3842
+ assert.isNumeric = function(val, msg) {
3843
+ new Assertion(val, msg, assert.isNumeric, true).is.numeric;
3844
+ };
3845
+ assert.isNotNumeric = function(val, msg) {
3846
+ new Assertion(val, msg, assert.isNotNumeric, true).is.not.numeric;
3847
+ };
3848
+ assert.isFinite = function(val, msg) {
3849
+ new Assertion(val, msg, assert.isFinite, true).to.be.finite;
3850
+ };
3851
+ assert.isBoolean = function(val, msg) {
3852
+ new Assertion(val, msg, assert.isBoolean, true).to.be.a("boolean");
3853
+ };
3854
+ assert.isNotBoolean = function(val, msg) {
3855
+ new Assertion(val, msg, assert.isNotBoolean, true).to.not.be.a("boolean");
3856
+ };
3857
+ assert.typeOf = function(val, type3, msg) {
3858
+ new Assertion(val, msg, assert.typeOf, true).to.be.a(type3);
3859
+ };
3860
+ assert.notTypeOf = function(value, type3, message) {
3861
+ new Assertion(value, message, assert.notTypeOf, true).to.not.be.a(type3);
3862
+ };
3863
+ assert.instanceOf = function(val, type3, msg) {
3864
+ new Assertion(val, msg, assert.instanceOf, true).to.be.instanceOf(type3);
3865
+ };
3866
+ assert.notInstanceOf = function(val, type3, msg) {
3867
+ new Assertion(val, msg, assert.notInstanceOf, true).to.not.be.instanceOf(
3868
+ type3
3869
+ );
3870
+ };
3871
+ assert.include = function(exp, inc, msg) {
3872
+ new Assertion(exp, msg, assert.include, true).include(inc);
3873
+ };
3874
+ assert.notInclude = function(exp, inc, msg) {
3875
+ new Assertion(exp, msg, assert.notInclude, true).not.include(inc);
3876
+ };
3877
+ assert.deepInclude = function(exp, inc, msg) {
3878
+ new Assertion(exp, msg, assert.deepInclude, true).deep.include(inc);
3879
+ };
3880
+ assert.notDeepInclude = function(exp, inc, msg) {
3881
+ new Assertion(exp, msg, assert.notDeepInclude, true).not.deep.include(inc);
3882
+ };
3883
+ assert.nestedInclude = function(exp, inc, msg) {
3884
+ new Assertion(exp, msg, assert.nestedInclude, true).nested.include(inc);
3885
+ };
3886
+ assert.notNestedInclude = function(exp, inc, msg) {
3887
+ new Assertion(exp, msg, assert.notNestedInclude, true).not.nested.include(
3888
+ inc
3889
+ );
3890
+ };
3891
+ assert.deepNestedInclude = function(exp, inc, msg) {
3892
+ new Assertion(exp, msg, assert.deepNestedInclude, true).deep.nested.include(
3893
+ inc
3894
+ );
3895
+ };
3896
+ assert.notDeepNestedInclude = function(exp, inc, msg) {
3897
+ new Assertion(
3898
+ exp,
3899
+ msg,
3900
+ assert.notDeepNestedInclude,
3901
+ true
3902
+ ).not.deep.nested.include(inc);
3903
+ };
3904
+ assert.ownInclude = function(exp, inc, msg) {
3905
+ new Assertion(exp, msg, assert.ownInclude, true).own.include(inc);
3906
+ };
3907
+ assert.notOwnInclude = function(exp, inc, msg) {
3908
+ new Assertion(exp, msg, assert.notOwnInclude, true).not.own.include(inc);
3909
+ };
3910
+ assert.deepOwnInclude = function(exp, inc, msg) {
3911
+ new Assertion(exp, msg, assert.deepOwnInclude, true).deep.own.include(inc);
3912
+ };
3913
+ assert.notDeepOwnInclude = function(exp, inc, msg) {
3914
+ new Assertion(exp, msg, assert.notDeepOwnInclude, true).not.deep.own.include(
3915
+ inc
3916
+ );
3917
+ };
3918
+ assert.match = function(exp, re, msg) {
3919
+ new Assertion(exp, msg, assert.match, true).to.match(re);
3920
+ };
3921
+ assert.notMatch = function(exp, re, msg) {
3922
+ new Assertion(exp, msg, assert.notMatch, true).to.not.match(re);
3923
+ };
3924
+ assert.property = function(obj, prop, msg) {
3925
+ new Assertion(obj, msg, assert.property, true).to.have.property(prop);
3926
+ };
3927
+ assert.notProperty = function(obj, prop, msg) {
3928
+ new Assertion(obj, msg, assert.notProperty, true).to.not.have.property(prop);
3929
+ };
3930
+ assert.propertyVal = function(obj, prop, val, msg) {
3931
+ new Assertion(obj, msg, assert.propertyVal, true).to.have.property(prop, val);
3932
+ };
3933
+ assert.notPropertyVal = function(obj, prop, val, msg) {
3934
+ new Assertion(obj, msg, assert.notPropertyVal, true).to.not.have.property(
3935
+ prop,
3936
+ val
3937
+ );
3938
+ };
3939
+ assert.deepPropertyVal = function(obj, prop, val, msg) {
3940
+ new Assertion(obj, msg, assert.deepPropertyVal, true).to.have.deep.property(
3941
+ prop,
3942
+ val
3943
+ );
3944
+ };
3945
+ assert.notDeepPropertyVal = function(obj, prop, val, msg) {
3946
+ new Assertion(
3947
+ obj,
3948
+ msg,
3949
+ assert.notDeepPropertyVal,
3950
+ true
3951
+ ).to.not.have.deep.property(prop, val);
3952
+ };
3953
+ assert.ownProperty = function(obj, prop, msg) {
3954
+ new Assertion(obj, msg, assert.ownProperty, true).to.have.own.property(prop);
3955
+ };
3956
+ assert.notOwnProperty = function(obj, prop, msg) {
3957
+ new Assertion(obj, msg, assert.notOwnProperty, true).to.not.have.own.property(
3958
+ prop
3959
+ );
3960
+ };
3961
+ assert.ownPropertyVal = function(obj, prop, value, msg) {
3962
+ new Assertion(obj, msg, assert.ownPropertyVal, true).to.have.own.property(
3963
+ prop,
3964
+ value
3965
+ );
3966
+ };
3967
+ assert.notOwnPropertyVal = function(obj, prop, value, msg) {
3968
+ new Assertion(
3969
+ obj,
3970
+ msg,
3971
+ assert.notOwnPropertyVal,
3972
+ true
3973
+ ).to.not.have.own.property(prop, value);
3974
+ };
3975
+ assert.deepOwnPropertyVal = function(obj, prop, value, msg) {
3976
+ new Assertion(
3977
+ obj,
3978
+ msg,
3979
+ assert.deepOwnPropertyVal,
3980
+ true
3981
+ ).to.have.deep.own.property(prop, value);
3982
+ };
3983
+ assert.notDeepOwnPropertyVal = function(obj, prop, value, msg) {
3984
+ new Assertion(
3985
+ obj,
3986
+ msg,
3987
+ assert.notDeepOwnPropertyVal,
3988
+ true
3989
+ ).to.not.have.deep.own.property(prop, value);
3990
+ };
3991
+ assert.nestedProperty = function(obj, prop, msg) {
3992
+ new Assertion(obj, msg, assert.nestedProperty, true).to.have.nested.property(
3993
+ prop
3994
+ );
3995
+ };
3996
+ assert.notNestedProperty = function(obj, prop, msg) {
3997
+ new Assertion(
3998
+ obj,
3999
+ msg,
4000
+ assert.notNestedProperty,
4001
+ true
4002
+ ).to.not.have.nested.property(prop);
4003
+ };
4004
+ assert.nestedPropertyVal = function(obj, prop, val, msg) {
4005
+ new Assertion(
4006
+ obj,
4007
+ msg,
4008
+ assert.nestedPropertyVal,
4009
+ true
4010
+ ).to.have.nested.property(prop, val);
4011
+ };
4012
+ assert.notNestedPropertyVal = function(obj, prop, val, msg) {
4013
+ new Assertion(
4014
+ obj,
4015
+ msg,
4016
+ assert.notNestedPropertyVal,
4017
+ true
4018
+ ).to.not.have.nested.property(prop, val);
4019
+ };
4020
+ assert.deepNestedPropertyVal = function(obj, prop, val, msg) {
4021
+ new Assertion(
4022
+ obj,
4023
+ msg,
4024
+ assert.deepNestedPropertyVal,
4025
+ true
4026
+ ).to.have.deep.nested.property(prop, val);
4027
+ };
4028
+ assert.notDeepNestedPropertyVal = function(obj, prop, val, msg) {
4029
+ new Assertion(
4030
+ obj,
4031
+ msg,
4032
+ assert.notDeepNestedPropertyVal,
4033
+ true
4034
+ ).to.not.have.deep.nested.property(prop, val);
4035
+ };
4036
+ assert.lengthOf = function(exp, len, msg) {
4037
+ new Assertion(exp, msg, assert.lengthOf, true).to.have.lengthOf(len);
4038
+ };
4039
+ assert.hasAnyKeys = function(obj, keys, msg) {
4040
+ new Assertion(obj, msg, assert.hasAnyKeys, true).to.have.any.keys(keys);
4041
+ };
4042
+ assert.hasAllKeys = function(obj, keys, msg) {
4043
+ new Assertion(obj, msg, assert.hasAllKeys, true).to.have.all.keys(keys);
4044
+ };
4045
+ assert.containsAllKeys = function(obj, keys, msg) {
4046
+ new Assertion(obj, msg, assert.containsAllKeys, true).to.contain.all.keys(
4047
+ keys
4048
+ );
4049
+ };
4050
+ assert.doesNotHaveAnyKeys = function(obj, keys, msg) {
4051
+ new Assertion(obj, msg, assert.doesNotHaveAnyKeys, true).to.not.have.any.keys(
4052
+ keys
4053
+ );
4054
+ };
4055
+ assert.doesNotHaveAllKeys = function(obj, keys, msg) {
4056
+ new Assertion(obj, msg, assert.doesNotHaveAllKeys, true).to.not.have.all.keys(
4057
+ keys
4058
+ );
4059
+ };
4060
+ assert.hasAnyDeepKeys = function(obj, keys, msg) {
4061
+ new Assertion(obj, msg, assert.hasAnyDeepKeys, true).to.have.any.deep.keys(
4062
+ keys
4063
+ );
4064
+ };
4065
+ assert.hasAllDeepKeys = function(obj, keys, msg) {
4066
+ new Assertion(obj, msg, assert.hasAllDeepKeys, true).to.have.all.deep.keys(
4067
+ keys
4068
+ );
4069
+ };
4070
+ assert.containsAllDeepKeys = function(obj, keys, msg) {
4071
+ new Assertion(
4072
+ obj,
4073
+ msg,
4074
+ assert.containsAllDeepKeys,
4075
+ true
4076
+ ).to.contain.all.deep.keys(keys);
4077
+ };
4078
+ assert.doesNotHaveAnyDeepKeys = function(obj, keys, msg) {
4079
+ new Assertion(
4080
+ obj,
4081
+ msg,
4082
+ assert.doesNotHaveAnyDeepKeys,
4083
+ true
4084
+ ).to.not.have.any.deep.keys(keys);
4085
+ };
4086
+ assert.doesNotHaveAllDeepKeys = function(obj, keys, msg) {
4087
+ new Assertion(
4088
+ obj,
4089
+ msg,
4090
+ assert.doesNotHaveAllDeepKeys,
4091
+ true
4092
+ ).to.not.have.all.deep.keys(keys);
4093
+ };
4094
+ assert.throws = function(fn, errorLike, errMsgMatcher, msg) {
4095
+ if ("string" === typeof errorLike || errorLike instanceof RegExp) {
4096
+ errMsgMatcher = errorLike;
4097
+ errorLike = null;
4098
+ }
4099
+ let assertErr = new Assertion(fn, msg, assert.throws, true).to.throw(
4100
+ errorLike,
4101
+ errMsgMatcher
4102
+ );
4103
+ return flag(assertErr, "object");
4104
+ };
4105
+ assert.doesNotThrow = function(fn, errorLike, errMsgMatcher, message) {
4106
+ if ("string" === typeof errorLike || errorLike instanceof RegExp) {
4107
+ errMsgMatcher = errorLike;
4108
+ errorLike = null;
4109
+ }
4110
+ new Assertion(fn, message, assert.doesNotThrow, true).to.not.throw(
4111
+ errorLike,
4112
+ errMsgMatcher
4113
+ );
4114
+ };
4115
+ assert.operator = function(val, operator, val2, msg) {
4116
+ let ok;
4117
+ switch (operator) {
4118
+ case "==":
4119
+ ok = val == val2;
4120
+ break;
4121
+ case "===":
4122
+ ok = val === val2;
4123
+ break;
4124
+ case ">":
4125
+ ok = val > val2;
4126
+ break;
4127
+ case ">=":
4128
+ ok = val >= val2;
4129
+ break;
4130
+ case "<":
4131
+ ok = val < val2;
4132
+ break;
4133
+ case "<=":
4134
+ ok = val <= val2;
4135
+ break;
4136
+ case "!=":
4137
+ ok = val != val2;
4138
+ break;
4139
+ case "!==":
4140
+ ok = val !== val2;
4141
+ break;
4142
+ default:
4143
+ msg = msg ? msg + ": " : msg;
4144
+ throw new AssertionError(
4145
+ msg + 'Invalid operator "' + operator + '"',
4146
+ void 0,
4147
+ assert.operator
4148
+ );
4149
+ }
4150
+ let test2 = new Assertion(ok, msg, assert.operator, true);
4151
+ test2.assert(
4152
+ true === flag(test2, "object"),
4153
+ "expected " + inspect2(val) + " to be " + operator + " " + inspect2(val2),
4154
+ "expected " + inspect2(val) + " to not be " + operator + " " + inspect2(val2)
4155
+ );
4156
+ };
4157
+ assert.closeTo = function(act, exp, delta, msg) {
4158
+ new Assertion(act, msg, assert.closeTo, true).to.be.closeTo(exp, delta);
4159
+ };
4160
+ assert.approximately = function(act, exp, delta, msg) {
4161
+ new Assertion(act, msg, assert.approximately, true).to.be.approximately(
4162
+ exp,
4163
+ delta
4164
+ );
4165
+ };
4166
+ assert.sameMembers = function(set1, set2, msg) {
4167
+ new Assertion(set1, msg, assert.sameMembers, true).to.have.same.members(set2);
4168
+ };
4169
+ assert.notSameMembers = function(set1, set2, msg) {
4170
+ new Assertion(
4171
+ set1,
4172
+ msg,
4173
+ assert.notSameMembers,
4174
+ true
4175
+ ).to.not.have.same.members(set2);
4176
+ };
4177
+ assert.sameDeepMembers = function(set1, set2, msg) {
4178
+ new Assertion(
4179
+ set1,
4180
+ msg,
4181
+ assert.sameDeepMembers,
4182
+ true
4183
+ ).to.have.same.deep.members(set2);
4184
+ };
4185
+ assert.notSameDeepMembers = function(set1, set2, msg) {
4186
+ new Assertion(
4187
+ set1,
4188
+ msg,
4189
+ assert.notSameDeepMembers,
4190
+ true
4191
+ ).to.not.have.same.deep.members(set2);
4192
+ };
4193
+ assert.sameOrderedMembers = function(set1, set2, msg) {
4194
+ new Assertion(
4195
+ set1,
4196
+ msg,
4197
+ assert.sameOrderedMembers,
4198
+ true
4199
+ ).to.have.same.ordered.members(set2);
4200
+ };
4201
+ assert.notSameOrderedMembers = function(set1, set2, msg) {
4202
+ new Assertion(
4203
+ set1,
4204
+ msg,
4205
+ assert.notSameOrderedMembers,
4206
+ true
4207
+ ).to.not.have.same.ordered.members(set2);
4208
+ };
4209
+ assert.sameDeepOrderedMembers = function(set1, set2, msg) {
4210
+ new Assertion(
4211
+ set1,
4212
+ msg,
4213
+ assert.sameDeepOrderedMembers,
4214
+ true
4215
+ ).to.have.same.deep.ordered.members(set2);
4216
+ };
4217
+ assert.notSameDeepOrderedMembers = function(set1, set2, msg) {
4218
+ new Assertion(
4219
+ set1,
4220
+ msg,
4221
+ assert.notSameDeepOrderedMembers,
4222
+ true
4223
+ ).to.not.have.same.deep.ordered.members(set2);
4224
+ };
4225
+ assert.includeMembers = function(superset, subset, msg) {
4226
+ new Assertion(superset, msg, assert.includeMembers, true).to.include.members(
4227
+ subset
4228
+ );
4229
+ };
4230
+ assert.notIncludeMembers = function(superset, subset, msg) {
4231
+ new Assertion(
4232
+ superset,
4233
+ msg,
4234
+ assert.notIncludeMembers,
4235
+ true
4236
+ ).to.not.include.members(subset);
4237
+ };
4238
+ assert.includeDeepMembers = function(superset, subset, msg) {
4239
+ new Assertion(
4240
+ superset,
4241
+ msg,
4242
+ assert.includeDeepMembers,
4243
+ true
4244
+ ).to.include.deep.members(subset);
4245
+ };
4246
+ assert.notIncludeDeepMembers = function(superset, subset, msg) {
4247
+ new Assertion(
4248
+ superset,
4249
+ msg,
4250
+ assert.notIncludeDeepMembers,
4251
+ true
4252
+ ).to.not.include.deep.members(subset);
4253
+ };
4254
+ assert.includeOrderedMembers = function(superset, subset, msg) {
4255
+ new Assertion(
4256
+ superset,
4257
+ msg,
4258
+ assert.includeOrderedMembers,
4259
+ true
4260
+ ).to.include.ordered.members(subset);
4261
+ };
4262
+ assert.notIncludeOrderedMembers = function(superset, subset, msg) {
4263
+ new Assertion(
4264
+ superset,
4265
+ msg,
4266
+ assert.notIncludeOrderedMembers,
4267
+ true
4268
+ ).to.not.include.ordered.members(subset);
4269
+ };
4270
+ assert.includeDeepOrderedMembers = function(superset, subset, msg) {
4271
+ new Assertion(
4272
+ superset,
4273
+ msg,
4274
+ assert.includeDeepOrderedMembers,
4275
+ true
4276
+ ).to.include.deep.ordered.members(subset);
4277
+ };
4278
+ assert.notIncludeDeepOrderedMembers = function(superset, subset, msg) {
4279
+ new Assertion(
4280
+ superset,
4281
+ msg,
4282
+ assert.notIncludeDeepOrderedMembers,
4283
+ true
4284
+ ).to.not.include.deep.ordered.members(subset);
4285
+ };
4286
+ assert.oneOf = function(inList, list, msg) {
4287
+ new Assertion(inList, msg, assert.oneOf, true).to.be.oneOf(list);
4288
+ };
4289
+ assert.isIterable = function(obj, msg) {
4290
+ if (obj == void 0 || !obj[Symbol.iterator]) {
4291
+ msg = msg ? `${msg} expected ${inspect2(obj)} to be an iterable` : `expected ${inspect2(obj)} to be an iterable`;
4292
+ throw new AssertionError(msg, void 0, assert.isIterable);
4293
+ }
4294
+ };
4295
+ assert.changes = function(fn, obj, prop, msg) {
4296
+ if (arguments.length === 3 && typeof obj === "function") {
4297
+ msg = prop;
4298
+ prop = null;
4299
+ }
4300
+ new Assertion(fn, msg, assert.changes, true).to.change(obj, prop);
4301
+ };
4302
+ assert.changesBy = function(fn, obj, prop, delta, msg) {
4303
+ if (arguments.length === 4 && typeof obj === "function") {
4304
+ let tmpMsg = delta;
4305
+ delta = prop;
4306
+ msg = tmpMsg;
4307
+ } else if (arguments.length === 3) {
4308
+ delta = prop;
4309
+ prop = null;
4310
+ }
4311
+ new Assertion(fn, msg, assert.changesBy, true).to.change(obj, prop).by(delta);
4312
+ };
4313
+ assert.doesNotChange = function(fn, obj, prop, msg) {
4314
+ if (arguments.length === 3 && typeof obj === "function") {
4315
+ msg = prop;
4316
+ prop = null;
4317
+ }
4318
+ return new Assertion(fn, msg, assert.doesNotChange, true).to.not.change(
4319
+ obj,
4320
+ prop
4321
+ );
4322
+ };
4323
+ assert.changesButNotBy = function(fn, obj, prop, delta, msg) {
4324
+ if (arguments.length === 4 && typeof obj === "function") {
4325
+ let tmpMsg = delta;
4326
+ delta = prop;
4327
+ msg = tmpMsg;
4328
+ } else if (arguments.length === 3) {
4329
+ delta = prop;
4330
+ prop = null;
4331
+ }
4332
+ new Assertion(fn, msg, assert.changesButNotBy, true).to.change(obj, prop).but.not.by(delta);
4333
+ };
4334
+ assert.increases = function(fn, obj, prop, msg) {
4335
+ if (arguments.length === 3 && typeof obj === "function") {
4336
+ msg = prop;
4337
+ prop = null;
4338
+ }
4339
+ return new Assertion(fn, msg, assert.increases, true).to.increase(obj, prop);
4340
+ };
4341
+ assert.increasesBy = function(fn, obj, prop, delta, msg) {
4342
+ if (arguments.length === 4 && typeof obj === "function") {
4343
+ let tmpMsg = delta;
4344
+ delta = prop;
4345
+ msg = tmpMsg;
4346
+ } else if (arguments.length === 3) {
4347
+ delta = prop;
4348
+ prop = null;
4349
+ }
4350
+ new Assertion(fn, msg, assert.increasesBy, true).to.increase(obj, prop).by(delta);
4351
+ };
4352
+ assert.doesNotIncrease = function(fn, obj, prop, msg) {
4353
+ if (arguments.length === 3 && typeof obj === "function") {
4354
+ msg = prop;
4355
+ prop = null;
4356
+ }
4357
+ return new Assertion(fn, msg, assert.doesNotIncrease, true).to.not.increase(
4358
+ obj,
4359
+ prop
4360
+ );
4361
+ };
4362
+ assert.increasesButNotBy = function(fn, obj, prop, delta, msg) {
4363
+ if (arguments.length === 4 && typeof obj === "function") {
4364
+ let tmpMsg = delta;
4365
+ delta = prop;
4366
+ msg = tmpMsg;
4367
+ } else if (arguments.length === 3) {
4368
+ delta = prop;
4369
+ prop = null;
4370
+ }
4371
+ new Assertion(fn, msg, assert.increasesButNotBy, true).to.increase(obj, prop).but.not.by(delta);
4372
+ };
4373
+ assert.decreases = function(fn, obj, prop, msg) {
4374
+ if (arguments.length === 3 && typeof obj === "function") {
4375
+ msg = prop;
4376
+ prop = null;
4377
+ }
4378
+ return new Assertion(fn, msg, assert.decreases, true).to.decrease(obj, prop);
4379
+ };
4380
+ assert.decreasesBy = function(fn, obj, prop, delta, msg) {
4381
+ if (arguments.length === 4 && typeof obj === "function") {
4382
+ let tmpMsg = delta;
4383
+ delta = prop;
4384
+ msg = tmpMsg;
4385
+ } else if (arguments.length === 3) {
4386
+ delta = prop;
4387
+ prop = null;
4388
+ }
4389
+ new Assertion(fn, msg, assert.decreasesBy, true).to.decrease(obj, prop).by(delta);
4390
+ };
4391
+ assert.doesNotDecrease = function(fn, obj, prop, msg) {
4392
+ if (arguments.length === 3 && typeof obj === "function") {
4393
+ msg = prop;
4394
+ prop = null;
4395
+ }
4396
+ return new Assertion(fn, msg, assert.doesNotDecrease, true).to.not.decrease(
4397
+ obj,
4398
+ prop
4399
+ );
4400
+ };
4401
+ assert.doesNotDecreaseBy = function(fn, obj, prop, delta, msg) {
4402
+ if (arguments.length === 4 && typeof obj === "function") {
4403
+ let tmpMsg = delta;
4404
+ delta = prop;
4405
+ msg = tmpMsg;
4406
+ } else if (arguments.length === 3) {
4407
+ delta = prop;
4408
+ prop = null;
4409
+ }
4410
+ return new Assertion(fn, msg, assert.doesNotDecreaseBy, true).to.not.decrease(obj, prop).by(delta);
4411
+ };
4412
+ assert.decreasesButNotBy = function(fn, obj, prop, delta, msg) {
4413
+ if (arguments.length === 4 && typeof obj === "function") {
4414
+ let tmpMsg = delta;
4415
+ delta = prop;
4416
+ msg = tmpMsg;
4417
+ } else if (arguments.length === 3) {
4418
+ delta = prop;
4419
+ prop = null;
4420
+ }
4421
+ new Assertion(fn, msg, assert.decreasesButNotBy, true).to.decrease(obj, prop).but.not.by(delta);
4422
+ };
4423
+ assert.ifError = function(val) {
4424
+ if (val) {
4425
+ throw val;
4426
+ }
4427
+ };
4428
+ assert.isExtensible = function(obj, msg) {
4429
+ new Assertion(obj, msg, assert.isExtensible, true).to.be.extensible;
4430
+ };
4431
+ assert.isNotExtensible = function(obj, msg) {
4432
+ new Assertion(obj, msg, assert.isNotExtensible, true).to.not.be.extensible;
4433
+ };
4434
+ assert.isSealed = function(obj, msg) {
4435
+ new Assertion(obj, msg, assert.isSealed, true).to.be.sealed;
4436
+ };
4437
+ assert.isNotSealed = function(obj, msg) {
4438
+ new Assertion(obj, msg, assert.isNotSealed, true).to.not.be.sealed;
4439
+ };
4440
+ assert.isFrozen = function(obj, msg) {
4441
+ new Assertion(obj, msg, assert.isFrozen, true).to.be.frozen;
4442
+ };
4443
+ assert.isNotFrozen = function(obj, msg) {
4444
+ new Assertion(obj, msg, assert.isNotFrozen, true).to.not.be.frozen;
4445
+ };
4446
+ assert.isEmpty = function(val, msg) {
4447
+ new Assertion(val, msg, assert.isEmpty, true).to.be.empty;
4448
+ };
4449
+ assert.isNotEmpty = function(val, msg) {
4450
+ new Assertion(val, msg, assert.isNotEmpty, true).to.not.be.empty;
4451
+ };
4452
+ assert.containsSubset = function(val, exp, msg) {
4453
+ new Assertion(val, msg).to.containSubset(exp);
4454
+ };
4455
+ assert.doesNotContainSubset = function(val, exp, msg) {
4456
+ new Assertion(val, msg).to.not.containSubset(exp);
4457
+ };
4458
+ var aliases = [
4459
+ ["isOk", "ok"],
4460
+ ["isNotOk", "notOk"],
4461
+ ["throws", "throw"],
4462
+ ["throws", "Throw"],
4463
+ ["isExtensible", "extensible"],
4464
+ ["isNotExtensible", "notExtensible"],
4465
+ ["isSealed", "sealed"],
4466
+ ["isNotSealed", "notSealed"],
4467
+ ["isFrozen", "frozen"],
4468
+ ["isNotFrozen", "notFrozen"],
4469
+ ["isEmpty", "empty"],
4470
+ ["isNotEmpty", "notEmpty"],
4471
+ ["isCallable", "isFunction"],
4472
+ ["isNotCallable", "isNotFunction"],
4473
+ ["containsSubset", "containSubset"]
4474
+ ];
4475
+ for (const [name, as] of aliases) {
4476
+ assert[as] = assert[name];
4477
+ }
4478
+ var used = [];
4479
+ function use(fn) {
4480
+ const exports = {
4481
+ use,
4482
+ AssertionError,
4483
+ util: utils_exports,
4484
+ config,
4485
+ expect,
4486
+ assert,
4487
+ Assertion,
4488
+ ...should_exports
4489
+ };
4490
+ if (!~used.indexOf(fn)) {
4491
+ fn(exports, utils_exports);
4492
+ used.push(fn);
4493
+ }
4494
+ return exports;
4495
+ }
4496
+ __name(use, "use");
4497
+
4498
+ // src/lib/pmProxy.test/adapter.ts
4499
+ var testAdapter = {
4500
+ beforeEach: async (subject, initializer, testResource, initialValues, pm) => {
4501
+ return subject;
4502
+ },
4503
+ andWhen: async (store, whenCB, testResource, pm) => {
4504
+ const proxiedPM = andWhenProxy(pm, "some/path", (path) => {
4505
+ console.log("Artifact added:", path);
4506
+ return path;
4507
+ });
4508
+ return whenCB(store, proxiedPM);
4509
+ },
4510
+ butThen: async (store, thenCB, testResource, pm) => {
4511
+ const proxiedPM = butThenProxy(pm, "some/path", (path) => {
4512
+ console.log("Artifact added:", path);
4513
+ return path;
4514
+ });
4515
+ return thenCB(store, proxiedPM);
4516
+ },
4517
+ afterEach: async (store, key, pm) => store,
4518
+ afterAll: async (store, pm) => {
4519
+ },
4520
+ beforeAll: async (input, testResource, pm, theGivenString) => {
4521
+ return {
4522
+ beforeEachProxy: input.butThenProxy(
4523
+ new MockPMBase(),
4524
+ theGivenString
4525
+ )
4526
+ };
4527
+ },
4528
+ assertThis: (actualResult, expectedResult) => {
4529
+ if (typeof actualResult === "string" && actualResult.startsWith("PASS")) {
4530
+ assert.equal(actualResult, "PASS", "tests.json should be written with correct path and content");
4531
+ } else if (typeof actualResult === "string" && actualResult.startsWith("FAIL")) {
4532
+ assert.fail(`Test failed: ${actualResult}`);
4533
+ } else {
4534
+ assert.equal(actualResult, expectedResult);
4535
+ }
4536
+ }
4537
+ };
4538
+
4539
+ // src/lib/pmProxy.test/index.ts
4540
+ var pmProxy_default = Node_default(
4541
+ // because of the nature of testeranto, we must add all the testable items here
4542
+ {
4543
+ butThenProxy
4544
+ },
4545
+ specification,
4546
+ implementation,
4547
+ testAdapter
4548
+ );
4549
+ export {
4550
+ pmProxy_default as default
4551
+ };
4552
+ /*! Bundled license information:
4553
+
4554
+ chai/index.js:
4555
+ (*!
4556
+ * Chai - flag utility
4557
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4558
+ * MIT Licensed
4559
+ *)
4560
+ (*!
4561
+ * Chai - test utility
4562
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4563
+ * MIT Licensed
4564
+ *)
4565
+ (*!
4566
+ * Chai - expectTypes utility
4567
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4568
+ * MIT Licensed
4569
+ *)
4570
+ (*!
4571
+ * Chai - getActual utility
4572
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4573
+ * MIT Licensed
4574
+ *)
4575
+ (*!
4576
+ * Chai - message composition utility
4577
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4578
+ * MIT Licensed
4579
+ *)
4580
+ (*!
4581
+ * Chai - transferFlags utility
4582
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4583
+ * MIT Licensed
4584
+ *)
4585
+ (*!
4586
+ * chai
4587
+ * http://chaijs.com
4588
+ * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
4589
+ * MIT Licensed
4590
+ *)
4591
+ (*!
4592
+ * Chai - isProxyEnabled helper
4593
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4594
+ * MIT Licensed
4595
+ *)
4596
+ (*!
4597
+ * Chai - addProperty utility
4598
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4599
+ * MIT Licensed
4600
+ *)
4601
+ (*!
4602
+ * Chai - addLengthGuard utility
4603
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4604
+ * MIT Licensed
4605
+ *)
4606
+ (*!
4607
+ * Chai - getProperties utility
4608
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4609
+ * MIT Licensed
4610
+ *)
4611
+ (*!
4612
+ * Chai - proxify utility
4613
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4614
+ * MIT Licensed
4615
+ *)
4616
+ (*!
4617
+ * Chai - addMethod utility
4618
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4619
+ * MIT Licensed
4620
+ *)
4621
+ (*!
4622
+ * Chai - overwriteProperty utility
4623
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4624
+ * MIT Licensed
4625
+ *)
4626
+ (*!
4627
+ * Chai - overwriteMethod utility
4628
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4629
+ * MIT Licensed
4630
+ *)
4631
+ (*!
4632
+ * Chai - addChainingMethod utility
4633
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4634
+ * MIT Licensed
4635
+ *)
4636
+ (*!
4637
+ * Chai - overwriteChainableMethod utility
4638
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4639
+ * MIT Licensed
4640
+ *)
4641
+ (*!
4642
+ * Chai - compareByInspect utility
4643
+ * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
4644
+ * MIT Licensed
4645
+ *)
4646
+ (*!
4647
+ * Chai - getOwnEnumerablePropertySymbols utility
4648
+ * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
4649
+ * MIT Licensed
4650
+ *)
4651
+ (*!
4652
+ * Chai - getOwnEnumerableProperties utility
4653
+ * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
4654
+ * MIT Licensed
4655
+ *)
4656
+ (*!
4657
+ * Chai - isNaN utility
4658
+ * Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
4659
+ * MIT Licensed
4660
+ *)
4661
+ (*!
4662
+ * chai
4663
+ * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
4664
+ * MIT Licensed
4665
+ *)
4666
+ (*!
4667
+ * chai
4668
+ * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
4669
+ * MIT Licensed
4670
+ *)
4671
+ (*! Bundled license information:
4672
+
4673
+ deep-eql/index.js:
4674
+ (*!
4675
+ * deep-eql
4676
+ * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
4677
+ * MIT Licensed
4678
+ *)
4679
+ (*!
4680
+ * Check to see if the MemoizeMap has recorded a result of the two operands
4681
+ *
4682
+ * @param {Mixed} leftHandOperand
4683
+ * @param {Mixed} rightHandOperand
4684
+ * @param {MemoizeMap} memoizeMap
4685
+ * @returns {Boolean|null} result
4686
+ *)
4687
+ (*!
4688
+ * Set the result of the equality into the MemoizeMap
4689
+ *
4690
+ * @param {Mixed} leftHandOperand
4691
+ * @param {Mixed} rightHandOperand
4692
+ * @param {MemoizeMap} memoizeMap
4693
+ * @param {Boolean} result
4694
+ *)
4695
+ (*!
4696
+ * Primary Export
4697
+ *)
4698
+ (*!
4699
+ * The main logic of the `deepEqual` function.
4700
+ *
4701
+ * @param {Mixed} leftHandOperand
4702
+ * @param {Mixed} rightHandOperand
4703
+ * @param {Object} [options] (optional) Additional options
4704
+ * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.
4705
+ * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of
4706
+ complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular
4707
+ references to blow the stack.
4708
+ * @return {Boolean} equal match
4709
+ *)
4710
+ (*!
4711
+ * Compare two Regular Expressions for equality.
4712
+ *
4713
+ * @param {RegExp} leftHandOperand
4714
+ * @param {RegExp} rightHandOperand
4715
+ * @return {Boolean} result
4716
+ *)
4717
+ (*!
4718
+ * Compare two Sets/Maps for equality. Faster than other equality functions.
4719
+ *
4720
+ * @param {Set} leftHandOperand
4721
+ * @param {Set} rightHandOperand
4722
+ * @param {Object} [options] (Optional)
4723
+ * @return {Boolean} result
4724
+ *)
4725
+ (*!
4726
+ * Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.
4727
+ *
4728
+ * @param {Iterable} leftHandOperand
4729
+ * @param {Iterable} rightHandOperand
4730
+ * @param {Object} [options] (Optional)
4731
+ * @return {Boolean} result
4732
+ *)
4733
+ (*!
4734
+ * Simple equality for generator objects such as those returned by generator functions.
4735
+ *
4736
+ * @param {Iterable} leftHandOperand
4737
+ * @param {Iterable} rightHandOperand
4738
+ * @param {Object} [options] (Optional)
4739
+ * @return {Boolean} result
4740
+ *)
4741
+ (*!
4742
+ * Determine if the given object has an @@iterator function.
4743
+ *
4744
+ * @param {Object} target
4745
+ * @return {Boolean} `true` if the object has an @@iterator function.
4746
+ *)
4747
+ (*!
4748
+ * Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.
4749
+ * This will consume the iterator - which could have side effects depending on the @@iterator implementation.
4750
+ *
4751
+ * @param {Object} target
4752
+ * @returns {Array} an array of entries from the @@iterator function
4753
+ *)
4754
+ (*!
4755
+ * Gets all entries from a Generator. This will consume the generator - which could have side effects.
4756
+ *
4757
+ * @param {Generator} target
4758
+ * @returns {Array} an array of entries from the Generator.
4759
+ *)
4760
+ (*!
4761
+ * Gets all own and inherited enumerable keys from a target.
4762
+ *
4763
+ * @param {Object} target
4764
+ * @returns {Array} an array of own and inherited enumerable keys from the target.
4765
+ *)
4766
+ (*!
4767
+ * Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of
4768
+ * each key. If any value of the given key is not equal, the function will return false (early).
4769
+ *
4770
+ * @param {Mixed} leftHandOperand
4771
+ * @param {Mixed} rightHandOperand
4772
+ * @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against
4773
+ * @param {Object} [options] (Optional)
4774
+ * @return {Boolean} result
4775
+ *)
4776
+ (*!
4777
+ * Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`
4778
+ * for each enumerable key in the object.
4779
+ *
4780
+ * @param {Mixed} leftHandOperand
4781
+ * @param {Mixed} rightHandOperand
4782
+ * @param {Object} [options] (Optional)
4783
+ * @return {Boolean} result
4784
+ *)
4785
+ (*!
4786
+ * Returns true if the argument is a primitive.
4787
+ *
4788
+ * This intentionally returns true for all objects that can be compared by reference,
4789
+ * including functions and symbols.
4790
+ *
4791
+ * @param {Mixed} value
4792
+ * @return {Boolean} result
4793
+ *)
4794
+ *)
4795
+ */