testeranto 0.135.0 → 0.140.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 (187) hide show
  1. package/.aider.chat.history.md +13976 -0
  2. package/.aider.input.history +530 -0
  3. package/.aider.tags.cache.v3/{d8/b0/a8966fcd65890fd9f70d7afe8141.val → bd/91/b71f967fd074cf4b757081b429b7.val} +0 -0
  4. package/.aider.tags.cache.v3/cache.db +0 -0
  5. package/.aider.tags.cache.v3/{8e/ec/2d4659a1589a0187a757ab1cbefa.val → fb/96/b0f91c7e75e08fc5a6907633cf99.val} +0 -0
  6. package/README.md +28 -135
  7. package/bundle.js +1 -1
  8. package/dist/common/src/Init.js +4 -1
  9. package/dist/common/src/Node.js +1 -1
  10. package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
  11. package/dist/common/src/Web.js +2 -2
  12. package/dist/common/src/build.js +7 -73
  13. package/dist/common/src/defaultConfig.js +0 -1
  14. package/dist/common/src/lib/abstractBase.js +2 -0
  15. package/dist/common/src/lib/basebuilder.js +4 -0
  16. package/dist/common/src/lib/core.js +2 -0
  17. package/dist/common/src/run.js +1 -1
  18. package/dist/common/src/utils/buildTemplates.js +88 -0
  19. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  20. package/dist/module/src/Init.js +4 -1
  21. package/dist/module/src/Node.js +1 -1
  22. package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
  23. package/dist/module/src/Project.js +41 -47
  24. package/dist/module/src/TestReport.js +34 -31
  25. package/dist/module/src/Web.js +2 -2
  26. package/dist/module/src/build.js +7 -73
  27. package/dist/module/src/defaultConfig.js +0 -1
  28. package/dist/module/src/lib/abstractBase.js +2 -0
  29. package/dist/module/src/lib/basebuilder.js +4 -0
  30. package/dist/module/src/lib/core.js +2 -0
  31. package/dist/module/src/run.js +1 -1
  32. package/dist/module/src/utils/buildTemplates.js +82 -0
  33. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  34. package/dist/prebuild/Project.js +62 -13
  35. package/dist/prebuild/TestReport.js +39 -18
  36. package/dist/prebuild/build.mjs +96 -73
  37. package/dist/prebuild/init-docs.mjs +0 -4
  38. package/dist/tsconfig.tsbuildinfo +1 -0
  39. package/dist/types/src/CoreTypes.d.ts +5 -3
  40. package/dist/types/src/Node.d.ts +3 -3
  41. package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +17 -1
  42. package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +17 -1
  43. package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +17 -1
  44. package/dist/types/src/PM/nodeSidecar.d.ts +2 -2
  45. package/dist/types/src/Pure.d.ts +3 -3
  46. package/dist/types/src/Types.d.ts +18 -14
  47. package/dist/types/src/Web.d.ts +3 -3
  48. package/dist/types/src/lib/abstractBase.d.ts +8 -8
  49. package/dist/types/src/lib/basebuilder.d.ts +3 -3
  50. package/dist/types/src/lib/classBuilder.d.ts +2 -2
  51. package/dist/types/src/lib/core.d.ts +2 -2
  52. package/dist/types/src/lib/index.d.ts +7 -6
  53. package/dist/types/src/lib/types.d.ts +8 -8
  54. package/dist/types/src/mothership/test.d.ts +20 -1
  55. package/dist/types/src/utils/buildTemplates.d.ts +3 -0
  56. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  57. package/docs/index.md +344 -54
  58. package/docs/style.md +116 -0
  59. package/docs.html +537 -0
  60. package/example.css +351 -0
  61. package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Black.ttf +0 -0
  62. package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Bold.ttf +0 -0
  63. package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-ExtraBold.ttf +0 -0
  64. package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Light.ttf +0 -0
  65. package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Medium.ttf +0 -0
  66. package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Regular.ttf +0 -0
  67. package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Thin.ttf +0 -0
  68. package/fonts/M_PLUS_Rounded_1c/OFL.txt +91 -0
  69. package/index.html +245 -24
  70. package/logo.svg +72 -0
  71. package/package.json +6 -2
  72. package/scripts/compile-docs.js +89 -0
  73. package/src/CoreTypes.ts +24 -43
  74. package/src/Init.ts +4 -4
  75. package/src/Node.ts +6 -20
  76. package/src/PM/__tests__/nodeSidecar.testeranto.ts +13 -20
  77. package/src/PM/__tests__/pureSidecar.testeranto.ts +8 -15
  78. package/src/PM/__tests__/webSidecar.testeranto.ts +8 -15
  79. package/src/PM/nodeSidecar.ts +2 -2
  80. package/src/PM/pure.ts +0 -4
  81. package/src/Project.tsx +289 -292
  82. package/src/Pure.ts +13 -14
  83. package/src/PureSidecar.ts +1 -0
  84. package/src/TestReport.tsx +179 -165
  85. package/src/Types.ts +29 -144
  86. package/src/Web.ts +15 -11
  87. package/src/build.ts +22 -73
  88. package/src/defaultConfig.ts +2 -1
  89. package/src/lib/BaseSuite.test.ts +457 -0
  90. package/src/lib/BaseSuite.ts +155 -0
  91. package/src/lib/abstractBase.ts +7 -162
  92. package/src/lib/basebuilder.ts +11 -11
  93. package/src/lib/classBuilder.ts +8 -3
  94. package/src/lib/core.ts +12 -12
  95. package/src/lib/index.ts +21 -24
  96. package/src/lib/types.ts +23 -9
  97. package/src/mothership/test.ts +13 -10
  98. package/src/run.ts +1 -1
  99. package/src/style.css +1 -1
  100. package/src/utils/buildTemplates.ts +88 -0
  101. package/style.css +496 -0
  102. package/testeranto/bundles/node/{mothership/chunk-V2EQEXU2.mjs → allTests/chunk-4PJCC2XT.mjs} +66 -59
  103. package/testeranto/bundles/node/allTests/metafile.json +4151 -0
  104. package/testeranto/bundles/node/allTests/src/PM/__tests__/nodeSidecar.testeranto.mjs +187 -0
  105. package/testeranto/bundles/node/{mothership → allTests}/src/PM/__tests__/pureSidecar.testeranto.mjs +1 -1
  106. package/testeranto/bundles/node/{mothership → allTests}/src/PM/__tests__/webSidecar.testeranto.mjs +1 -1
  107. package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test.mjs +305 -0
  108. package/testeranto/bundles/node/{mothership → allTests}/src/mothership/test.mjs +1 -1
  109. package/testeranto/dev.html +29 -0
  110. package/testeranto/index.html +28 -27
  111. package/testeranto/reports/allTests/config.json +57 -0
  112. package/testeranto/reports/{mothership/index.html → allTests/dev.html} +2 -0
  113. package/testeranto/reports/allTests/index.html +26 -0
  114. package/testeranto/reports/{mothership/src/PM/__tests__/sidecar.testeranto/node/index.html → allTests/src/PM/__tests__/nodeSidecar.testeranto/node/dev.html} +4 -3
  115. package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/index.html +21 -0
  116. package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +80 -0
  117. package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/message +1 -0
  118. package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +8 -0
  119. package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +28 -0
  120. package/testeranto/reports/{mothership/src/PM/__tests__/webSidecar.testeranto/node/index.html → allTests/src/PM/__tests__/pureSidecar.testeranto/node/dev.html} +4 -3
  121. package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/index.html +21 -0
  122. package/testeranto/reports/{mothership → allTests}/src/PM/__tests__/pureSidecar.testeranto/node/lint_errors.json +12 -12
  123. package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/message +1 -0
  124. package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +8 -0
  125. package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +32 -0
  126. package/testeranto/reports/{mothership/src/PM/__tests__/nodeSidecar.testeranto/node/index.html → allTests/src/PM/__tests__/webSidecar.testeranto/node/dev.html} +4 -3
  127. package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/index.html +21 -0
  128. package/testeranto/reports/{mothership → allTests}/src/PM/__tests__/webSidecar.testeranto/node/lint_errors.json +12 -12
  129. package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/message +1 -0
  130. package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +8 -0
  131. package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +32 -0
  132. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/console_log.txt +35 -0
  133. package/testeranto/reports/{mothership/src/PM/__tests__/pureSidecar.testeranto/node/index.html → allTests/src/lib/BaseSuite.test/node/dev.html} +4 -3
  134. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/index.html +21 -0
  135. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/lint_errors.json +608 -0
  136. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/message +1 -0
  137. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/prompt.txt +7 -0
  138. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/type_errors.txt +68 -0
  139. package/testeranto/reports/allTests/src/mothership/test/node/dev.html +21 -0
  140. package/testeranto/reports/allTests/src/mothership/test/node/index.html +21 -0
  141. package/testeranto/reports/allTests/src/mothership/test/node/message +1 -0
  142. package/testeranto/reports/allTests/src/mothership/test/node/prompt.txt +8 -0
  143. package/testeranto/reports/allTests/src/mothership/test/node/type_errors.txt +24 -0
  144. package/testeranto/reports/allTests/summary.json +37 -0
  145. package/testeranto.config.ts +16 -26
  146. package/tsc.log +66 -69
  147. package/dist/common/src/SP__Polygon.test.js +0 -10
  148. package/dist/module/src/ReportClient.js +0 -132
  149. package/dist/module/src/SP__Polygon.test.js +0 -8
  150. package/dist/prebuild/ReportClient.js +0 -3
  151. package/dist/types/src/SP__Polygon.test.d.ts +0 -1
  152. package/src/ReportClient.tsx +0 -164
  153. package/src/SP__Polygon.test.ts +0 -13
  154. package/testeranto/ReportClient.css +0 -11367
  155. package/testeranto/ReportClient.js +0 -24641
  156. package/testeranto/bundles/node/mothership/metafile.json +0 -389
  157. package/testeranto/bundles/node/mothership/src/PM/__tests__/nodeSidecar.testeranto.mjs +0 -1219
  158. package/testeranto/bundles/node/mothership/src/PM/__tests__/sidecar.testeranto.mjs +0 -1199
  159. package/testeranto/reports/mothership/config.json +0 -25
  160. package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/console_log.txt +0 -0
  161. package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +0 -1564
  162. package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +0 -22
  163. package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +0 -35
  164. package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +0 -12
  165. package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +0 -26
  166. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/bdd_errors.txt +0 -1
  167. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/console_log.txt +0 -0
  168. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/lint_errors.json +0 -1564
  169. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/log.txt +0 -0
  170. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/prompt.txt +0 -22
  171. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/tests.json +0 -56
  172. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/type_errors.txt +0 -29
  173. package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +0 -12
  174. package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +0 -26
  175. package/testeranto/reports/mothership/src/mothership/test/node/bdd_errors.txt +0 -1
  176. package/testeranto/reports/mothership/src/mothership/test/node/console_log.txt +0 -4
  177. package/testeranto/reports/mothership/src/mothership/test/node/index.html +0 -20
  178. package/testeranto/reports/mothership/src/mothership/test/node/log.txt +0 -0
  179. package/testeranto/reports/mothership/src/mothership/test/node/prompt.txt +0 -12
  180. package/testeranto/reports/mothership/src/mothership/test/node/tests.json +0 -24
  181. package/testeranto/reports/mothership/src/mothership/test/node/type_errors.txt +0 -18
  182. package/testeranto/reports/mothership/summary.json +0 -9
  183. /package/testeranto/bundles/node/{mothership → allTests}/chunk-PG6KUKNP.mjs +0 -0
  184. /package/testeranto/bundles/pure/{mothership → allTests}/metafile.json +0 -0
  185. /package/testeranto/bundles/web/{mothership → allTests}/metafile.json +0 -0
  186. /package/testeranto/reports/{mothership/src/PM/__tests__/nodeSidecar.testeranto → allTests/src/lib/BaseSuite.test}/node/log.txt +0 -0
  187. /package/testeranto/reports/{mothership → allTests}/src/mothership/test/node/lint_errors.json +0 -0
