@neurodevs/node-tdd 0.2.5 → 1.0.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 (326) hide show
  1. package/.vscode/launch.json +52 -57
  2. package/.vscode/settings.json +61 -66
  3. package/.vscode/tasks.json +98 -129
  4. package/README.md +1 -0
  5. package/build/.spruce/settings.json +3 -10
  6. package/build/__tests__/MockFetch.d.ts +18 -0
  7. package/build/__tests__/MockFetch.js +55 -0
  8. package/build/__tests__/MockFetch.js.map +1 -0
  9. package/build/__tests__/{impl → behavioral}/AbstractModuleTest.test.d.ts +2 -3
  10. package/build/__tests__/{impl → behavioral}/AbstractModuleTest.test.js +3 -12
  11. package/build/__tests__/behavioral/AbstractModuleTest.test.js.map +1 -0
  12. package/build/__tests__/behavioral/utilities/AllHooksCalledEvenIfNotDefined.test.d.ts +5 -0
  13. package/build/__tests__/behavioral/utilities/AllHooksCalledEvenIfNotDefined.test.js +34 -0
  14. package/build/__tests__/behavioral/utilities/AllHooksCalledEvenIfNotDefined.test.js.map +1 -0
  15. package/build/__tests__/behavioral/utilities/Assert.test.d.ts +45 -0
  16. package/build/__tests__/behavioral/utilities/Assert.test.js +645 -0
  17. package/build/__tests__/behavioral/utilities/Assert.test.js.map +1 -0
  18. package/build/__tests__/behavioral/utilities/InstanceParentTestCanAccessParentMethods.test.d.ts +4 -0
  19. package/build/__tests__/behavioral/utilities/InstanceParentTestCanAccessParentMethods.test.js +23 -0
  20. package/build/__tests__/behavioral/utilities/InstanceParentTestCanAccessParentMethods.test.js.map +1 -0
  21. package/build/__tests__/behavioral/utilities/MockFetch.test.d.ts +28 -0
  22. package/build/__tests__/behavioral/utilities/MockFetch.test.js +211 -0
  23. package/build/__tests__/behavioral/utilities/MockFetch.test.js.map +1 -0
  24. package/build/__tests__/behavioral/utilities/StackCleaner.test.d.ts +4 -0
  25. package/build/__tests__/behavioral/utilities/StackCleaner.test.js +46 -0
  26. package/build/__tests__/behavioral/utilities/StackCleaner.test.js.map +1 -0
  27. package/build/__tests__/behavioral/utilities/StaticParentTestCanAccessParentMethods.test.d.ts +7 -0
  28. package/build/__tests__/behavioral/utilities/StaticParentTestCanAccessParentMethods.test.js +32 -0
  29. package/build/__tests__/behavioral/utilities/StaticParentTestCanAccessParentMethods.test.js.map +1 -0
  30. package/build/__tests__/behavioral/utilities/StaticTestInheritsAbstractSpruceTestProperly.test.d.ts +4 -0
  31. package/build/__tests__/behavioral/utilities/StaticTestInheritsAbstractSpruceTestProperly.test.js +19 -0
  32. package/build/__tests__/behavioral/utilities/StaticTestInheritsAbstractSpruceTestProperly.test.js.map +1 -0
  33. package/build/__tests__/behavioral/utilities/Stringify.test.d.ts +5 -0
  34. package/build/__tests__/behavioral/utilities/Stringify.test.js +127 -0
  35. package/build/__tests__/behavioral/utilities/Stringify.test.js.map +1 -0
  36. package/build/__tests__/behavioral/utilities/TestDecoratorResolver.test.d.ts +7 -0
  37. package/build/__tests__/behavioral/utilities/TestDecoratorResolver.test.js +38 -0
  38. package/build/__tests__/behavioral/utilities/TestDecoratorResolver.test.js.map +1 -0
  39. package/build/__tests__/behavioral/utilities/TestOnBasic.test.d.ts +12 -0
  40. package/build/__tests__/behavioral/utilities/TestOnBasic.test.js +68 -0
  41. package/build/__tests__/behavioral/utilities/TestOnBasic.test.js.map +1 -0
  42. package/build/__tests__/behavioral/utilities/TestOnInstance.test.d.ts +28 -0
  43. package/build/__tests__/behavioral/utilities/TestOnInstance.test.js +289 -0
  44. package/build/__tests__/behavioral/utilities/TestOnInstance.test.js.map +1 -0
  45. package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTest.test.d.ts +9 -0
  46. package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTest.test.js +118 -0
  47. package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTest.test.js.map +1 -0
  48. package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTestWithHooks.test.d.ts +5 -0
  49. package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTestWithHooks.test.js +78 -0
  50. package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTestWithHooks.test.js.map +1 -0
  51. package/build/__tests__/behavioral/utilities/TestOnInstanceWithParentBeforeAll.test.d.ts +4 -0
  52. package/build/__tests__/behavioral/utilities/TestOnInstanceWithParentBeforeAll.test.js +23 -0
  53. package/build/__tests__/behavioral/utilities/TestOnInstanceWithParentBeforeAll.test.js.map +1 -0
  54. package/build/__tests__/behavioral/utilities/TestOnInstanceWithTwoLevelsOfInheritence.test.d.ts +4 -0
  55. package/build/__tests__/behavioral/utilities/TestOnInstanceWithTwoLevelsOfInheritence.test.js +24 -0
  56. package/build/__tests__/behavioral/utilities/TestOnInstanceWithTwoLevelsOfInheritence.test.js.map +1 -0
  57. package/build/__tests__/behavioral/utilities/TestResolver.test.d.ts +7 -0
  58. package/build/__tests__/behavioral/utilities/TestResolver.test.js +38 -0
  59. package/build/__tests__/behavioral/utilities/TestResolver.test.js.map +1 -0
  60. package/build/__tests__/behavioral/utilities/TestResolverOnStatic.test.d.ts +4 -0
  61. package/build/__tests__/behavioral/utilities/TestResolverOnStatic.test.js +20 -0
  62. package/build/__tests__/behavioral/utilities/TestResolverOnStatic.test.js.map +1 -0
  63. package/build/__tests__/behavioral/workspace/JestJsonParser.test.d.ts +18 -0
  64. package/build/__tests__/behavioral/workspace/JestJsonParser.test.js +267 -0
  65. package/build/__tests__/behavioral/workspace/JestJsonParser.test.js.map +1 -0
  66. package/build/__tests__/behavioral/workspace/TestReporter.test.d.ts +16 -0
  67. package/build/__tests__/behavioral/workspace/TestReporter.test.js +227 -0
  68. package/build/__tests__/behavioral/workspace/TestReporter.test.js.map +1 -0
  69. package/build/__tests__/behavioral/workspace/TestRunner.test.d.ts +15 -0
  70. package/build/__tests__/behavioral/workspace/TestRunner.test.js +99 -0
  71. package/build/__tests__/behavioral/workspace/TestRunner.test.js.map +1 -0
  72. package/build/__tests__/behavioral/workspace/Widgets.test.d.ts +13 -0
  73. package/build/__tests__/behavioral/workspace/Widgets.test.js +99 -0
  74. package/build/__tests__/behavioral/workspace/Widgets.test.js.map +1 -0
  75. package/build/__tests__/mock-terminal-kit.d.ts +79 -0
  76. package/build/__tests__/mock-terminal-kit.js +103 -0
  77. package/build/__tests__/mock-terminal-kit.js.map +1 -0
  78. package/build/__tests__/support/AbstractForInstanceTest.d.ts +4 -0
  79. package/build/__tests__/support/AbstractForInstanceTest.js +9 -0
  80. package/build/__tests__/support/AbstractForInstanceTest.js.map +1 -0
  81. package/build/__tests__/support/AbstractLevelOneTest.d.ts +3 -0
  82. package/build/__tests__/support/AbstractLevelOneTest.js +4 -0
  83. package/build/__tests__/support/AbstractLevelOneTest.js.map +1 -0
  84. package/build/__tests__/support/AbstractLevelTwoTest.d.ts +7 -0
  85. package/build/__tests__/support/AbstractLevelTwoTest.js +14 -0
  86. package/build/__tests__/support/AbstractLevelTwoTest.js.map +1 -0
  87. package/build/__tests__/support/AbstractStaticTest.d.ts +7 -0
  88. package/build/__tests__/support/AbstractStaticTest.js +14 -0
  89. package/build/__tests__/support/AbstractStaticTest.js.map +1 -0
  90. package/build/__tests__/support/AbstractTestOnInstanceTest.d.ts +22 -0
  91. package/build/__tests__/support/AbstractTestOnInstanceTest.js +23 -0
  92. package/build/__tests__/support/AbstractTestOnInstanceTest.js.map +1 -0
  93. package/build/__tests__/support/AbstractTestOnInstanceWithHooks.d.ts +26 -0
  94. package/build/__tests__/support/AbstractTestOnInstanceWithHooks.js +59 -0
  95. package/build/__tests__/support/AbstractTestOnInstanceWithHooks.js.map +1 -0
  96. package/build/__tests__/support/jest.setup.d.ts +1 -0
  97. package/build/__tests__/support/jest.setup.js +4 -0
  98. package/build/__tests__/support/jest.setup.js.map +1 -0
  99. package/build/__tests__/support/onTestFileResult.d.ts +244 -0
  100. package/build/__tests__/support/onTestFileResult.js +980 -0
  101. package/build/__tests__/support/onTestFileResult.js.map +1 -0
  102. package/build/impl/AbstractModuleTest.d.ts +18 -4
  103. package/build/impl/AbstractModuleTest.js +47 -9
  104. package/build/impl/AbstractModuleTest.js.map +1 -1
  105. package/build/index.d.ts +4 -4
  106. package/build/index.js +4 -4
  107. package/build/index.js.map +1 -1
  108. package/build/utilities/AssertionError.d.ts +3 -0
  109. package/build/utilities/AssertionError.js +12 -0
  110. package/build/utilities/AssertionError.js.map +1 -0
  111. package/build/utilities/StackCleaner.d.ts +4 -0
  112. package/build/utilities/StackCleaner.js +10 -0
  113. package/build/utilities/StackCleaner.js.map +1 -0
  114. package/build/utilities/TestDecoratorResolver.d.ts +35 -0
  115. package/build/utilities/TestDecoratorResolver.js +93 -0
  116. package/build/utilities/TestDecoratorResolver.js.map +1 -0
  117. package/build/utilities/assert.d.ts +49 -0
  118. package/build/utilities/assert.js +255 -0
  119. package/build/utilities/assert.js.map +1 -0
  120. package/build/utilities/assert.utility.d.ts +28 -0
  121. package/build/utilities/assert.utility.js +185 -0
  122. package/build/utilities/assert.utility.js.map +1 -0
  123. package/build/utilities/decorators.d.ts +9 -0
  124. package/build/utilities/decorators.js +133 -0
  125. package/build/utilities/decorators.js.map +1 -0
  126. package/build/workspace/CommandService.d.ts +49 -0
  127. package/build/workspace/CommandService.js +179 -0
  128. package/build/workspace/CommandService.js.map +1 -0
  129. package/build/workspace/JestJsonParser.d.ts +15 -0
  130. package/build/workspace/JestJsonParser.js +149 -0
  131. package/build/workspace/JestJsonParser.js.map +1 -0
  132. package/build/workspace/TKButtonWidget.d.ts +13 -0
  133. package/build/workspace/TKButtonWidget.js +37 -0
  134. package/build/workspace/TKButtonWidget.js.map +1 -0
  135. package/build/workspace/TestLogItemGenerator.d.ts +15 -0
  136. package/build/workspace/TestLogItemGenerator.js +142 -0
  137. package/build/workspace/TestLogItemGenerator.js.map +1 -0
  138. package/build/workspace/TestReporter.d.ts +103 -0
  139. package/build/workspace/TestReporter.js +677 -0
  140. package/build/workspace/TestReporter.js.map +1 -0
  141. package/build/workspace/TestRunner.d.ts +24 -0
  142. package/build/workspace/TestRunner.js +95 -0
  143. package/build/workspace/TestRunner.js.map +1 -0
  144. package/build/workspace/TkBaseWidget.d.ts +37 -0
  145. package/build/workspace/TkBaseWidget.js +185 -0
  146. package/build/workspace/TkBaseWidget.js.map +1 -0
  147. package/build/workspace/TkInputWidget.d.ts +16 -0
  148. package/build/workspace/TkInputWidget.js +64 -0
  149. package/build/workspace/TkInputWidget.js.map +1 -0
  150. package/build/workspace/TkLayoutCellWidget.d.ts +18 -0
  151. package/build/workspace/TkLayoutCellWidget.js +32 -0
  152. package/build/workspace/TkLayoutCellWidget.js.map +1 -0
  153. package/build/workspace/TkLayoutWidget.d.ts +34 -0
  154. package/build/workspace/TkLayoutWidget.js +130 -0
  155. package/build/workspace/TkLayoutWidget.js.map +1 -0
  156. package/build/workspace/TkMenuBarWidget.d.ts +13 -0
  157. package/build/workspace/TkMenuBarWidget.js +71 -0
  158. package/build/workspace/TkMenuBarWidget.js.map +1 -0
  159. package/build/workspace/TkPopupWidget.d.ts +16 -0
  160. package/build/workspace/TkPopupWidget.js +36 -0
  161. package/build/workspace/TkPopupWidget.js.map +1 -0
  162. package/build/workspace/TkProgressBarWidget.d.ts +10 -0
  163. package/build/workspace/TkProgressBarWidget.js +39 -0
  164. package/build/workspace/TkProgressBarWidget.js.map +1 -0
  165. package/build/workspace/TkTextWidget.d.ts +20 -0
  166. package/build/workspace/TkTextWidget.js +115 -0
  167. package/build/workspace/TkTextWidget.js.map +1 -0
  168. package/build/workspace/TkWindowWidget.d.ts +22 -0
  169. package/build/workspace/TkWindowWidget.js +88 -0
  170. package/build/workspace/TkWindowWidget.js.map +1 -0
  171. package/build/workspace/WidgetFactory.d.ts +6 -0
  172. package/build/workspace/WidgetFactory.js +21 -0
  173. package/build/workspace/WidgetFactory.js.map +1 -0
  174. package/build/workspace/button.types.d.ts +15 -0
  175. package/build/workspace/button.types.js +6 -0
  176. package/build/workspace/button.types.js.map +1 -0
  177. package/build/workspace/duration.utility.d.ts +4 -0
  178. package/build/workspace/duration.utility.js +26 -0
  179. package/build/workspace/duration.utility.js.map +1 -0
  180. package/build/workspace/factory.types.d.ts +89 -0
  181. package/build/workspace/factory.types.js +37 -0
  182. package/build/workspace/factory.types.js.map +1 -0
  183. package/build/workspace/input.types.d.ts +18 -0
  184. package/build/workspace/input.types.js +7 -0
  185. package/build/workspace/input.types.js.map +1 -0
  186. package/build/workspace/keySelectChoices.d.ts +517 -0
  187. package/build/workspace/keySelectChoices.js +2 -0
  188. package/build/workspace/keySelectChoices.js.map +1 -0
  189. package/build/workspace/layout.types.d.ts +33 -0
  190. package/build/workspace/layout.types.js +2 -0
  191. package/build/workspace/layout.types.js.map +1 -0
  192. package/build/workspace/menuBar.types.d.ts +19 -0
  193. package/build/workspace/menuBar.types.js +6 -0
  194. package/build/workspace/menuBar.types.js.map +1 -0
  195. package/build/workspace/popup.types.d.ts +13 -0
  196. package/build/workspace/popup.types.js +6 -0
  197. package/build/workspace/popup.types.js.map +1 -0
  198. package/build/workspace/progressBar.types.d.ts +10 -0
  199. package/build/workspace/progressBar.types.js +2 -0
  200. package/build/workspace/progressBar.types.js.map +1 -0
  201. package/build/workspace/table.types.d.ts +6 -0
  202. package/build/workspace/table.types.js +2 -0
  203. package/build/workspace/table.types.js.map +1 -0
  204. package/build/workspace/termKit.utility.d.ts +12 -0
  205. package/build/workspace/termKit.utility.js +128 -0
  206. package/build/workspace/termKit.utility.js.map +1 -0
  207. package/build/workspace/test.types.d.ts +24 -0
  208. package/build/workspace/test.types.js +2 -0
  209. package/build/workspace/test.types.js.map +1 -0
  210. package/build/workspace/testRunner.cli.d.ts +1 -0
  211. package/build/workspace/testRunner.cli.js +149 -0
  212. package/build/workspace/testRunner.cli.js.map +1 -0
  213. package/build/workspace/text.types.d.ts +20 -0
  214. package/build/workspace/text.types.js +7 -0
  215. package/build/workspace/text.types.js.map +1 -0
  216. package/build/workspace/widget.utilities.d.ts +5 -0
  217. package/build/workspace/widget.utilities.js +20 -0
  218. package/build/workspace/widget.utilities.js.map +1 -0
  219. package/build/workspace/widgets.types.d.ts +66 -0
  220. package/build/workspace/widgets.types.js +2 -0
  221. package/build/workspace/widgets.types.js.map +1 -0
  222. package/build/workspace/window.types.d.ts +18 -0
  223. package/build/workspace/window.types.js +9 -0
  224. package/build/workspace/window.types.js.map +1 -0
  225. package/eslint.config.js +3 -0
  226. package/package.json +30 -37
  227. package/prettier.config.js +3 -0
  228. package/src/.spruce/settings.json +3 -10
  229. package/src/__tests__/MockFetch.ts +100 -0
  230. package/src/__tests__/behavioral/AbstractModuleTest.test.ts +15 -0
  231. package/src/__tests__/behavioral/utilities/AllHooksCalledEvenIfNotDefined.test.ts +31 -0
  232. package/src/__tests__/behavioral/utilities/Assert.test.ts +826 -0
  233. package/src/__tests__/behavioral/utilities/InstanceParentTestCanAccessParentMethods.test.ts +14 -0
  234. package/src/__tests__/behavioral/utilities/MockFetch.test.ts +240 -0
  235. package/src/__tests__/behavioral/utilities/StackCleaner.test.ts +46 -0
  236. package/src/__tests__/behavioral/utilities/StaticParentTestCanAccessParentMethods.test.ts +34 -0
  237. package/src/__tests__/behavioral/utilities/StaticTestInheritsAbstractSpruceTestProperly.test.ts +11 -0
  238. package/src/__tests__/behavioral/utilities/Stringify.test.ts +169 -0
  239. package/src/__tests__/behavioral/utilities/TestDecoratorResolver.test.ts +51 -0
  240. package/src/__tests__/behavioral/utilities/TestOnBasic.test.ts +62 -0
  241. package/src/__tests__/behavioral/utilities/TestOnInstance.test.ts +439 -0
  242. package/src/__tests__/behavioral/utilities/TestOnInstanceExtendsTest.test.ts +237 -0
  243. package/src/__tests__/behavioral/utilities/TestOnInstanceExtendsTestWithHooks.test.ts +85 -0
  244. package/src/__tests__/behavioral/utilities/TestOnInstanceWithParentBeforeAll.test.ts +14 -0
  245. package/src/__tests__/behavioral/utilities/TestOnInstanceWithTwoLevelsOfInheritence.test.ts +16 -0
  246. package/src/__tests__/behavioral/utilities/TestResolver.test.ts +48 -0
  247. package/src/__tests__/behavioral/utilities/TestResolverOnStatic.test.ts +12 -0
  248. package/src/__tests__/behavioral/workspace/JestJsonParser.test.ts +357 -0
  249. package/src/__tests__/behavioral/workspace/TestReporter.test.ts +257 -0
  250. package/src/__tests__/behavioral/workspace/TestRunner.test.ts +87 -0
  251. package/src/__tests__/behavioral/workspace/Widgets.test.ts +90 -0
  252. package/src/__tests__/mock-terminal-kit.ts +115 -0
  253. package/src/__tests__/support/AbstractForInstanceTest.ts +12 -0
  254. package/src/__tests__/support/AbstractLevelOneTest.ts +3 -0
  255. package/src/__tests__/support/AbstractLevelTwoTest.ts +16 -0
  256. package/src/__tests__/support/AbstractStaticTest.ts +16 -0
  257. package/src/__tests__/support/AbstractTestOnInstanceTest.ts +30 -0
  258. package/src/__tests__/support/AbstractTestOnInstanceWithHooks.ts +138 -0
  259. package/src/__tests__/support/jest.setup.ts +2 -0
  260. package/src/__tests__/support/onTestFileResult.ts +1008 -0
  261. package/src/impl/AbstractModuleTest.ts +59 -10
  262. package/src/index.ts +4 -4
  263. package/src/utilities/AssertionError.ts +14 -0
  264. package/src/utilities/StackCleaner.ts +14 -0
  265. package/src/utilities/TestDecoratorResolver.ts +118 -0
  266. package/src/utilities/assert.ts +583 -0
  267. package/src/utilities/assert.utility.ts +295 -0
  268. package/src/utilities/decorators.ts +167 -0
  269. package/src/workspace/CommandService.ts +256 -0
  270. package/src/workspace/JestJsonParser.ts +255 -0
  271. package/src/workspace/TKButtonWidget.ts +54 -0
  272. package/src/workspace/TestLogItemGenerator.ts +184 -0
  273. package/src/workspace/TestReporter.ts +865 -0
  274. package/src/workspace/TestRunner.ts +128 -0
  275. package/src/workspace/TkBaseWidget.ts +249 -0
  276. package/src/workspace/TkInputWidget.ts +83 -0
  277. package/src/workspace/TkLayoutCellWidget.ts +46 -0
  278. package/src/workspace/TkLayoutWidget.ts +181 -0
  279. package/src/workspace/TkMenuBarWidget.ts +95 -0
  280. package/src/workspace/TkPopupWidget.ts +47 -0
  281. package/src/workspace/TkProgressBarWidget.ts +54 -0
  282. package/src/workspace/TkTextWidget.ts +158 -0
  283. package/src/workspace/TkWindowWidget.ts +122 -0
  284. package/src/workspace/WidgetFactory.ts +33 -0
  285. package/src/workspace/button.types.ts +19 -0
  286. package/src/workspace/duration.utility.ts +34 -0
  287. package/src/workspace/factory.types.ts +101 -0
  288. package/src/workspace/input.types.ts +22 -0
  289. package/src/workspace/keySelectChoices.ts +134 -0
  290. package/src/workspace/layout.types.ts +40 -0
  291. package/src/workspace/menuBar.types.ts +24 -0
  292. package/src/workspace/popup.types.ts +17 -0
  293. package/src/workspace/progressBar.types.ts +13 -0
  294. package/src/workspace/table.types.ts +9 -0
  295. package/src/workspace/termKit.utility.ts +130 -0
  296. package/src/workspace/terminal-kit.d.ts +28 -0
  297. package/src/workspace/test.types.ts +34 -0
  298. package/src/workspace/testRunner.cli.ts +159 -0
  299. package/src/workspace/text.types.ts +26 -0
  300. package/src/workspace/widget.utilities.ts +35 -0
  301. package/src/workspace/widgets.types.ts +102 -0
  302. package/src/workspace/window.types.ts +22 -0
  303. package/tsconfig.json +23 -27
  304. package/build/__tests__/AbstractPackageTest.d.ts +0 -4
  305. package/build/__tests__/AbstractPackageTest.js +0 -7
  306. package/build/__tests__/AbstractPackageTest.js.map +0 -1
  307. package/build/__tests__/functions/assertFunction.test.d.ts +0 -5
  308. package/build/__tests__/functions/assertFunction.test.js +0 -23
  309. package/build/__tests__/functions/assertFunction.test.js.map +0 -1
  310. package/build/__tests__/functions/testFunction.test.d.ts +0 -5
  311. package/build/__tests__/functions/testFunction.test.js +0 -23
  312. package/build/__tests__/functions/testFunction.test.js.map +0 -1
  313. package/build/__tests__/impl/AbstractModuleTest.test.js.map +0 -1
  314. package/build/functions/assert.d.ts +0 -3
  315. package/build/functions/assert.js +0 -4
  316. package/build/functions/assert.js.map +0 -1
  317. package/build/functions/test.d.ts +0 -3
  318. package/build/functions/test.js +0 -4
  319. package/build/functions/test.js.map +0 -1
  320. package/eslint.config.mjs +0 -3
  321. package/src/__tests__/AbstractPackageTest.ts +0 -7
  322. package/src/__tests__/functions/assertFunction.test.ts +0 -22
  323. package/src/__tests__/functions/testFunction.test.ts +0 -22
  324. package/src/__tests__/impl/AbstractModuleTest.test.ts +0 -34
  325. package/src/functions/assert.ts +0 -4
  326. package/src/functions/test.ts +0 -4
