testeranto 0.47.34 → 0.47.52

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 (309) hide show
  1. package/.nvmrc +1 -0
  2. package/Bundle.Dockerfile +45 -0
  3. package/README.md +86 -11
  4. package/Report.Dockerfile +43 -0
  5. package/dist/cjs-shim.js +12 -0
  6. package/dist/common/Features.js +3 -37
  7. package/dist/common/Init.js +30 -0
  8. package/dist/common/Node.js +15 -66
  9. package/dist/common/PM/index.js +7 -0
  10. package/dist/common/PM/main.js +641 -0
  11. package/dist/common/PM/node.js +88 -0
  12. package/dist/common/PM/web.js +132 -0
  13. package/dist/common/Project.js +109 -637
  14. package/dist/common/Puppeteer.js +103 -0
  15. package/dist/common/Reporter.js +112 -0
  16. package/dist/common/Scheduler.js +1 -0
  17. package/dist/common/SubPackages/puppeteer.js +21 -0
  18. package/dist/common/{subPackages → SubPackages}/react/component/node.js +4 -4
  19. package/dist/common/{subPackages → SubPackages}/react/component/web.js +4 -4
  20. package/dist/common/SubPackages/react/jsx/index.js +25 -0
  21. package/dist/common/SubPackages/react/jsx/node.js +10 -0
  22. package/dist/common/SubPackages/react/jsx/web.js +10 -0
  23. package/dist/common/{subPackages/react-dom/jsx → SubPackages/react-dom/component}/node.js +6 -6
  24. package/dist/common/SubPackages/react-dom/component/web.js +93 -0
  25. package/dist/common/SubPackages/react-dom/jsx/index.js +2 -0
  26. package/dist/common/SubPackages/react-dom/jsx/node.js +39 -0
  27. package/dist/common/SubPackages/react-dom/jsx/web.js +118 -0
  28. package/dist/common/SubPackages/react-test-renderer/MemoExoticComponent/node.js +44 -0
  29. package/dist/common/SubPackages/react-test-renderer/component/index.js +2 -0
  30. package/dist/common/{subPackages/react-test-renderer/component/index.js → SubPackages/react-test-renderer/component/interface.js} +23 -33
  31. package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/component}/node.js +3 -5
  32. package/dist/common/{subPackages/react/jsx → SubPackages/react-test-renderer/component}/web.js +3 -5
  33. package/dist/common/SubPackages/react-test-renderer/fc/node.js +50 -0
  34. package/dist/common/SubPackages/react-test-renderer/fc/web.js +50 -0
  35. package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +7 -3
  36. package/dist/common/SubPackages/react-test-renderer/jsx/node.js +10 -0
  37. package/dist/common/SubPackages/react-test-renderer/jsx/web.js +10 -0
  38. package/dist/common/SubPackages/react-test-renderer/jsx-promised/index.js +42 -0
  39. package/dist/common/{subPackages/react/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +2 -2
  40. package/dist/common/TaskManBackEnd.js +174 -0
  41. package/dist/common/Web.js +31 -108
  42. package/dist/common/esbuildConfigs/features.js +14 -0
  43. package/dist/common/esbuildConfigs/index.js +21 -0
  44. package/dist/common/esbuildConfigs/inputFilesPlugin.js +49 -0
  45. package/dist/common/esbuildConfigs/node.js +39 -0
  46. package/dist/common/esbuildConfigs/report.js +14 -0
  47. package/dist/common/esbuildConfigs/tests.js +13 -0
  48. package/dist/common/esbuildConfigs/web.js +57 -0
  49. package/dist/common/lib/abstractBase.js +553 -0
  50. package/dist/common/lib/basebuilder.js +79 -0
  51. package/dist/common/lib/classBuilder.js +42 -0
  52. package/dist/common/lib/core.js +75 -0
  53. package/dist/common/lib/index.js +22 -0
  54. package/dist/common/lib/types.js +2 -0
  55. package/dist/common/mongooseSchemas.js +56 -0
  56. package/dist/common/preload.js +14 -27
  57. package/dist/common/puppeteerConfiger.js +24 -0
  58. package/dist/common/report.html.js +31 -0
  59. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  60. package/dist/common/utils.js +16 -0
  61. package/dist/common/web.html.js +22 -0
  62. package/dist/module/ExampleTab.js +112 -0
  63. package/dist/module/Features.js +2 -35
  64. package/dist/module/Init.js +25 -0
  65. package/dist/module/Node.js +15 -66
  66. package/dist/module/PM/index.js +3 -0
  67. package/dist/module/PM/main.js +611 -0
  68. package/dist/module/PM/node.js +81 -0
  69. package/dist/module/PM/web.js +125 -0
  70. package/dist/module/Project.js +110 -615
  71. package/dist/module/Puppeteer.js +98 -0
  72. package/dist/module/Reporter.js +107 -0
  73. package/dist/module/Scheduler.js +1 -0
  74. package/dist/module/SubPackages/puppeteer.js +16 -0
  75. package/dist/module/{subPackages → SubPackages}/react/component/node.js +3 -3
  76. package/dist/module/{subPackages → SubPackages}/react/component/web.js +3 -3
  77. package/dist/module/SubPackages/react/jsx/index.js +19 -0
  78. package/dist/module/SubPackages/react/jsx/node.js +5 -0
  79. package/dist/module/SubPackages/react/jsx/web.js +5 -0
  80. package/dist/module/{subPackages → SubPackages}/react-dom/component/node.js +7 -7
  81. package/dist/module/SubPackages/react-dom/component/web.js +88 -0
  82. package/dist/module/SubPackages/react-dom/jsx/node.js +31 -0
  83. package/dist/module/SubPackages/react-dom/jsx/web.js +90 -0
  84. package/dist/module/SubPackages/react-test-renderer/MemoExoticComponent/node.js +16 -0
  85. package/dist/module/SubPackages/react-test-renderer/component/index.js +1 -0
  86. package/dist/module/SubPackages/react-test-renderer/component/interface.js +39 -0
  87. package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/node.js +2 -2
  88. package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/web.js +2 -2
  89. package/dist/module/{subPackages → SubPackages}/react-test-renderer/fc/node.js +3 -3
  90. package/dist/module/SubPackages/react-test-renderer/fc/web.js +22 -0
  91. package/dist/module/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +7 -3
  92. package/dist/module/SubPackages/react-test-renderer/jsx/node.js +5 -0
  93. package/dist/module/SubPackages/react-test-renderer/jsx/web.js +5 -0
  94. package/dist/module/SubPackages/react-test-renderer/jsx-promised/index.js +16 -0
  95. package/dist/module/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +1 -1
  96. package/dist/module/TaskManBackEnd.js +169 -0
  97. package/dist/module/TaskManFrontEnd.js +600 -0
  98. package/dist/module/Web.js +31 -108
  99. package/dist/module/esbuildConfigs/features.js +12 -0
  100. package/dist/module/esbuildConfigs/index.js +19 -0
  101. package/dist/module/esbuildConfigs/inputFilesPlugin.js +44 -0
  102. package/dist/module/esbuildConfigs/node.js +34 -0
  103. package/dist/module/esbuildConfigs/report.js +14 -0
  104. package/dist/module/esbuildConfigs/tests.js +11 -0
  105. package/dist/module/esbuildConfigs/web.js +52 -0
  106. package/dist/module/lib/abstractBase.js +545 -0
  107. package/dist/module/lib/basebuilder.js +75 -0
  108. package/dist/module/lib/classBuilder.js +38 -0
  109. package/dist/module/lib/core.js +72 -0
  110. package/dist/module/lib/index.js +18 -0
  111. package/dist/module/lib/types.js +1 -0
  112. package/dist/module/mongooseSchemas.js +50 -0
  113. package/dist/module/preload.js +15 -26
  114. package/dist/module/puppeteerConfiger.js +19 -0
  115. package/dist/module/report.html.js +29 -0
  116. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  117. package/dist/module/utils.js +9 -0
  118. package/dist/module/web.html.js +20 -0
  119. package/dist/prebuild/TaskManBackEnd.mjs +174 -0
  120. package/dist/prebuild/TaskManFrontEnd.css +12301 -0
  121. package/dist/prebuild/TaskManFrontEnd.js +81264 -0
  122. package/dist/types/Features.d.ts +1 -34
  123. package/dist/types/Init.d.ts +2 -0
  124. package/dist/types/Node.d.ts +5 -11
  125. package/dist/types/PM/index.d.ts +20 -0
  126. package/dist/types/PM/main.d.ts +31 -0
  127. package/dist/types/PM/node.d.ts +27 -0
  128. package/dist/types/PM/web.d.ts +25 -0
  129. package/dist/types/Project.d.ts +3 -29
  130. package/dist/types/Puppeteer.d.ts +2 -0
  131. package/dist/types/Reporter.d.ts +1 -0
  132. package/dist/types/Scheduler.d.ts +0 -0
  133. package/dist/types/SubPackages/puppeteer.d.ts +6 -0
  134. package/dist/types/SubPackages/react/component/node.d.ts +7 -0
  135. package/dist/types/SubPackages/react/component/web.d.ts +7 -0
  136. package/dist/types/SubPackages/react/jsx/index.d.ts +12 -0
  137. package/dist/types/SubPackages/react/jsx/node.d.ts +4 -0
  138. package/dist/types/SubPackages/react/jsx/web.d.ts +4 -0
  139. package/dist/types/SubPackages/react-dom/component/node.d.ts +12 -0
  140. package/dist/types/SubPackages/react-dom/component/web.d.ts +11 -0
  141. package/dist/types/SubPackages/react-dom/jsx/index.d.ts +6 -0
  142. package/dist/types/SubPackages/react-dom/jsx/node.d.ts +6 -0
  143. package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
  144. package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +5 -0
  145. package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +13 -0
  146. package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +9 -0
  147. package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +8 -0
  148. package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +3 -0
  149. package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +8 -0
  150. package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +8 -0
  151. package/dist/types/{subPackages → SubPackages}/react-test-renderer/jsx/index.d.ts +5 -4
  152. package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +8 -0
  153. package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +8 -0
  154. package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +15 -0
  155. package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +4 -0
  156. package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +4 -0
  157. package/dist/types/TaskManBackEnd.d.ts +3 -0
  158. package/dist/types/Types.d.ts +49 -16
  159. package/dist/types/Web.d.ts +5 -11
  160. package/dist/types/esbuildConfigs/features.d.ts +4 -0
  161. package/dist/types/esbuildConfigs/index.d.ts +4 -0
  162. package/dist/types/esbuildConfigs/inputFilesPlugin.d.ts +5 -0
  163. package/dist/types/esbuildConfigs/node.d.ts +4 -0
  164. package/dist/types/esbuildConfigs/report.d.ts +0 -0
  165. package/dist/types/esbuildConfigs/tests.d.ts +4 -0
  166. package/dist/types/esbuildConfigs/web.d.ts +4 -0
  167. package/dist/types/lib/abstractBase.d.ts +104 -0
  168. package/dist/types/lib/basebuilder.d.ts +27 -0
  169. package/dist/types/lib/classBuilder.d.ts +7 -0
  170. package/dist/types/lib/core.d.ts +8 -0
  171. package/dist/types/lib/index.d.ts +59 -0
  172. package/dist/types/lib/types.d.ts +62 -0
  173. package/dist/types/mongooseSchemas.d.ts +124 -0
  174. package/dist/types/preload.d.ts +0 -1
  175. package/dist/types/puppeteerConfiger.d.ts +4 -0
  176. package/dist/types/report.html.d.ts +2 -0
  177. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  178. package/dist/types/utils.d.ts +2 -0
  179. package/dist/types/web.html.d.ts +2 -0
  180. package/index.html +30 -0
  181. package/package.json +151 -79
  182. package/src/ExampleTab.tsx +219 -0
  183. package/src/Features.ts +2 -58
  184. package/src/Init.ts +51 -0
  185. package/src/Node.ts +71 -157
  186. package/src/PM/index.ts +25 -0
  187. package/src/PM/main.ts +830 -0
  188. package/src/PM/node.ts +128 -0
  189. package/src/PM/web.ts +166 -0
  190. package/src/Project.ts +158 -797
  191. package/src/Puppeteer.ts +141 -0
  192. package/src/Reporter.ts +126 -0
  193. package/src/Scheduler.ts +0 -0
  194. package/src/SubPackages/puppeteer.ts +51 -0
  195. package/src/SubPackages/react/component/node.ts +43 -0
  196. package/src/SubPackages/react/component/web.ts +43 -0
  197. package/src/SubPackages/react/jsx/index.ts +42 -0
  198. package/src/SubPackages/react/jsx/node.ts +26 -0
  199. package/src/SubPackages/react/jsx/web.ts +30 -0
  200. package/src/{subPackages → SubPackages}/react-dom/component/node.ts +24 -44
  201. package/src/SubPackages/react-dom/component/web.ts +143 -0
  202. package/src/SubPackages/react-dom/jsx/index.ts +6 -0
  203. package/src/SubPackages/react-dom/jsx/node.ts +68 -0
  204. package/src/SubPackages/react-dom/jsx/web.ts +139 -0
  205. package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +38 -0
  206. package/src/SubPackages/react-test-renderer/component/index.ts +23 -0
  207. package/src/SubPackages/react-test-renderer/component/interface.ts +48 -0
  208. package/src/SubPackages/react-test-renderer/component/node.ts +17 -0
  209. package/src/SubPackages/react-test-renderer/component/web.ts +17 -0
  210. package/src/SubPackages/react-test-renderer/fc/node.ts +49 -0
  211. package/src/SubPackages/react-test-renderer/fc/web.ts +48 -0
  212. package/src/SubPackages/react-test-renderer/jsx/index.ts +48 -0
  213. package/src/SubPackages/react-test-renderer/jsx/node.ts +20 -0
  214. package/src/SubPackages/react-test-renderer/jsx/web.ts +20 -0
  215. package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +40 -0
  216. package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +19 -0
  217. package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +22 -0
  218. package/src/TaskManBackEnd.ts +228 -0
  219. package/src/TaskManFrontEnd.tsx +1222 -0
  220. package/src/Types.ts +222 -17
  221. package/src/Web.ts +86 -217
  222. package/src/cjs-shim.js +12 -0
  223. package/src/esbuildConfigs/features.ts +17 -0
  224. package/src/esbuildConfigs/index.ts +23 -0
  225. package/src/esbuildConfigs/inputFilesPlugin.ts +65 -0
  226. package/src/esbuildConfigs/node.ts +62 -0
  227. package/src/esbuildConfigs/report.ts +15 -0
  228. package/src/esbuildConfigs/tests.ts +14 -0
  229. package/src/esbuildConfigs/web.ts +79 -0
  230. package/src/lib/abstractBase.ts +910 -0
  231. package/src/lib/basebuilder.ts +214 -0
  232. package/src/lib/classBuilder.ts +131 -0
  233. package/src/lib/core.ts +224 -0
  234. package/src/lib/index.ts +226 -0
  235. package/src/lib/types.ts +303 -0
  236. package/src/mongooseSchemas.ts +105 -0
  237. package/src/preload.ts +14 -28
  238. package/src/puppeteerConfiger.ts +26 -0
  239. package/src/report.html.ts +29 -0
  240. package/src/utils.ts +15 -0
  241. package/src/web.html.ts +20 -0
  242. package/tests/Rectangle.test.ts +189 -0
  243. package/trash/TaskMan.Dockerfile +23 -0
  244. package/trash/TaskMan1.Dockerfile +43 -0
  245. package/trash/devBot.dockerfile +12 -0
  246. package/trash/docker-compose-dev.yml +9 -0
  247. package/trash/docker-compose-prod.yml +18 -0
  248. package/trash/electronBuild.ts +32 -0
  249. package/tsconfig.json +18 -6
  250. package/tsconfig.module.json +14 -4
  251. package/tsconfig.types.json +13 -4
  252. package/dist/common/NodeWriter.js +0 -56
  253. package/dist/common/core.js +0 -396
  254. package/dist/common/electron.js +0 -52
  255. package/dist/common/subPackages/react/jsx/index.js +0 -26
  256. package/dist/common/subPackages/react-dom/component/node.js +0 -101
  257. package/dist/common/subPackages/react-dom/component/web.js +0 -61
  258. package/dist/common/subPackages/react-dom/jsx/web.js +0 -76
  259. package/dist/common/subPackages/react-test-renderer/component/node.js +0 -8
  260. package/dist/common/subPackages/react-test-renderer/component/web.js +0 -8
  261. package/dist/module/NodeWriter.js +0 -50
  262. package/dist/module/Report.js +0 -186
  263. package/dist/module/core.js +0 -387
  264. package/dist/module/electron.js +0 -47
  265. package/dist/module/subPackages/react/jsx/index.js +0 -22
  266. package/dist/module/subPackages/react/jsx/node.js +0 -5
  267. package/dist/module/subPackages/react/jsx/web.js +0 -5
  268. package/dist/module/subPackages/react-dom/component/web.js +0 -56
  269. package/dist/module/subPackages/react-dom/jsx/node.js +0 -93
  270. package/dist/module/subPackages/react-dom/jsx/web.js +0 -48
  271. package/dist/module/subPackages/react-test-renderer/component/index.js +0 -52
  272. package/dist/types/NodeWriter.d.ts +0 -2
  273. package/dist/types/core.d.ts +0 -220
  274. package/dist/types/subPackages/react/component/node.d.ts +0 -12
  275. package/dist/types/subPackages/react/component/web.d.ts +0 -12
  276. package/dist/types/subPackages/react/jsx/index.d.ts +0 -15
  277. package/dist/types/subPackages/react/jsx/node.d.ts +0 -4
  278. package/dist/types/subPackages/react/jsx/web.d.ts +0 -4
  279. package/dist/types/subPackages/react-dom/component/node.d.ts +0 -14
  280. package/dist/types/subPackages/react-dom/component/web.d.ts +0 -19
  281. package/dist/types/subPackages/react-dom/jsx/node.d.ts +0 -14
  282. package/dist/types/subPackages/react-dom/jsx/web.d.ts +0 -15
  283. package/dist/types/subPackages/react-test-renderer/component/index.d.ts +0 -20
  284. package/dist/types/subPackages/react-test-renderer/component/node.d.ts +0 -9
  285. package/dist/types/subPackages/react-test-renderer/component/web.d.ts +0 -9
  286. package/dist/types/subPackages/react-test-renderer/jsx/node.d.ts +0 -4
  287. package/dist/types/subPackages/react-test-renderer/jsx/web.d.ts +0 -4
  288. package/src/NodeWriter.ts +0 -72
  289. package/src/Report.tsx +0 -392
  290. package/src/core.ts +0 -1396
  291. package/src/electron.ts +0 -59
  292. package/src/subPackages/react/component/node.ts +0 -75
  293. package/src/subPackages/react/component/web.ts +0 -80
  294. package/src/subPackages/react/jsx/index.ts +0 -64
  295. package/src/subPackages/react/jsx/node.ts +0 -29
  296. package/src/subPackages/react/jsx/web.ts +0 -29
  297. package/src/subPackages/react-dom/component/web.ts +0 -129
  298. package/src/subPackages/react-dom/jsx/node.ts +0 -150
  299. package/src/subPackages/react-dom/jsx/web.ts +0 -117
  300. package/src/subPackages/react-test-renderer/component/index.ts +0 -101
  301. package/src/subPackages/react-test-renderer/component/node.ts +0 -30
  302. package/src/subPackages/react-test-renderer/component/web.ts +0 -30
  303. package/src/subPackages/react-test-renderer/fc/node.tsx +0 -77
  304. package/src/subPackages/react-test-renderer/jsx/index.ts +0 -51
  305. package/src/subPackages/react-test-renderer/jsx/node.ts +0 -31
  306. package/src/subPackages/react-test-renderer/jsx/web.ts +0 -31
  307. /package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/web.js +0 -0
  308. /package/dist/{types/electron.d.ts → module/SubPackages/react-dom/jsx/index.js} +0 -0
  309. /package/dist/module/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/web.js +0 -0
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ v18.18.0
@@ -0,0 +1,45 @@
1
+ FROM node:18.18.0
2
+
3
+ RUN apt-get update && \
4
+ apt-get install -y --no-install-recommends \
5
+ python3 \
6
+ make \
7
+ g++ && \
8
+ rm -rf /var/lib/apt/lists/*
9
+
10
+ RUN yarn global add node-gyp
11
+
12
+ RUN mkdir -p /usr/src/app
13
+ RUN mkdir -p /usr/src/app/docs
14
+ WORKDIR /usr/src/app
15
+ COPY package.json /usr/src/app
16
+ RUN yarn install
17
+ COPY ./src/ /usr/src/app/src
18
+ COPY ./subPackages/ /usr/src/app/subPackages
19
+ COPY ./testeranto.mts /usr/src/app/testeranto.mts
20
+ COPY ./tsconfig.json /usr/src/app/tsconfig.json
21
+ COPY ./init.mts /usr/src/app/init.mts
22
+ COPY ./bundle.mts /usr/src/app/bundle.mts
23
+ COPY ./test.mts /usr/src/app/test.mts
24
+
25
+ RUN yarn run init
26
+ RUN yarn bundle
27
+ # COPY ./docs/ /usr/src/app/docs
28
+ # # COPY ./testeranto.json /usr/src/app/testeranto.json
29
+ # # COPY prebuild.sh /usr/src/app
30
+ # # COPY postBuild.sh /usr/src/app
31
+
32
+
33
+ # # RUN yarn build
34
+
35
+ # RUN cp ./node_modules/testeranto/dist/prebuild/TaskManBackEnd.mjs /usr/src/app/TaskManBackEnd.mjs
36
+ # RUN cp ./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js /usr/src/app/TaskManFrontEnd.js
37
+ # RUN cp ./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css /usr/src/app/TaskManFrontEnd.css
38
+
39
+ # # RUN ts-node-esm ./node_modules/testeranto/dist/prebuild/TaskManBackEnd.mjs
40
+
41
+ # EXPOSE 3000
42
+ # EXPOSE 27017
43
+ # ENV MONGO_HOST=host.docker.internal
44
+ # # # CMD ['yarn', 'testeranto-testrun', '&', 'yarn', 'testeranto-taskman']
45
+ CMD ["node", "test.mts"]
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # testeranto
2
2
 
3
+ 🚧 WARNING: Testeranto is still under development and is not ready for production yet. 🚧
4
+
3
5
  home: [adamwong246.github.io/testeranto](https://adamwong246.github.io/testeranto/)
4
6
 
5
7
  source: [github.com/adamwong246/testeranto](https://github.com/adamwong246/testeranto)
@@ -12,7 +14,7 @@ example repo: [kokomo bay](https://github.com/ChromaPDX/kokomoBay)
12
14
 
13
15
  ## tl;dr
14
16
 
15
- - Do you like BDD?
17
+ - Do you like TDD/BDD?
16
18
  - Do you love Typescript?
17
19
  - Do you hate Jira?
18
20
 
@@ -20,23 +22,40 @@ If so, then testeranto might be the testing tool you have been looking for!
20
22
 
21
23
  ## about
22
24
 
23
- Testeranto.ts an Acceptance Test Driven Development ([ATDD](https://en.wikipedia.org/wiki/Acceptance_test-driven_development)) framework. It focuses on strongly-typed tests, specified in a gherkin-like syntax. Testeranto includes a framework to help write your tests, a test runner to schedule the tests and a reporter to display the results.
24
-
25
- ## 2 distinguishing features of testeranto
25
+ Testeranto.ts an typescript Acceptance Test Driven Development ([ATDD](https://en.wikipedia.org/wiki/Acceptance_test-driven_development)) framework. It includes a library of common patterns to help write your tests, a test runner to schedule the tests and a reporter to display the results. The tests are specified in a strongly-typed gherkin-like syntax. Features are tracked _as code_, rather than living in a separate app. Tests can be run in the browser frontend or the node backend, or both! Testeranto can be used to test _anything_ that can be bundled with esbuild.
26
26
 
27
- 1. Rather than testing your code directly, Testeranto requires you wrap your code with a semantic interface which is based on TS type signatures. These interfaces can be shared and your code is now tested through the gherkin-ish directives provided by that interface.
27
+ ## Getting started
28
28
 
29
- 2. Testeranto tracks features and test results directly in the source code. You may be accustomed to using tools like Jira and Trello to define user stories and assign story points- Under Testeranto, this data lives within the code base _as_ typescript code. Features are defined as nodes within a directed graph, allowing the reporter to summarize these features and their test results.
29
+ 1. Write some code.
30
+ 2. Write some tests of that code.
31
+ 3. Write some features of that code.
32
+ 4. Write a `testeranto.mts`, which acts as a config file.
33
+ 5. Launch testeranto. The test runner is now rebuilding the docs folder.
34
+ 6. Commit the results of those tests.
35
+ 7. Your github pages now shows your report, showing your features, linked with your test results.
36
+ 8. Optionally add testeranto to your CI.
30
37
 
31
38
  ## tech of note
32
39
 
40
+ - esm - Testeranto uses modern js.
33
41
  - typescript - tests are functions with type parameters
42
+ - puppeteer - provides access to both node and chrome runtimes
34
43
  - esbuild - used to quickly generate test bundles
35
44
  - graphology - used to store features within a semantic network
36
45
 
46
+ ## 3 distinguishing features of testeranto
47
+
48
+ 1. Rather than testing your code directly, Testeranto requires you wrap your code with a semantic interface which is based on TS type signatures. These interfaces can be shared and your code is tested through the gherkin-ish directives provided by that interface.
49
+
50
+ 2. Testeranto tracks features and tests results directly in the source code. You may be accustomed to using tools like Jira and Trello to define user stories and assign story points. Using Testeranto, this data lives within the code base _as_ typescript code. Features are defined as nodes within a directed graph, allowing the reporter to summarize these features and their test results.
51
+
52
+ 3. Testeranto is designed for both the backend and the frontend. It leverages puppeteer to provide both of these runtimes. Each of your tests can be executed in the backend node runtime, within the frontend chromium browser runtime, or both.
53
+
37
54
  ## the good parts
38
55
 
39
- Testeranto includes a test runner which bundles and executes your tests, taking care to only run the tests which have changed. It is designed to run most tests in parallel, though it has support for tests which require a shared resource, like a port.
56
+ Your tests can be run in node, chromium, or both.
57
+
58
+ Testeranto includes a test runner which bundles and executes your tests, taking care to only run the tests which have changed.
40
59
 
41
60
  Testeranto includes a test reporter which displays the state of your code in a web app. ([see example](https://chromapdx.github.io/kokomoBay/report.html)) This reporter can also be run locally for the developer's convenience.
42
61
 
@@ -46,10 +65,66 @@ Rather than the traditional method of specifying tests in plain text, Testeranto
46
65
 
47
66
  ## the bad parts
48
67
 
49
- Testeranto does not (yet!) of a means of allowing non-coders to affect changes so, as they say, "get good 💪!"
68
+ Testeranto is very flexible and unopinionated, but not designed to maximize performance.
69
+
70
+ Testeranto does not (yet!) allow a means of allowing non-coders to affect changes so, as they say, "git good 💪!"
71
+
72
+ Testeranto uses ONLY node v8 and chromium. It does not support bun or deno, nor firefox nor safari.
73
+
74
+ ## How it works
75
+
76
+ Testeranto is comprised of 3 parts
77
+
78
+ 1. The build process reads a config and builds the docs folder, then launches 3 esbuild build processes.
79
+
80
+ - Build the features for the html report
81
+ - Build the node-style tests
82
+ - Build the web-style tests
83
+
84
+ 2. The test runner watches the output of those build processes and launches the tests as those files change. It uses puppeteer to run web tests in chromium. It uses dynamic loading to import the node tests directly into the node v8 process.
85
+
86
+ 3. A Report which links your features, your tests and the results of those tests into a handy website.
87
+
88
+ ## CLI
89
+
90
+ There are 3 commands you should add to your `package.json`
91
+
92
+ ```
93
+ // build the tests once
94
+ "testeranto-esbuild": "ts-node-esm testeranto.mts",
95
+
96
+ // build the tests, watching for changes
97
+ "testeranto-esbuild-dev": "ts-node-esm testeranto.mts",
98
+
99
+ // run the tests
100
+ "testeranto-puppeteer":"ts-node-esm node_modules/testeranto/dist/module/Puppeteer.js",
101
+ ```
102
+
103
+ ## Hybrid tests
104
+
105
+ Consider the a scenario: You have an http server which serves a frontend react component. You have multiple ways you can test this.
106
+
107
+ - A node test of the logic of the http server.
108
+ - A node test of the full http server, tested over http request.
109
+ - A node test of the react component with react-test-render
110
+ - A web test of the react component rendering it to the dom.
111
+ - A node test of the logic of the server, rending the component as a paired artifact and communicated over IPC.
112
+ - A node test of the full server, invoking puppeteer to drive the browser.
113
+ - A web test, invoking the server as a shared artifact, serving http to the browser.
114
+
115
+ ## API
116
+
117
+ Testeranto's main API interface is 2 functions, 1 for each run time. You must pass to this function the following arguments
50
118
 
51
- Testeranto is not for testing pure functions. It's designed only to address _stateful_ logic.
119
+ - The "shape" - a TS type signature to which the other arguments must conform.
120
+ - The "input" - the test subject. The "thing that is to be tested"
121
+ - the "specification" - This is the Cucumber-style Given/When/Then steps.
122
+ - the "implementation" - This is the code which implements the "test specification" in code.
123
+ - the "interface" - The code which sets up the test.
52
124
 
53
- Testeranto prefers TS and to be leveraged to it full potential requires at least some proficiency with the language.
125
+ This is designed so that each piece can be worked upon separately. You can think of each argument as the responsibility of a different member of your team.
54
126
 
55
- Because Testeranto is so un-opinionated that it does not provide test infrastructure. You will need to find an existing recipe or implement it yourself, though I plan to have some sort of public repo of test interfaces someday 😅
127
+ - "Senior Engineer" handles the "shape" and "input"
128
+ - "Product Manager" handles the "specification"
129
+ - "Middle Engineer" handles the "interface"
130
+ - "Junior Engineer" handles the "implementation"
@@ -0,0 +1,43 @@
1
+ FROM node:18.18.0
2
+
3
+ RUN apt-get update && \
4
+ apt-get install -y --no-install-recommends \
5
+ python3 \
6
+ make \
7
+ g++ && \
8
+ rm -rf /var/lib/apt/lists/*
9
+
10
+ RUN yarn global add node-gyp
11
+
12
+ RUN mkdir -p /usr/src/app
13
+ RUN mkdir -p /usr/src/app/docs
14
+ WORKDIR /usr/src/app
15
+ COPY package.json /usr/src/app
16
+ RUN yarn install
17
+ COPY ./src/ /usr/src/app/src
18
+ COPY ./subPackages/ /usr/src/app/subPackages
19
+ COPY ./testeranto.mts /usr/src/app/testeranto.mts
20
+ COPY ./tsconfig.json /usr/src/app/tsconfig.json
21
+ COPY ./init.mts /usr/src/app/init.mts
22
+ COPY ./report.mts /usr/src/app/report.mts
23
+ RUN yarn run init
24
+ # RUN yarn report
25
+ # COPY ./docs/ /usr/src/app/docs
26
+ # # COPY ./testeranto.json /usr/src/app/testeranto.json
27
+ # # COPY prebuild.sh /usr/src/app
28
+ # # COPY postBuild.sh /usr/src/app
29
+
30
+
31
+ # # RUN yarn build
32
+
33
+ # RUN cp ./node_modules/testeranto/dist/prebuild/TaskManBackEnd.mjs /usr/src/app/TaskManBackEnd.mjs
34
+ # RUN cp ./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js /usr/src/app/TaskManFrontEnd.js
35
+ # RUN cp ./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css /usr/src/app/TaskManFrontEnd.css
36
+
37
+ # # RUN ts-node-esm ./node_modules/testeranto/dist/prebuild/TaskManBackEnd.mjs
38
+
39
+ EXPOSE 3000
40
+ EXPOSE 27017
41
+ ENV MONGO_HOST=host.docker.internal
42
+ # # CMD ['yarn', 'testeranto-testrun', '&', 'yarn', 'testeranto-taskman']
43
+ CMD ["yarn", "report"]
@@ -0,0 +1,12 @@
1
+ import { createRequire } from 'node:module';
2
+ import path from 'node:path';
3
+ import url from 'node:url';
4
+
5
+ // globalThis.require = createRequire(import.meta.url);
6
+ globalThis.__filename = url.fileURLToPath(import.meta.url);
7
+ globalThis.__dirname = path.dirname(__filename);
8
+
9
+ // const p = `${import.meta.url}/..`;
10
+ // globalThis.require = createRequire(`${import.meta.url}/..`);
11
+ // globalThis.__filename = url.fileURLToPath(`${import.meta.url}/..`);
12
+ // globalThis.__dirname = path.dirname(`${__filename}/..`);
@@ -3,10 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DirectedGraph = exports.TesterantoFeatures = exports.TesterantoGraphDirectedAcyclic = exports.TesterantoGraphDirected = exports.TesterantoGraphUndirected = exports.BaseFeature = void 0;
7
- const graphology_1 = __importDefault(require("graphology"));
8
- /* @ts-ignore:next-line */
9
- const { DirectedGraph, UndirectedGraph } = graphology_1.default;
6
+ exports.DirectedGraph = exports.TesterantoGraphDirectedAcyclic = exports.TesterantoGraphDirected = exports.TesterantoGraphUndirected = exports.BaseFeature = void 0;
7
+ const graphology_umd_js_1 = __importDefault(require("graphology/dist/graphology.umd.js"));
8
+ const { DirectedGraph, UndirectedGraph } = graphology_umd_js_1.default;
10
9
  exports.DirectedGraph = DirectedGraph;
11
10
  class TesterantoGraph {
12
11
  constructor(name) {
@@ -49,37 +48,4 @@ class TesterantoGraphDirectedAcyclic {
49
48
  }
50
49
  }
51
50
  exports.TesterantoGraphDirectedAcyclic = TesterantoGraphDirectedAcyclic;
52
- class TesterantoFeatures {
53
- constructor(features, graphs) {
54
- this.features = features;
55
- this.graphs = graphs;
56
- }
57
- networks() {
58
- return [
59
- ...this.graphs.undirected.values(),
60
- ...this.graphs.directed.values(),
61
- ...this.graphs.dags.values(),
62
- ];
63
- }
64
- toObj() {
65
- return {
66
- features: Object.entries(this.features).map(([name, feature]) => {
67
- return Object.assign(Object.assign({}, feature), { inNetworks: this.networks()
68
- .filter((network) => {
69
- return network.graph.hasNode(feature.name);
70
- })
71
- .map((network) => {
72
- return {
73
- network: network.name,
74
- neighbors: network.graph.neighbors(feature.name),
75
- };
76
- }) });
77
- }),
78
- networks: this.networks().map((network) => {
79
- return Object.assign({}, network);
80
- }),
81
- };
82
- }
83
- }
84
- exports.TesterantoFeatures = TesterantoFeatures;
85
51
  exports.default = {};
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const fs_1 = __importDefault(require("fs"));
7
+ exports.default = async (partialConfig) => {
8
+ const config = Object.assign(Object.assign({}, partialConfig), { buildDir: process.cwd() + "/" + partialConfig.outdir });
9
+ fs_1.default.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(Object.assign(Object.assign({}, config), { buildDir: process.cwd() + "/" + config.outdir }), null, 2));
10
+ fs_1.default.copyFileSync("./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js", "./docs/TaskManFrontEnd.js");
11
+ fs_1.default.copyFileSync("./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css", "./docs/TaskManFrontEnd.css");
12
+ fs_1.default.writeFileSync(`${config.outdir}/index.html`, `<!DOCTYPE html>
13
+ <html lang="en">
14
+
15
+ <head>
16
+ <meta name="description" content="Webpage description goes here" />
17
+ <meta charset="utf-8" />
18
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
19
+ <meta name="author" content="" />
20
+
21
+ <title>TaskMan</title>
22
+
23
+ <link rel="stylesheet" href="/docs/TaskManFrontEnd.css" />
24
+ <script type="module" src="/docs/TaskManFrontEnd.js"></script>
25
+ </head>
26
+
27
+ <body><div id="root">react is loading</div></body>
28
+
29
+ </html>`);
30
+ };
@@ -3,72 +3,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const core_js_1 = require("./core.js");
7
- const core_js_2 = __importDefault(require("./core.js"));
8
- const NodeWriter_js_1 = require("./NodeWriter.js");
9
- const receiveTestResourceConfigUnscheduled = async (t, testresource) => {
10
- const { failed, artifacts, logPromise } = await t.receiveTestResourceConfig(testresource);
11
- Promise.all([...artifacts, logPromise]).then(async () => {
12
- process.exit(await failed ? 1 : 0);
13
- });
14
- };
15
- const receiveTestResourceConfigScheduled = async (t, testresource) => {
16
- const { failed, artifacts, logPromise } = await t.receiveTestResourceConfig(testresource);
17
- /* @ts-ignore:next-line */
18
- process.send({
19
- type: "testeranto:adios",
20
- data: {
21
- failed,
22
- testResourceConfiguration: t.test.testResourceConfiguration,
23
- results: t.toObj(),
24
- },
25
- }, async (err) => {
26
- if (!err) {
27
- Promise.all([...artifacts, logPromise]).then(async () => {
28
- process.exit(await failed ? 1 : 0);
29
- });
30
- }
31
- else {
32
- console.error(err);
33
- process.exit(1);
34
- }
35
- });
36
- };
37
- exports.default = async (input, testSpecification, testImplementation, testInterface, testResourceRequirement = core_js_1.defaultTestResourceRequirement) => {
38
- const mrt = new core_js_2.default(input, testSpecification, testImplementation, testInterface, testResourceRequirement, testInterface.assertioner || (async (t) => t), testInterface.beforeEach || async function (subject, initialValues, testResource) {
39
- return subject;
40
- }, testInterface.afterEach || (async (s) => s), testInterface.afterAll || ((store) => undefined), testInterface.butThen || (async (a) => a), testInterface.andWhen, testInterface.actionHandler ||
41
- function (b) {
42
- return b;
43
- }, NodeWriter_js_1.NodeWriter);
44
- const tl2 = mrt;
45
- const t = tl2.testJobs[0];
46
- const testResourceArg = process.argv[2] || `{}`;
47
- try {
48
- const partialTestResource = JSON.parse(testResourceArg);
49
- if (partialTestResource.scheduled) {
50
- console.log("test is scheduled", partialTestResource);
51
- console.log("requesting test resources via IPC ...", testResourceRequirement);
52
- /* @ts-ignore:next-line */
53
- process.send({
54
- type: "testeranto:hola",
55
- data: {
56
- requirement: Object.assign(Object.assign({}, testResourceRequirement), { name: partialTestResource.name })
57
- },
58
- });
59
- console.log("awaiting test resources via IPC...");
60
- process.on("message", async function (packet) {
61
- const resourcesFromPm2 = packet.data.testResourceConfiguration;
62
- const secondTestResource = Object.assign(Object.assign({ fs: "." }, JSON.parse(JSON.stringify(partialTestResource))), JSON.parse(JSON.stringify(resourcesFromPm2)));
63
- receiveTestResourceConfigScheduled(t, secondTestResource);
64
- });
65
- }
66
- else {
67
- receiveTestResourceConfigUnscheduled(t, partialTestResource);
68
- }
6
+ const core_js_1 = __importDefault(require("./lib/core.js"));
7
+ const index_js_1 = require("./lib/index.js");
8
+ const node_js_1 = require("./PM/node.js");
9
+ class NodeTesteranto extends core_js_1.default {
10
+ constructor(input, testSpecification, testImplementation, testResourceRequirement, testInterface) {
11
+ super(input, testSpecification, testImplementation, testResourceRequirement, testInterface);
69
12
  }
70
- catch (e) {
71
- console.error(e);
72
- process.exit(-1);
13
+ async receiveTestResourceConfig(partialTestResource) {
14
+ const t = JSON.parse(partialTestResource);
15
+ console.log("receiveTestResourceConfig", t);
16
+ const pm = new node_js_1.PM_Node(t);
17
+ const { failed, artifacts, logPromise } = await this.testJobs[0].receiveTestResourceConfig(pm);
18
+ pm.customclose();
73
19
  }
20
+ }
21
+ exports.default = async (input, testSpecification, testImplementation, testInterface, testResourceRequirement = index_js_1.defaultTestResourceRequirement) => {
22
+ return new NodeTesteranto(input, testSpecification, testImplementation, testResourceRequirement, testInterface);
74
23
  };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PM = void 0;
4
+ const fPaths = [];
5
+ class PM {
6
+ }
7
+ exports.PM = PM;