@@ -0,0 +1,187 @@
1
+ import { createRequire } from 'module';const require = createRequire(import.meta.url);
2
+ import {
3
+ PM_sidecar
4
+ } from "../../../chunk-PG6KUKNP.mjs";
5
+ import {
6
+ Node_default
7
+ } from "../../../chunk-4PJCC2XT.mjs";
8
+
9
+ // src/PM/nodeSidecar.ts
10
+ import net from "net";
11
+ var PM_Node_Sidecar = class extends PM_sidecar {
12
+ constructor(t) {
13
+ super();
14
+ this.testResourceConfiguration = t;
15
+ this.client = {};
16
+ }
17
+ start(stopper) {
18
+ return new Promise((res) => {
19
+ process.on("message", async (message) => {
20
+ if (message === "stop") {
21
+ console.log("STOP!", stopper.toString());
22
+ await stopper();
23
+ process.exit();
24
+ } else if (message.path) {
25
+ this.client = net.createConnection(message.path, () => {
26
+ res();
27
+ });
28
+ }
29
+ });
30
+ });
31
+ }
32
+ stop() {
33
+ return new Promise((resolve) => {
34
+ if (this.client) {
35
+ this.client.end(() => resolve());
36
+ } else {
37
+ resolve();
38
+ }
39
+ });
40
+ }
41
+ testArtiFactoryfileWriter(tLog, callback) {
42
+ return (fPath, value) => {
43
+ callback(Promise.resolve());
44
+ };
45
+ }
46
+ send(command, ...argz) {
47
+ return new Promise((res) => {
48
+ const key = Math.random().toString();
49
+ const myListener = (event) => {
50
+ const x = JSON.parse(event);
51
+ if (x.key === key) {
52
+ process.removeListener("message", myListener);
53
+ res(x.payload);
54
+ }
55
+ };
56
+ process.addListener("message", myListener);
57
+ this.client.write(JSON.stringify([command, ...argz, key]));
58
+ });
59
+ }
60
+ };
61
+
62
+ // src/PM/__tests__/nodeSidecar.testeranto.ts
63
+ var specification = (Suite, Given, When, Then) => {
64
+ return [
65
+ Suite.SidecarInitialized(
66
+ "Sidecar message passing works correctly",
67
+ {
68
+ basicSend: Given.SidecarReady(
69
+ ["can send and receive messages"],
70
+ [When.SendTestMessage("test-message")],
71
+ [Then.MessageReceived("test-message")]
72
+ ),
73
+ cleanup: Given.SidecarReady(
74
+ ["cleans up listeners after message"],
75
+ [When.VerifyCleanup()],
76
+ [Then.ListenersCleaned()]
77
+ )
78
+ },
79
+ []
80
+ )
81
+ ];
82
+ };
83
+ var implementation = {
84
+ suites: { SidecarInitialized: (x) => x },
85
+ givens: {
86
+ SidecarReady: () => {
87
+ const config = {
88
+ name: "test-sidecar",
89
+ fs: "/tmp",
90
+ ports: [3001],
91
+ browserWSEndpoint: ""
92
+ };
93
+ return new PM_Node_Sidecar(config);
94
+ }
95
+ },
96
+ whens: {
97
+ SendTestMessage: (message) => async (sidecar) => {
98
+ let callbackFn;
99
+ const mockProcess = {
100
+ on: (event, callback) => {
101
+ if (event === "message") {
102
+ callbackFn = callback;
103
+ callback(
104
+ JSON.stringify({
105
+ key: "mock-key",
106
+ payload: message
107
+ })
108
+ );
109
+ }
110
+ return mockProcess;
111
+ },
112
+ addListener: () => mockProcess,
113
+ removeListener: () => mockProcess
114
+ };
115
+ process = mockProcess;
116
+ let writeCalled = false;
117
+ sidecar.client.write = (data) => {
118
+ writeCalled = true;
119
+ return true;
120
+ };
121
+ await sidecar.send("test-command", message);
122
+ return { writeCalled, callbackFn };
123
+ },
124
+ VerifyCleanup: () => async (sidecar) => {
125
+ let addListenerCalled = false;
126
+ let removeListenerCalled = false;
127
+ const mockProcess = {
128
+ addListener: () => {
129
+ addListenerCalled = true;
130
+ return mockProcess;
131
+ },
132
+ removeListener: () => {
133
+ removeListenerCalled = true;
134
+ return mockProcess;
135
+ }
136
+ };
137
+ process = mockProcess;
138
+ await sidecar.send("test-command", "test");
139
+ return { addListenerCalled, removeListenerCalled };
140
+ }
141
+ },
142
+ thens: {
143
+ MessageReceived: (expected) => (actual) => {
144
+ if (actual !== expected) {
145
+ throw new Error(`Expected "${expected}" but got "${actual}"`);
146
+ }
147
+ return actual;
148
+ },
149
+ ListenersCleaned: () => (result, { removeListenerCalled }) => {
150
+ if (!removeListenerCalled) {
151
+ throw new Error("Expected removeListener to be called");
152
+ }
153
+ return result;
154
+ }
155
+ },
156
+ checks: { SidecarState: () => "unknown" }
157
+ };
158
+ var testInterface = {
159
+ beforeEach: async (subject, initializer, testResource, initialValues, pm) => {
160
+ const sidecar = initializer();
161
+ sidecar.client = {
162
+ write: () => true,
163
+ end: () => {
164
+ },
165
+ on: () => {
166
+ }
167
+ };
168
+ return sidecar;
169
+ },
170
+ andWhen: async (store, whenCB, testResource, pm) => {
171
+ try {
172
+ await whenCB(store, testResource, pm);
173
+ } catch (e) {
174
+ console.error("Error in andWhen:", e);
175
+ throw e;
176
+ }
177
+ }
178
+ };
179
+ var nodeSidecar_testeranto_default = Node_default(
180
+ () => new PM_Node_Sidecar({}),
181
+ specification,
182
+ implementation,
183
+ testInterface
184
+ );
185
+ export {
186
+ nodeSidecar_testeranto_default as default
187
+ };
@@ -4,7 +4,7 @@ import {
4
4
  } from "../../../chunk-PG6KUKNP.mjs";