@@ -1,58 +1,53 @@
1
1
  {
2
- "version": "0.2.0",
3
- "configurations": [
4
- {
5
- "type": "node",
6
- "request": "attach",
7
- "name": "attach.tests",
8
- "port": 5200,
9
- "restart": true,
10
- "timeout": 10000
11
- },
12
- {
13
- "type": "node",
14
- "request": "launch",
15
- "name": "test.file",
16
- "runtimeExecutable": "node",
17
- "runtimeArgs": [
18
- "--inspect-brk",
19
- "--trace-warnings",
20
- "${workspaceFolder}/node_modules/.bin/jest",
21
- "${fileBasenameNoExtension}",
22
- "--detectOpenHandles"
23
- ],
24
- "cwd": "${workspaceFolder}",
25
- "console": "integratedTerminal",
26
- "internalConsoleOptions": "neverOpen"
27
- },
28
- {
29
- "type": "node",
30
- "request": "launch",
31
- "name": "test.all",
32
- "runtimeExecutable": "node",
33
- "runtimeArgs": [
34
- "--inspect-brk",
35
- "--trace-warnings",
36
- "${workspaceFolder}/node_modules/.bin/jest"
37
- ],
38
- "cwd": "${workspaceFolder}",
39
- "console": "integratedTerminal",
40
- "internalConsoleOptions": "neverOpen"
41
- },
42
- {
43
- "type": "node",
44
- "request": "launch",
45
- "name": "boot",
46
- "runtimeExecutable": "yarn",
47
- "runtimeArgs": [
48
- "run",
49
- "--inspect-brk",
50
- "--trace-warnings",
51
- "boot"
52
- ],
53
- "cwd": "${workspaceFolder}",
54
- "console": "integratedTerminal",
55
- "internalConsoleOptions": "neverOpen"
56
- }
57
- ]
58
- }
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "type": "node",
6
+ "request": "attach",
7
+ "name": "attach.tests",
8
+ "port": 5200,
9
+ "restart": true,
10
+ "timeout": 10000
11
+ },
12
+ {
13
+ "type": "node",
14
+ "request": "launch",
15
+ "name": "test.file",
16
+ "runtimeExecutable": "node",
17
+ "runtimeArgs": [
18
+ "--inspect-brk",
19
+ "--trace-warnings",
20
+ "${workspaceFolder}/node_modules/.bin/jest",
21
+ "${fileBasenameNoExtension}",
22
+ "--detectOpenHandles"
23
+ ],
24
+ "cwd": "${workspaceFolder}",
25
+ "console": "integratedTerminal",
26
+ "internalConsoleOptions": "neverOpen"
27
+ },
28
+ {
29
+ "type": "node",
30
+ "request": "launch",
31
+ "name": "test.all",
32
+ "runtimeExecutable": "node",
33
+ "runtimeArgs": [
34
+ "--inspect-brk",
35
+ "--trace-warnings",
36
+ "${workspaceFolder}/node_modules/.bin/jest"
37
+ ],
38
+ "cwd": "${workspaceFolder}",
39
+ "console": "integratedTerminal",
40
+ "internalConsoleOptions": "neverOpen"
41
+ },
42
+ {
43
+ "type": "node",
44
+ "request": "launch",
45
+ "name": "boot",
46
+ "runtimeExecutable": "yarn",
47
+ "runtimeArgs": ["run", "--inspect-brk", "--trace-warnings", "boot"],
48
+ "cwd": "${workspaceFolder}",
49
+ "console": "integratedTerminal",
50
+ "internalConsoleOptions": "neverOpen"
51
+ }
52
+ ]
53
+ }
@@ -1,67 +1,62 @@
1
1
  {
2
- "debug.node.autoAttach": "on",
3
- "git.ignoreLimitWarning": true,
4
- "javascript.validate.enable": false,
5
- "files.watcherExclude": {
6
- "**/.git/objects/**": true,
7
- "**/.git/subtree-cache/**": true,
8
- "**/build/**": true,
9
- "**/node_modules/**": true,
10
- },
11
- "search.exclude": {
12
- "**/build/**": true,
13
- "**/node_modules/**": true,
14
- "**/.next/**": true
15
- },
16
- "editor.maxTokenizationLineLength": 20000000,
17
- "[javascript]": {
18
- "editor.formatOnSave": false
19
- },
20
- "[javascriptreact]": {
21
- "editor.formatOnSave": false
22
- },
23
- "[typescript]": {
24
- "editor.formatOnSave": false
25
- },
26
- "[typescriptreact]": {
27
- "editor.formatOnSave": false
28
- },
29
- "[handlebars]": {
30
- "editor.formatOnSave": false
31
- },
32
- "typescript.tsdk": "node_modules/typescript/lib",
33
- "cSpell.ignorePaths": [
34
- "**/package-lock.json",
35
- "**/node_modules/**",
36
- "**/build/**",
37
- "**/vscode-extension/**",
38
- "**/.git/objects/**",
39
- ".vscode",
40
- ".spruce"
41
- ],
42
- "cSpell.words": [
43
- "arkit",
44
- "autogenerated",
45
- "scrollable",
46
- "serializable"
47
- ],
48
- "debug.javascript.unmapMissingSources": true,
49
- "javascript.preferences.importModuleSpecifier": "relative",
50
- "typescript.preferences.importModuleSpecifier": "relative",
51
- "eslint.useFlatConfig": true,
52
- "eslint.enable": true,
53
- "eslint.validate": [
54
- "javascript",
55
- "javascriptreact",
56
- "typescript",
57
- "typescriptreact"
58
- ],
59
- "eslint.workingDirectories": [
60
- "./"
61
- ],
62
- "typescript.validate.enable": true,
63
- "editor.formatOnSave": false,
64
- "editor.codeActionsOnSave": {
65
- "source.fixAll.eslint": "always"
66
- }
67
- }
2
+ "debug.node.autoAttach": "on",
3
+ "git.ignoreLimitWarning": true,
4
+ "javascript.validate.enable": false,
5
+ "files.watcherExclude": {
6
+ "**/.git/objects/**": true,
7
+ "**/.git/subtree-cache/**": true,
8
+ "**/build/**": true,
9
+ "**/node_modules/**": true
10
+ },
11
+ "search.exclude": {
12
+ "**/build/**": true,
13
+ "**/node_modules/**": true,
14
+ "**/.next/**": true
15
+ },
16
+ "editor.codeActionsOnSave": {
17
+ "source.fixAll.eslint": "always"
18
+ },
19
+ "editor.formatOnSave": true,
20
+ "editor.formatOnSaveMode": "file",
21
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
22
+ "editor.maxTokenizationLineLength": 20000000,
23
+ "[javascript]": {
24
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
25
+ "editor.formatOnSave": true
26
+ },
27
+ "[javascriptreact]": {
28
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
29
+ "editor.formatOnSave": true
30
+ },
31
+ "[typescript]": {
32
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
33
+ "editor.formatOnSave": true
34
+ },
35
+ "[typescriptreact]": {
36
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
37
+ "editor.formatOnSave": true
38
+ },
39
+ "eslint.enable": true,
40
+ "eslint.useFlatConfig": true,
41
+ "eslint.validate": [
42
+ "javascript",
43
+ "javascriptreact",
44
+ "typescript",
45
+ "typescriptreact"
46
+ ],
47
+ "eslint.workingDirectories": ["./"],
48
+ "debug.javascript.unmapMissingSources": true,
49
+ "javascript.preferences.importModuleSpecifier": "relative",
50
+ "typescript.preferences.importModuleSpecifier": "relative",
51
+ "typescript.tsdk": "node_modules/typescript/lib",
52
+ "typescript.validate.enable": true,
53
+ "cSpell.ignorePaths": [
54
+ "**/package-lock.json",
55
+ "**/node_modules/**",
56
+ "**/build/**",
57
+ "**/vscode-extension/**",
58
+ "**/.git/objects/**",
59
+ ".vscode"
60
+ ],
61
+ "cSpell.words": ["arkit", "autogenerated", "scrollable", "serializable"]
62
+ }
@@ -1,130 +1,99 @@
1
1
  {
2
- "version": "2.0.0",
3
- "tasks": [
4
- {
5
- "type": "npm",
6
- "script": "watch.build.dev",
7
- "group": "build",
8
- "label": "watch.build.dev & problem.watcher",
9
- "isBackground": true,
10
- "runOptions": {
11
- "runOn": "folderOpen"
12
- },
13
- "promptOnClose": false,
14
- "presentation": {
15
- "focus": false,
16
- "reveal": "never"
17
- },
18
- "problemMatcher": {
19
- "base": "$tsc-watch",
20
- "applyTo": "allDocuments"
21
- }
22
- },
23
- {
24
- "label": "test.file",
25
- "command": "spruce",
26
- "args": [
27
- "test",
28
- "--inspect",
29
- "5200",
30
- "--pattern",
31
- "${fileBasenameNoExtension}",
32
- "--watchMode",
33
- "standard"
34
- ],
35
- "promptOnClose": false,
36
- "group": {
37
- "kind": "test",
38
- "isDefault": true
39
- },
40
- "presentation": {
41
- "reveal": "always",
42
- "panel": "dedicated"
43
- },
44
- "problemMatcher": []
45
- },
46
- {
47
- "label": "test.reporter",
48
- "command": "spruce",
49
- "args": [
50
- "test",
51
- "--shouldHoldAtStart",
52
- "true",
53
- "--watchMode",
54
- "smart"
55
- ],
56
- "promptOnClose": false,
57
- "group": "test",
58
- "runOptions": {
59
- "runOn": "folderOpen"
60
- },
61
- "presentation": {
62
- "panel": "shared",
63
- "focus": true,
64
- "reveal": "always"
65
- }
66
- },
67
- {
68
- "label": "spruce",
69
- "type": "shell",
70
- "command": "spruce ${input:spruceCommand}",
71
- "problemMatcher": [],
72
- "presentation": {
73
- "reveal": "always",
74
- "focus": true,
75
- "panel": "new",
76
- "clear": false
77
- }
78
- },
79
- {
80
- "label": "shell",
81
- "type": "shell",
82
- "command": "${input:command} ${input:optionsCommand}",
83
- "problemMatcher": [],
84
- "presentation": {
85
- "reveal": "always",
86
- "focus": true,
87
- "panel": "new",
88
- "clear": false
89
- }
90
- },
91
- {
92
- "label": "ndx",
93
- "type": "shell",
94
- "command": "ndx ${input:ndxCommand}",
95
- "problemMatcher": [],
96
- "presentation": {
97
- "reveal": "always",
98
- "focus": true,
99
- "panel": "new",
100
- "clear": false
101
- }
102
- }
103
- ],
104
- "inputs": [
105
- {
106
- "id": "spruceCommand",
107
- "description": "spruce command",
108
- "default": "create.test",
109
- "type": "promptString"
110
- },
111
- {
112
- "id": "command",
113
- "description": "command",
114
- "default": "yarn",
115
- "type": "promptString"
116
- },
117
- {
118
- "id": "optionsCommand",
119
- "description": "optionsCommand",
120
- "default": "add",
121
- "type": "promptString"
122
- },
123
- {
124
- "id": "ndxCommand",
125
- "description": "ndx command",
126
- "default": "create.module",
127
- "type": "promptString"
128
- }
129
- ]
130
- }
2
+ "version": "2.0.0",
3
+ "tasks": [
4
+ {
5
+ "type": "npm",
6
+ "script": "watch.build.dev",
7
+ "group": "build",
8
+ "label": "watch.build.dev & problem.watcher",
9
+ "isBackground": true,
10
+ "runOptions": {
11
+ "runOn": "folderOpen"
12
+ },
13
+ "promptOnClose": false,
14
+ "presentation": {
15
+ "focus": false,
16
+ "reveal": "never"
17
+ },
18
+ "problemMatcher": {
19
+ "base": "$tsc-watch",
20
+ "applyTo": "allDocuments"
21
+ }
22
+ },
23
+ {
24
+ "label": "test.file",
25
+ "type": "shell",
26
+ "command": "node build/workspace/testRunner.cli.js --pattern \"${fileBasenameNoExtension}\" --watchMode standard --inspect 5200",
27
+ "promptOnClose": false,
28
+ "group": {
29
+ "kind": "test",
30
+ "isDefault": true
31
+ },
32
+ "presentation": {
33
+ "reveal": "always",
34
+ "panel": "dedicated"
35
+ },
36
+ "problemMatcher": []
37
+ },
38
+ {
39
+ "label": "test.reporter",
40
+ "type": "shell",
41
+ "command": "node build/workspace/testRunner.cli.js --watchMode standard",
42
+ "promptOnClose": false,
43
+ "group": "test",
44
+ "runOptions": {
45
+ "runOn": "folderOpen"
46
+ },
47
+ "presentation": {
48
+ "panel": "shared",
49
+ "focus": true,
50
+ "reveal": "always"
51
+ },
52
+ "problemMatcher": []
53
+ },
54
+ {
55
+ "label": "shell",
56
+ "type": "shell",
57
+ "command": "${input:command} ${input:optionsCommand}",
58
+ "problemMatcher": [],
59
+ "presentation": {
60
+ "reveal": "always",
61
+ "focus": true,
62
+ "panel": "new",
63
+ "clear": false
64
+ }
65
+ },
66
+ {
67
+ "label": "ndx",
68
+ "type": "shell",
69
+ "command": "ndx ${input:ndxCommand}",
70
+ "problemMatcher": [],
71
+ "presentation": {
72
+ "reveal": "always",
73
+ "focus": true,
74
+ "panel": "new",
75
+ "clear": false
76
+ }
77
+ }
78
+ ],
79
+ "inputs": [
80
+ {
81
+ "id": "command",
82
+ "description": "command",
83
+ "default": "yarn",
84
+ "type": "promptString"
85
+ },
86
+ {
87
+ "id": "optionsCommand",
88
+ "description": "optionsCommand",
89
+ "default": "add",
90
+ "type": "promptString"
91
+ },
92
+ {
93
+ "id": "ndxCommand",
94
+ "description": "ndx command",
95
+ "default": "create.module",
96
+ "type": "promptString"
97
+ }
98
+ ]
99
+ }
package/README.md CHANGED
@@ -1,2 +1,3 @@
1
1
  # node-tdd