5
5
  import {
6
6
  Node_default
7
- } from "../../../chunk-V2EQEXU2.mjs";
7
+ } from "../../../chunk-4PJCC2XT.mjs";
8
8
 
9
9
  // src/PM/pureSidecar.ts
10
10
  import net from "net";
@@ -4,7 +4,7 @@ import {
4
4
  } from "../../../chunk-PG6KUKNP.mjs";
5
5
  import {
6
6
  Node_default
7
- } from "../../../chunk-V2EQEXU2.mjs";
7
+ } from "../../../chunk-4PJCC2XT.mjs";
8
8
 
9
9
  // src/PM/webSidecar.ts
10
10
  import net from "net";
@@ -0,0 +1,305 @@
1
+ import { createRequire } from 'module';const require = createRequire(import.meta.url);
2
+ import {
3
+ BaseCheck,
4
+ BaseGiven,
5
+ BaseSuite,
6
+ BaseThen,
7
+ BaseWhen,
8
+ Node_default
9
+ } from "../../chunk-4PJCC2XT.mjs";
10
+
11
+ // src/lib/BaseSuite.test.ts
12
+ var MockGiven = class extends BaseGiven {
13
+ constructor(name, features, whens, thens) {
14
+ super(
15
+ name,
16
+ features,
17
+ whens,
18
+ thens,
19
+ async () => ({ testStore: true }),
20
+ // givenCB
21
+ {}
22
+ // initialValues
23
+ );
24
+ }
25
+ async givenThat(subject, testResourceConfiguration, artifactory, givenCB, initialValues, pm) {
26
+ return { testStore: true };
27
+ }
28
+ uberCatcher(e) {
29
+ console.error("Given error:", e);
30
+ }
31
+ };
32
+ var MockWhen = class extends BaseWhen {
33
+ async andWhen(store, whenCB, testResource, pm) {
34
+ return { ...store, testStore: true };
35
+ }
36
+ };
37
+ var MockThen = class extends BaseThen {
38
+ async butThen(store, thenCB, testResourceConfiguration, pm) {
39
+ return { testSelection: true };
40
+ }
41
+ };
42
+ var MockCheck = class extends BaseCheck {
43
+ async checkThat(subject, testResourceConfiguration, artifactory, initializer, initialValues, pm) {
44
+ return { testStore: true };
45
+ }
46
+ };
47
+ var TestableSuite = class extends BaseSuite {
48
+ constructor(name, index) {
49
+ super(
50
+ name,
51
+ index,
52
+ {
53
+ testGiven: new MockGiven(
54
+ "testGiven",
55
+ ["testFeature"],
56
+ [
57
+ new MockWhen(
58
+ "testWhen",
59
+ () => Promise.resolve({ testStore: true })
60
+ )
61
+ ],
62
+ [
63
+ new MockThen(
64
+ "testThen",
65
+ async () => Promise.resolve({ testSelection: true })
66
+ )
67
+ ]
68
+ )
69
+ },
70
+ [
71
+ new MockCheck(
72
+ "testCheck",
73
+ ["testFeature"],
74
+ () => Promise.resolve({ testStore: true }),
75
+ null,
76
+ () => {
77
+ }
78
+ )
79
+ ]
80
+ );
81
+ }
82
+ };
83
+ var specification = (Suite, Given, When, Then, Check) => [
84
+ Suite.Default(
85
+ "BaseSuite Core Functionality Tests",
86
+ {
87
+ // Test initialization and basic properties
88
+ initialization: Given.Default(
89
+ ["BaseSuite should initialize with correct name and index"],
90
+ [],
91
+ [
92
+ Then.SuiteNameMatches("testSuite"),
93
+ Then.SuiteIndexMatches(0),
94
+ Then.FeaturesIncludes("testFeature")
95
+ ]
96
+ ),
97
+ // Test execution flow
98
+ execution: Given.Default(
99
+ ["BaseSuite should execute all phases successfully"],
100
+ [When.RunSuite()],
101
+ [Then.StoreValid(), Then.NoErrorsOccurred(), Then.AllChecksCompleted()]
102
+ ),
103
+ // Test multiple features
104
+ multipleFeatures: Given.Default(
105
+ ["BaseSuite should handle multiple features"],
106
+ [When.AddFeature("additionalFeature")],
107
+ [
108
+ Then.FeaturesIncludes("testFeature"),
109
+ Then.FeaturesIncludes("additionalFeature"),
110
+ Then.FeatureCountMatches(2)
111
+ ]
112
+ ),
113
+ // Test error handling
114
+ errorHandling: Given.Default(
115
+ ["BaseSuite should handle errors gracefully"],
116
+ [When.RunSuiteWithError()],
117
+ [
118
+ Then.ErrorCountMatches(1)
119
+ // Then.FailedFlagSet(),
120
+ ]
121
+ )
122
+ },
123
+ [
124
+ // Additional validation checks
125
+ // Check.Default(
126
+ // ["Verify suite state after all tests"],
127
+ // [],
128
+ // [
129
+ // Then.AllTestsCompleted(),
130
+ // Then.CleanExit()
131
+ // ]
132
+ // )
133
+ ]
134
+ )
135
+ ];
136
+ var implementation = {
137
+ suites: {
138
+ Default: "BaseSuite Comprehensive Test Suite"
139
+ },
140
+ givens: {
141
+ Default: () => new TestableSuite("testSuite", 0)
142
+ },
143
+ whens: {
144
+ RunSuite: () => async (suite) => {
145
+ const mockConfig = {
146
+ name: "test",
147
+ fs: "/tmp",
148
+ ports: [3e3],
149
+ environment: {},
150
+ timeout: 5e3,
151
+ retries: 3
152
+ };
153
+ const mockArtifactory = (key, value) => {
154
+ };
155
+ const mockTLog = (...args) => {
156
+ };
157
+ const mockPM = {
158
+ server: null,
159
+ testResourceConfiguration: mockConfig,
160
+ start: async () => {
161
+ },
162
+ stop: async () => {
163
+ },
164
+ testArtiFactoryfileWriter: () => {
165
+ },
166
+ $: () => {
167
+ },
168
+ click: () => {
169
+ },
170
+ closePage: () => {
171
+ },
172
+ createWriteStream: async () => ""
173
+ };
174
+ return await suite.run(
175
+ null,
176
+ mockConfig,
177
+ mockArtifactory,
178
+ mockTLog,
179
+ mockPM
180
+ );
181
+ },
182
+ RunSuiteWithError: () => async (suite) => {
183
+ try {
184
+ await suite.run(
185
+ null,
186
+ {},
187
+ // Invalid config
188
+ () => {
189
+ },
190
+ () => {
191
+ },
192
+ {}
193
+ );
194
+ } catch (e) {
195
+ }
196
+ return suite;
197
+ },
198
+ AddFeature: (feature) => (suite) => {
199
+ const firstGivenKey = Object.keys(suite.givens)[0];
200
+ if (firstGivenKey) {
201
+ suite.givens[firstGivenKey].features.push(feature);
202
+ }
203
+ return suite;
204
+ }
205
+ },
206
+ thens: {
207
+ SuiteNameMatches: (expectedName) => (suite) => {
208
+ if (suite.name !== expectedName) {
209
+ throw new Error(
210
+ `Expected suite name '${expectedName}', got '${suite.name}'`
211
+ );
212
+ }
213
+ return suite;
214
+ },
215
+ SuiteIndexMatches: (expectedIndex) => (suite) => {
216
+ if (suite.index !== expectedIndex) {
217
+ throw new Error(
218
+ `Expected suite index ${expectedIndex}, got ${suite.index}`
219
+ );
220
+ }
221
+ return suite;
222
+ },
223
+ FeaturesIncludes: (feature) => (suite) => {
224
+ if (!suite.features().includes(feature)) {
225
+ throw new Error(`Expected features to include ${feature}`);
226
+ }
227
+ return suite;
228
+ },
229
+ FeatureCountMatches: (expectedCount) => (suite) => {
230
+ const actualCount = suite.features().length;
231
+ if (actualCount !== expectedCount) {
232
+ throw new Error(
233
+ `Expected ${expectedCount} features, got ${actualCount}`
234
+ );
235
+ }
236
+ return suite;
237
+ },
238
+ StoreValid: () => (suite) => {
239
+ if (!suite.store?.testStore) {
240
+ throw new Error("Expected valid store after execution");
241
+ }
242
+ return suite;
243
+ },
244
+ NoErrorsOccurred: () => (suite) => {
245
+ if (suite.failed || suite.fails > 0) {
246
+ throw new Error("Expected no errors to occur during execution");
247
+ }
248
+ return suite;
249
+ },
250
+ ErrorCountMatches: (expectedCount) => (suite) => {
251
+ if (suite.fails !== expectedCount) {
252
+ throw new Error(
253
+ `Expected ${expectedCount} errors, got ${suite.fails}`
254
+ );
255
+ }
256
+ return suite;
257
+ },
258
+ FailedFlagSet: () => (suite) => {
259
+ if (!suite.failed) {
260
+ throw new Error("Expected failed flag to be set after error");
261
+ }
262
+ return suite;
263
+ },
264
+ AllChecksCompleted: () => (suite) => {
265
+ if (suite.checks.some((check) => !check.key)) {
266
+ throw new Error("Expected all checks to be completed");
267
+ }
268
+ return suite;
269
+ },
270
+ AllTestsCompleted: () => (suite) => {
271
+ if (!suite.store) {
272
+ throw new Error("Expected all tests to be completed");
273
+ }
274
+ return suite;
275
+ },
276
+ CleanExit: () => (suite) => {
277
+ if (suite.failed && suite.fails === 0) {
278
+ throw new Error("Expected clean exit state");
279
+ }
280
+ return suite;
281
+ }
282
+ },
283
+ checks: {
284
+ Default: () => new TestableSuite("testCheck", 1)
285
+ }
286
+ };
287
+ var testInterface = {
288
+ beforeEach: async (subject, initializer) => initializer(),
289
+ andWhen: async (store, whenCB, testResource, pm) => whenCB(store, pm),
290
+ butThen: async (store, thenCB, testResource, pm) => thenCB(store, pm),
291
+ afterEach: (store) => store,
292
+ afterAll: (store, pm) => {
293
+ },
294
+ assertThis: (result) => !!result,
295
+ beforeAll: async (input, testResource, pm) => input
296
+ };
297
+ var BaseSuite_test_default = Node_default(
298
+ BaseSuite.prototype,
299
+ specification,
300
+ implementation,
301
+ testInterface
302
+ );
303
+ export {
304
+ BaseSuite_test_default as default
305
+ };
@@ -4,7 +4,7 @@ import {
4
4
  __commonJS,
5
5
  __require,
6
6
  __toESM
7
- } from "../../chunk-V2EQEXU2.mjs";
7
+ } from "../../chunk-4PJCC2XT.mjs";
8
8
 
9
9
  // node_modules/depd/index.js
10
10
  var require_depd = __commonJS({
@@ -0,0 +1,29 @@
1
+
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+
5
+ <head>
6
+ <meta name="description" content="Webpage description goes here" />
7
+ <meta charset="utf-8" />
8
+ <title>testeranto - testeranto</title>
9
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
10
+ <meta name="author" content="" />
11
+ <base href="/" target="_blank">
12
+
13
+ <script type="application/json" id="bigConfig">
14
+ ["allTests","react"]
15
+ </script>
16
+
17
+ <link rel="stylesheet" href="./testeranto/Project.css" />
18
+ <script type="module" src="./testeranto/Project.js"></script>
19
+
20
+ </head>
21
+
22
+ <body>
23
+ <div id="root">
24
+ react is loading
25
+ </div>
26
+ </body>
27
+
28
+ </html>
29
+
@@ -1,28 +1,29 @@
1
1
 
2
- <!DOCTYPE html>
3
- <html lang="en">
4
-
5
- <head>
6
- <meta name="description" content="Webpage description goes here" />
7
- <meta charset="utf-8" />
8
- <title>testeranto - testeranto</title>
9
- <meta name="viewport" content="width=device-width, initial-scale=1" />
10
- <meta name="author" content="" />
11
-
12
- <script type="application/json" id="bigConfig">
13
- ["mothership","react"]
14
- </script>
15
-
16
- <link rel="stylesheet" href="Project.css" />
17
- <script type="module" src="Project.js"></script>
18
-
19
- </head>
20
-
21
- <body>
22
- <div id="root">
23
- react is loading
24
- </div>
25
- </body>
26
-
27
- </html>
28
-
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+
5
+ <head>
6
+ <meta name="description" content="Webpage description goes here" />
7
+ <meta charset="utf-8" />
8
+ <title>testeranto - testeranto</title>
9
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
10
+ <meta name="author" content="" />
11
+ <base href="undefined" target="_blank">
12
+
13
+ <script type="application/json" id="bigConfig">
14
+ ["allTests","react"]
15
+ </script>
16
+
17
+ <link rel="stylesheet" href="./testeranto/Project.css" />
18
+ <script type="module" src="./testeranto/Project.js"></script>
19
+
20
+ </head>
21
+
22
+ <body>
23
+ <div id="root">
24
+ react is loading
25
+ </div>
26
+ </body>
27
+
28
+ </html>
29
+
@@ -0,0 +1,57 @@
1
+ {
2
+ "tests": [
3
+ [
4
+ "./src/lib/BaseSuite.test.ts",
5
+ "node",
6
+ {
7
+ "ports": 1
8
+ },
9
+ []
10
+ ],
11
+ [
12
+ "./src/mothership/test.ts",
13
+ "node",
14
+ {
15
+ "ports": 1
16
+ },
17
+ []
18
+ ],
19
+ [
20
+ "./src/PM/__tests__/nodeSidecar.testeranto.ts",
21
+ "node",
22
+ {
23
+ "ports": 1
24
+ },
25
+ []
26
+ ],
27
+ [
28
+ "./src/PM/__tests__/pureSidecar.testeranto.ts",
29
+ "node",
30
+ {
31
+ "ports": 1
32
+ },
33
+ []
34
+ ],
35
+ [
36
+ "./src/PM/__tests__/webSidecar.testeranto.ts",
37
+ "node",
38
+ {
39
+ "ports": 1
40
+ },
41
+ []
42
+ ]
43
+ ],
44
+ "clearScreen": false,
45
+ "debugger": false,
46
+ "externals": [],
47
+ "externalTests": {},
48
+ "importPlugins": [],
49
+ "minify": false,
50
+ "nodePlugins": [],
51
+ "ports": [
52
+ "3333"
53
+ ],
54
+ "src": "",
55
+ "webPlugins": [],
56
+ "buildDir": "/Users/adam/Code/testeranto/testeranto/bundles/allTests"
57
+ }
@@ -8,6 +8,8 @@
8
8
  <title>testeranto - testeranto</title>
9
9
  <meta name="viewport" content="width=device-width, initial-scale=1" />
10
10
  <meta name="author" content="" />
11
+
12
+ <base href="/" target="_blank">
11
13
 
12
14
  <link rel="stylesheet" href="../ReportClient.css" />
13
15
  <script type="module" src="../ReportClient.js"></script>
@@ -0,0 +1,26 @@
1
+
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+
5
+ <head>
6
+ <meta name="description" content="Webpage description goes here" />
7
+ <meta charset="utf-8" />
8
+ <title>testeranto - testeranto</title>
9
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
10
+ <meta name="author" content="" />
11
+
12
+ <base href="undefined" target="_blank">
13
+
14
+ <link rel="stylesheet" href="../ReportClient.css" />
15
+ <script type="module" src="../ReportClient.js"></script>
16
+
17
+ </head>
18
+
19
+ <body>
20
+ <div id="root">
21
+ react is loading
22
+ </div>
23
+ </body>
24
+
25
+ </html>
26
+