2
+
2
3
  A Node.js framework for test-driven development (TDD)
@@ -1,11 +1,4 @@
1
1
  {
2
- "scriptUpdater": {
3
- "skipped": []
4
- },
5
- "skipped": [
6
- "skill"
7
- ],
8
- "installed": [
9
- "test"
10
- ]
11
- }
2
+ "skipped": ["skill"],
3
+ "installed": ["test"]
4
+ }
@@ -0,0 +1,18 @@
1
+ export default class MockFetch {
2
+ private requestLog;
3
+ private responses;
4
+ buildFetch(): typeof fetch;
5
+ assertWasCalled(url?: string | URL, init?: RequestInit): void;
6
+ private get lastInit();
7
+ private get wasCalled();
8
+ private get urlsCalled();
9
+ private get lastUrl();
10
+ assertMadeRequests(expected: ExpectedRequest[]): void;
11
+ setResponse(response: Response, url?: string | URL | Request, init?: RequestInit): void;
12
+ private generateResponseKey;
13
+ }
14
+ export interface RequestObject {
15
+ url: string | URL | Request;
16
+ init?: RequestInit;
17
+ }
18
+ export type ExpectedRequest = string | URL | RequestObject;
@@ -0,0 +1,55 @@
1
+ import assert from '../utilities/assert.js';
2
+ export default class MockFetch {
3
+ requestLog = [];
4
+ responses = {
5
+ '*': new Response(JSON.stringify({
6
+ success: true,
7
+ }), { status: 200 }),
8
+ };
9
+ buildFetch() {
10
+ return async (url, init) => {
11
+ this.requestLog.push({ url, init });
12
+ const key = this.generateResponseKey(url, init);
13
+ return (this.responses[key] ?? this.responses['*']).clone();
14
+ };
15
+ }
16
+ assertWasCalled(url, init) {
17
+ assert.isTruthy(this.wasCalled, 'Expected fetch() to have been called.');
18
+ if (url) {
19
+ const lastUrl = this.lastUrl;
20
+ assert.isEqual(lastUrl, url, `Expected fetch() to have been called with URL "${url}", but it was called with "${lastUrl}".`);
21
+ }
22
+ if (init) {
23
+ assert.isEqualDeep(this.lastInit, init, `Expected fetch() to have been called with init "${JSON.stringify(init)}", but it was called with "${JSON.stringify(this.lastInit)}".`);
24
+ }
25
+ }
26
+ get lastInit() {
27
+ return this.requestLog[this.requestLog.length - 1].init;
28
+ }
29
+ get wasCalled() {
30
+ return this.requestLog.length > 0;
31
+ }
32
+ get urlsCalled() {
33
+ return this.requestLog.map((req) => req.url);
34
+ }
35
+ get lastUrl() {
36
+ return this.urlsCalled[this.urlsCalled.length - 1];
37
+ }
38
+ assertMadeRequests(expected) {
39
+ const expectedAsObjects = expected.map((req) => {
40
+ if (typeof req === 'string' || req instanceof URL) {
41
+ return { url: req, init: undefined };
42
+ }
43
+ return req;
44
+ });
45
+ assert.isEqualDeep(this.requestLog, expectedAsObjects, `Expected fetch() to have been called with URL and init combinations as specified.`);
46
+ }
47
+ setResponse(response, url, init) {
48
+ const key = this.generateResponseKey(url, init);
49
+ this.responses[key] = response;
50
+ }
51
+ generateResponseKey(url, init) {
52
+ return `${url?.toString() ?? '*'}${init ? JSON.stringify(init) : ''}`;
53
+ }
54
+ }
55
+ //# sourceMappingURL=MockFetch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MockFetch.js","sourceRoot":"","sources":["../../src/__tests__/MockFetch.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,wBAAwB,CAAA;AAE3C,MAAM,CAAC,OAAO,OAAO,SAAS;IAClB,UAAU,GAAoB,EAAE,CAAA;IAEhC,SAAS,GAA6B;QAC1C,GAAG,EAAE,IAAI,QAAQ,CACb,IAAI,CAAC,SAAS,CAAC;YACX,OAAO,EAAE,IAAI;SAChB,CAAC,EACF,EAAE,MAAM,EAAE,GAAG,EAAE,CAClB;KACJ,CAAA;IAEM,UAAU;QACb,OAAO,KAAK,EAAE,GAA2B,EAAE,IAAkB,EAAE,EAAE;YAC7D,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;YACnC,MAAM,GAAG,GAAG,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;YAC/C,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAA;QAC/D,CAAC,CAAA;IACL,CAAC;IAEM,eAAe,CAAC,GAAkB,EAAE,IAAkB;QACzD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,uCAAuC,CAAC,CAAA;QAExE,IAAI,GAAG,EAAE,CAAC;YACN,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;YAC5B,MAAM,CAAC,OAAO,CACV,OAAO,EACP,GAAG,EACH,kDAAkD,GAAG,8BAA8B,OAAO,IAAI,CACjG,CAAA;QACL,CAAC;QAED,IAAI,IAAI,EAAE,CAAC;YACP,MAAM,CAAC,WAAW,CACd,IAAI,CAAC,QAAQ,EACb,IAAI,EACJ,mDAAmD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,8BAA8B,IAAI,CAAC,SAAS,CAC/G,IAAI,CAAC,QAAQ,CAChB,IAAI,CACR,CAAA;QACL,CAAC;IACL,CAAC;IAED,IAAY,QAAQ;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAA;IAC3D,CAAC;IAED,IAAY,SAAS;QACjB,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAA;IACrC,CAAC;IAED,IAAY,UAAU;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAChD,CAAC;IAED,IAAY,OAAO;QACf,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IACtD,CAAC;IAEM,kBAAkB,CAAC,QAA2B;QACjD,MAAM,iBAAiB,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YAC3C,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,YAAY,GAAG,EAAE,CAAC;gBAChD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAA;YACxC,CAAC;YAED,OAAO,GAAG,CAAA;QACd,CAAC,CAAC,CAAA;QAEF,MAAM,CAAC,WAAW,CACd,IAAI,CAAC,UAAU,EACf,iBAAiB,EACjB,mFAAmF,CACtF,CAAA;IACL,CAAC;IAEM,WAAW,CACd,QAAkB,EAClB,GAA4B,EAC5B,IAAkB;QAElB,MAAM,GAAG,GAAG,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;QAC/C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAA;IAClC,CAAC;IAEO,mBAAmB,CACvB,GAAuC,EACvC,IAA6B;QAE7B,OAAO,GAAG,GAAG,EAAE,QAAQ,EAAE,IAAI,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;IACzE,CAAC;CACJ"}
@@ -1,6 +1,5 @@
1
- import AbstractPackageTest from '../AbstractPackageTest.js';
2
- export default class AbstractModuleTestClassTest extends AbstractPackageTest {
1
+ import AbstractModuleTest from '../../impl/AbstractModuleTest.js';
2
+ export default class AbstractModuleTestClassTest extends AbstractModuleTest {
3
3
  protected static beforeEach(): Promise<void>;
4
- protected static extendsAbstractSpruceTest(): Promise<void>;
5
4
  protected static hasProtectedStaticGenerateIdMethod(): Promise<void>;
6
5
  }
@@ -4,27 +4,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { createRequire } from 'module';
8
- const require = createRequire(import.meta.url);
9
7
  import AbstractModuleTest from '../../impl/AbstractModuleTest.js';
10
- import AbstractPackageTest from '../AbstractPackageTest.js';
11
- const { default: AbstractSpruceTest, test, assert, } = require('@sprucelabs/test-utils');
12
- export default class AbstractModuleTestClassTest extends AbstractPackageTest {
8
+ import test from '../../utilities/decorators.js';
9
+ import assert from '../../utilities/assert.js';
10
+ export default class AbstractModuleTestClassTest extends AbstractModuleTest {
13
11
  static async beforeEach() {
14
12
  await super.beforeEach();
15
13
  }
16
- static async extendsAbstractSpruceTest() {
17
- assert.isInstanceOf(new AbstractModuleTest(), AbstractSpruceTest, 'Did not extend AbstractSpruceTest!');
18
- }
19
14
  static async hasProtectedStaticGenerateIdMethod() {
20
- // @ts-ignore
21
15
  const randomId = AbstractModuleTest.generateId();
22
16
  assert.isTruthy(randomId, 'generateId did not return an id!');
23
17
  }
24
18
  }
25
- __decorate([
26
- test()
27
- ], AbstractModuleTestClassTest, "extendsAbstractSpruceTest", null);
28
19
  __decorate([
29
20
  test()
30
21
  ], AbstractModuleTestClassTest, "hasProtectedStaticGenerateIdMethod", null);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AbstractModuleTest.test.js","sourceRoot":"","sources":["../../../src/__tests__/behavioral/AbstractModuleTest.test.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,kBAAkB,MAAM,kCAAkC,CAAA;AACjE,OAAO,IAAI,MAAM,+BAA+B,CAAA;AAChD,OAAO,MAAM,MAAM,2BAA2B,CAAA;AAE9C,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,kBAAkB;IAC7D,MAAM,CAAC,KAAK,CAAC,UAAU;QAC7B,MAAM,KAAK,CAAC,UAAU,EAAE,CAAA;IAC5B,CAAC;IAGsB,AAAb,MAAM,CAAC,KAAK,CAAC,kCAAkC;QACrD,MAAM,QAAQ,GAAG,kBAAkB,CAAC,UAAU,EAAE,CAAA;QAChD,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,kCAAkC,CAAC,CAAA;IACjE,CAAC;CACJ;AAJ0B;IADtB,IAAI,EAAE;2EAIN"}
@@ -0,0 +1,5 @@
1
+ import AbstractModuleTest from '../../../impl/AbstractModuleTest.js';
2
+ export default class AllHooksCalledEvenIfNotDefinedTest extends AbstractModuleTest {
3
+ protected static afterAll(): Promise<void>;
4
+ protected static canCreateAllHooksCalledEvenIfNotDefined(): Promise<void>;
5
+ }