testeranto 0.110.0 → 0.111.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 (176) hide show
  1. package/package.json +1 -1
  2. package/src/PM/main.ts +418 -92
  3. package/src/ReportClient.tsx +38 -30
  4. package/src/run.ts +4 -371
  5. package/tsc.log +8 -6
  6. package/dist/common/Init.js +0 -68
  7. package/dist/common/Node.js +0 -27
  8. package/dist/common/PM/index.js +0 -7
  9. package/dist/common/PM/main.js +0 -984
  10. package/dist/common/PM/node.js +0 -128
  11. package/dist/common/PM/web.js +0 -121
  12. package/dist/common/ReportServer.js +0 -22
  13. package/dist/common/SubPackages/react/component/node.js +0 -19
  14. package/dist/common/SubPackages/react/component/web.js +0 -19
  15. package/dist/common/SubPackages/react/jsx/index.js +0 -21
  16. package/dist/common/SubPackages/react/jsx/node.js +0 -10
  17. package/dist/common/SubPackages/react/jsx/web.js +0 -10
  18. package/dist/common/SubPackages/react-dom/component/node.js +0 -88
  19. package/dist/common/SubPackages/react-dom/component/web.js +0 -67
  20. package/dist/common/SubPackages/react-dom/jsx/index.js +0 -2
  21. package/dist/common/SubPackages/react-dom/jsx/node.js +0 -39
  22. package/dist/common/SubPackages/react-dom/jsx/web.js +0 -128
  23. package/dist/common/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -54
  24. package/dist/common/SubPackages/react-test-renderer/component/index.js +0 -2
  25. package/dist/common/SubPackages/react-test-renderer/component/interface.js +0 -70
  26. package/dist/common/SubPackages/react-test-renderer/component/node.js +0 -8
  27. package/dist/common/SubPackages/react-test-renderer/component/web.js +0 -8
  28. package/dist/common/SubPackages/react-test-renderer/fc/node.js +0 -60
  29. package/dist/common/SubPackages/react-test-renderer/fc/web.js +0 -60
  30. package/dist/common/SubPackages/react-test-renderer/jsx/index.js +0 -67
  31. package/dist/common/SubPackages/react-test-renderer/jsx/node.js +0 -10
  32. package/dist/common/SubPackages/react-test-renderer/jsx/web.js +0 -10
  33. package/dist/common/SubPackages/react-test-renderer/jsx-promised/index.js +0 -52
  34. package/dist/common/SubPackages/react-test-renderer/jsx-promised/node.js +0 -10
  35. package/dist/common/SubPackages/react-test-renderer/jsx-promised/web.js +0 -10
  36. package/dist/common/Types.js +0 -2
  37. package/dist/common/Web.js +0 -49
  38. package/dist/common/build.js +0 -222
  39. package/dist/common/defaultConfig.js +0 -20
  40. package/dist/common/esbuildConfigs/eslint-formatter-testeranto.js +0 -6
  41. package/dist/common/esbuildConfigs/featuresPlugin.js +0 -39
  42. package/dist/common/esbuildConfigs/index.js +0 -21
  43. package/dist/common/esbuildConfigs/inputFilesPlugin.js +0 -27
  44. package/dist/common/esbuildConfigs/node.js +0 -37
  45. package/dist/common/esbuildConfigs/web.js +0 -50
  46. package/dist/common/init-docs.js +0 -53
  47. package/dist/common/lib/abstractBase.js +0 -329
  48. package/dist/common/lib/basebuilder.js +0 -98
  49. package/dist/common/lib/classBuilder.js +0 -40
  50. package/dist/common/lib/core.js +0 -117
  51. package/dist/common/lib/index.js +0 -21
  52. package/dist/common/lib/types.js +0 -2
  53. package/dist/common/package.json +0 -3
  54. package/dist/common/puppeteerConfiger.js +0 -24
  55. package/dist/common/run.js +0 -297
  56. package/dist/common/tsconfig.common.tsbuildinfo +0 -1
  57. package/dist/common/utils.js +0 -43
  58. package/dist/common/web.html.js +0 -22
  59. package/dist/module/Footer.js +0 -4
  60. package/dist/module/Init.js +0 -63
  61. package/dist/module/Node.js +0 -20
  62. package/dist/module/PM/index.js +0 -3
  63. package/dist/module/PM/main.js +0 -944
  64. package/dist/module/PM/node.js +0 -121
  65. package/dist/module/PM/web.js +0 -117
  66. package/dist/module/ReportClient.js +0 -97
  67. package/dist/module/ReportServer.js +0 -17
  68. package/dist/module/SubPackages/react/component/node.js +0 -14
  69. package/dist/module/SubPackages/react/component/web.js +0 -14
  70. package/dist/module/SubPackages/react/jsx/index.js +0 -15
  71. package/dist/module/SubPackages/react/jsx/node.js +0 -5
  72. package/dist/module/SubPackages/react/jsx/web.js +0 -5
  73. package/dist/module/SubPackages/react-dom/component/node.js +0 -80
  74. package/dist/module/SubPackages/react-dom/component/web.js +0 -62
  75. package/dist/module/SubPackages/react-dom/jsx/index.js +0 -1
  76. package/dist/module/SubPackages/react-dom/jsx/node.js +0 -31
  77. package/dist/module/SubPackages/react-dom/jsx/web.js +0 -90
  78. package/dist/module/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -16
  79. package/dist/module/SubPackages/react-test-renderer/component/index.js +0 -1
  80. package/dist/module/SubPackages/react-test-renderer/component/interface.js +0 -31
  81. package/dist/module/SubPackages/react-test-renderer/component/node.js +0 -3
  82. package/dist/module/SubPackages/react-test-renderer/component/web.js +0 -3
  83. package/dist/module/SubPackages/react-test-renderer/fc/node.js +0 -22
  84. package/dist/module/SubPackages/react-test-renderer/fc/web.js +0 -22
  85. package/dist/module/SubPackages/react-test-renderer/jsx/index.js +0 -28
  86. package/dist/module/SubPackages/react-test-renderer/jsx/node.js +0 -5
  87. package/dist/module/SubPackages/react-test-renderer/jsx/web.js +0 -5
  88. package/dist/module/SubPackages/react-test-renderer/jsx-promised/index.js +0 -16
  89. package/dist/module/SubPackages/react-test-renderer/jsx-promised/node.js +0 -5
  90. package/dist/module/SubPackages/react-test-renderer/jsx-promised/web.js +0 -5
  91. package/dist/module/TestReport.js +0 -91
  92. package/dist/module/Types.js +0 -1
  93. package/dist/module/Web.js +0 -42
  94. package/dist/module/build.js +0 -184
  95. package/dist/module/defaultConfig.js +0 -18
  96. package/dist/module/esbuildConfigs/eslint-formatter-testeranto.js +0 -3
  97. package/dist/module/esbuildConfigs/featuresPlugin.js +0 -34
  98. package/dist/module/esbuildConfigs/index.js +0 -19
  99. package/dist/module/esbuildConfigs/inputFilesPlugin.js +0 -22
  100. package/dist/module/esbuildConfigs/node.js +0 -32
  101. package/dist/module/esbuildConfigs/web.js +0 -45
  102. package/dist/module/init-docs.js +0 -15
  103. package/dist/module/lib/abstractBase.js +0 -321
  104. package/dist/module/lib/basebuilder.js +0 -94
  105. package/dist/module/lib/classBuilder.js +0 -36
  106. package/dist/module/lib/core.js +0 -114
  107. package/dist/module/lib/index.js +0 -17
  108. package/dist/module/lib/types.js +0 -1
  109. package/dist/module/package.json +0 -3
  110. package/dist/module/puppeteerConfiger.js +0 -19
  111. package/dist/module/run.js +0 -259
  112. package/dist/module/tsconfig.module.tsbuildinfo +0 -1
  113. package/dist/module/utils.js +0 -29
  114. package/dist/module/web.html.js +0 -20
  115. package/dist/prebuild/ReportClient.css +0 -11367
  116. package/dist/prebuild/ReportClient.js +0 -23641
  117. package/dist/prebuild/ReportServer.mjs +0 -16
  118. package/dist/prebuild/TestReport.css +0 -11367
  119. package/dist/prebuild/TestReport.js +0 -27484
  120. package/dist/prebuild/build.mjs +0 -376
  121. package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +0 -9
  122. package/dist/prebuild/init-docs.mjs +0 -104
  123. package/dist/prebuild/run.mjs +0 -1190
  124. package/dist/tsconfig.tsbuildinfo +0 -1
  125. package/dist/types/Init.d.ts +0 -2
  126. package/dist/types/Node.d.ts +0 -12
  127. package/dist/types/PM/index.d.ts +0 -34
  128. package/dist/types/PM/main.d.ts +0 -59
  129. package/dist/types/PM/node.d.ts +0 -40
  130. package/dist/types/PM/web.d.ts +0 -38
  131. package/dist/types/ReportServer.d.ts +0 -1
  132. package/dist/types/SubPackages/react/component/node.d.ts +0 -7
  133. package/dist/types/SubPackages/react/component/web.d.ts +0 -7
  134. package/dist/types/SubPackages/react/jsx/index.d.ts +0 -12
  135. package/dist/types/SubPackages/react/jsx/node.d.ts +0 -4
  136. package/dist/types/SubPackages/react/jsx/web.d.ts +0 -4
  137. package/dist/types/SubPackages/react-dom/component/node.d.ts +0 -11
  138. package/dist/types/SubPackages/react-dom/component/web.d.ts +0 -20
  139. package/dist/types/SubPackages/react-dom/jsx/index.d.ts +0 -6
  140. package/dist/types/SubPackages/react-dom/jsx/node.d.ts +0 -7
  141. package/dist/types/SubPackages/react-dom/jsx/web.d.ts +0 -5
  142. package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -6
  143. package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +0 -13
  144. package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +0 -9
  145. package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +0 -4
  146. package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +0 -4
  147. package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +0 -8
  148. package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +0 -9
  149. package/dist/types/SubPackages/react-test-renderer/jsx/index.d.ts +0 -16
  150. package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +0 -9
  151. package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +0 -9
  152. package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +0 -15
  153. package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -5
  154. package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -5
  155. package/dist/types/Types.d.ts +0 -61
  156. package/dist/types/Web.d.ts +0 -9
  157. package/dist/types/build.d.ts +0 -1
  158. package/dist/types/defaultConfig.d.ts +0 -3
  159. package/dist/types/esbuildConfigs/eslint-formatter-testeranto.d.ts +0 -2
  160. package/dist/types/esbuildConfigs/featuresPlugin.d.ts +0 -5
  161. package/dist/types/esbuildConfigs/index.d.ts +0 -4
  162. package/dist/types/esbuildConfigs/inputFilesPlugin.d.ts +0 -6
  163. package/dist/types/esbuildConfigs/node.d.ts +0 -4
  164. package/dist/types/esbuildConfigs/web.d.ts +0 -4
  165. package/dist/types/init-docs.d.ts +0 -1
  166. package/dist/types/lib/abstractBase.d.ts +0 -110
  167. package/dist/types/lib/basebuilder.d.ts +0 -27
  168. package/dist/types/lib/classBuilder.d.ts +0 -7
  169. package/dist/types/lib/core.d.ts +0 -7
  170. package/dist/types/lib/index.d.ts +0 -83
  171. package/dist/types/lib/types.d.ts +0 -14
  172. package/dist/types/puppeteerConfiger.d.ts +0 -4
  173. package/dist/types/run.d.ts +0 -1
  174. package/dist/types/tsconfig.types.tsbuildinfo +0 -1
  175. package/dist/types/utils.d.ts +0 -9
  176. package/dist/types/web.html.d.ts +0 -2
@@ -1,121 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { PM } from "./index.js";
4
- const fPaths = [];
5
- export class PM_Node extends PM {
6
- constructor(t) {
7
- super();
8
- this.server = {};
9
- this.testResourceConfiguration = t;
10
- }
11
- waitForSelector(p, s) {
12
- return globalThis["waitForSelector"](p, s);
13
- }
14
- closePage(p) {
15
- return globalThis["closePage"](p);
16
- }
17
- goto(cdpPage, url) {
18
- return globalThis["goto"](cdpPage.mainFrame()._id, url);
19
- }
20
- newPage() {
21
- return globalThis["newPage"]();
22
- }
23
- $(selector) {
24
- throw new Error("Method not implemented.");
25
- }
26
- isDisabled(selector) {
27
- throw new Error("Method not implemented.");
28
- }
29
- getAttribute(selector, attribute) {
30
- throw new Error("Method not implemented.");
31
- }
32
- getValue(selector) {
33
- throw new Error("Method not implemented.");
34
- }
35
- focusOn(selector) {
36
- throw new Error("Method not implemented.");
37
- }
38
- typeInto(value) {
39
- throw new Error("Method not implemented.");
40
- }
41
- page() {
42
- return globalThis["page"]();
43
- }
44
- click(selector) {
45
- return globalThis["click"](selector);
46
- }
47
- screencast(opts, page) {
48
- return globalThis["screencast"](Object.assign(Object.assign({}, opts), { path: this.testResourceConfiguration.fs + "/" + opts.path }), page.mainFrame()._id, this.testResourceConfiguration.name);
49
- }
50
- screencastStop(p) {
51
- return globalThis["screencastStop"](p);
52
- }
53
- customScreenShot(opts, cdpPage) {
54
- return globalThis["customScreenShot"](Object.assign(Object.assign({}, opts), { path: this.testResourceConfiguration.fs + "/" + opts.path }), cdpPage.mainFrame()._id, this.testResourceConfiguration.name);
55
- }
56
- existsSync(destFolder) {
57
- return globalThis["existsSync"](this.testResourceConfiguration.fs + "/" + destFolder);
58
- }
59
- mkdirSync() {
60
- return globalThis["mkdirSync"](this.testResourceConfiguration.fs + "/");
61
- }
62
- write(writeObject, contents) {
63
- return globalThis["write"](writeObject.uid, contents);
64
- }
65
- writeFileSync(filepath, contents) {
66
- return globalThis["writeFileSync"](this.testResourceConfiguration.fs + "/" + filepath, contents, this.testResourceConfiguration.name);
67
- }
68
- createWriteStream(filepath) {
69
- return globalThis["createWriteStream"](this.testResourceConfiguration.fs + "/" + filepath, this.testResourceConfiguration.name);
70
- }
71
- end(writeObject) {
72
- return globalThis["end"](writeObject.uid);
73
- }
74
- customclose() {
75
- globalThis["customclose"](this.testResourceConfiguration.fs, this.testResourceConfiguration.name);
76
- }
77
- testArtiFactoryfileWriter(tLog, callback) {
78
- return (fPath, value) => {
79
- callback(new Promise((res, rej) => {
80
- tLog("testArtiFactory =>", fPath);
81
- const cleanPath = path.resolve(fPath);
82
- fPaths.push(cleanPath.replace(process.cwd(), ``));
83
- const targetDir = cleanPath.split("/").slice(0, -1).join("/");
84
- fs.mkdir(targetDir, { recursive: true }, async (error) => {
85
- if (error) {
86
- console.error(`❗️testArtiFactory failed`, targetDir, error);
87
- }
88
- fs.writeFileSync(path.resolve(targetDir.split("/").slice(0, -1).join("/"), "manifest"), fPaths.join(`\n`), {
89
- encoding: "utf-8",
90
- });
91
- if (Buffer.isBuffer(value)) {
92
- fs.writeFileSync(fPath, value, "binary");
93
- res();
94
- }
95
- else if (`string` === typeof value) {
96
- fs.writeFileSync(fPath, value.toString(), {
97
- encoding: "utf-8",
98
- });
99
- res();
100
- }
101
- else {
102
- /* @ts-ignore:next-line */
103
- const pipeStream = value;
104
- const myFile = fs.createWriteStream(fPath);
105
- pipeStream.pipe(myFile);
106
- pipeStream.on("close", () => {
107
- myFile.close();
108
- res();
109
- });
110
- }
111
- });
112
- }));
113
- };
114
- }
115
- // launch(options?: PuppeteerLaunchOptions): Promise<Browser>;
116
- startPuppeteer(options) {
117
- // return puppeteer.connect(options).then((b) => {
118
- // this.browser = b;
119
- // });
120
- }
121
- }
@@ -1,117 +0,0 @@
1
- import { PM } from "./index.js";
2
- export class PM_Web extends PM {
3
- constructor(t) {
4
- super();
5
- this.server = {};
6
- this.testResourceConfiguration = t;
7
- }
8
- waitForSelector(p, s) {
9
- return window["waitForSelector"](p, s);
10
- }
11
- screencast(opts) {
12
- return window["screencast"](Object.assign(Object.assign({}, opts), { path: this.testResourceConfiguration.fs + "/" + opts.path }), this.testResourceConfiguration.name);
13
- }
14
- screencastStop(recorder) {
15
- return window["screencastStop"](recorder);
16
- }
17
- closePage(p) {
18
- return window["closePage"](p);
19
- }
20
- goto(p, url) {
21
- return window["goto"](p, url);
22
- }
23
- newPage() {
24
- return window["newPage"]();
25
- }
26
- $(selector) {
27
- return window["$"](selector);
28
- }
29
- isDisabled(selector) {
30
- return window["isDisabled"](selector);
31
- }
32
- getAttribute(selector, attribute) {
33
- return window["getValue"](selector, attribute);
34
- }
35
- getValue(selector) {
36
- return window["getValue"](selector);
37
- }
38
- focusOn(selector) {
39
- return window["focusOn"](selector);
40
- }
41
- typeInto(value) {
42
- return window["typeInto"](value);
43
- }
44
- page() {
45
- return window["page"]();
46
- }
47
- click(selector) {
48
- return window["click"](selector);
49
- }
50
- customScreenShot(opts) {
51
- return window["customScreenShot"](Object.assign(Object.assign({}, opts), { path: this.testResourceConfiguration.fs + "/" + opts.path }), this.testResourceConfiguration.name);
52
- }
53
- existsSync(destFolder) {
54
- return window["existsSync"](destFolder);
55
- }
56
- mkdirSync(x) {
57
- return window["mkdirSync"](this.testResourceConfiguration.fs + "/");
58
- }
59
- write(writeObject, contents) {
60
- return window["write"](writeObject.uid, contents);
61
- }
62
- writeFileSync(filepath, contents) {
63
- return window["writeFileSync"](this.testResourceConfiguration.fs + "/" + filepath, contents, this.testResourceConfiguration.name);
64
- }
65
- createWriteStream(filepath) {
66
- return window["createWriteStream"](this.testResourceConfiguration.fs + "/" + filepath, this.testResourceConfiguration.name);
67
- }
68
- end(writeObject) {
69
- return window["end"](writeObject.uid);
70
- }
71
- customclose() {
72
- window["customclose"](this.testResourceConfiguration.fs, this.testResourceConfiguration.name);
73
- }
74
- testArtiFactoryfileWriter(tLog, callback) {
75
- return (fPath, value) => {
76
- callback(new Promise((res, rej) => {
77
- tLog("testArtiFactory =>", fPath);
78
- // const cleanPath = path.resolve(fPath);
79
- // fPaths.push(cleanPath.replace(process.cwd(), ``));
80
- // const targetDir = cleanPath.split("/").slice(0, -1).join("/");
81
- // fs.mkdir(targetDir, { recursive: true }, async (error) => {
82
- // if (error) {
83
- // console.error(`❗️testArtiFactory failed`, targetDir, error);
84
- // }
85
- // fs.writeFileSync(
86
- // path.resolve(
87
- // targetDir.split("/").slice(0, -1).join("/"),
88
- // "manifest"
89
- // ),
90
- // fPaths.join(`\n`),
91
- // {
92
- // encoding: "utf-8",
93
- // }
94
- // );
95
- // if (Buffer.isBuffer(value)) {
96
- // fs.writeFileSync(fPath, value, "binary");
97
- // res();
98
- // } else if (`string` === typeof value) {
99
- // fs.writeFileSync(fPath, value.toString(), {
100
- // encoding: "utf-8",
101
- // });
102
- // res();
103
- // } else {
104
- // /* @ts-ignore:next-line */
105
- // const pipeStream: PassThrough = value;
106
- // const myFile = fs.createWriteStream(fPath);
107
- // pipeStream.pipe(myFile);
108
- // pipeStream.on("close", () => {
109
- // myFile.close();
110
- // res();
111
- // });
112
- // }
113
- // });
114
- }));
115
- };
116
- }
117
- }
@@ -1,97 +0,0 @@
1
- import ReactDom from "react-dom/client";
2
- import React, { useEffect, useState } from "react";
3
- import 'bootstrap/dist/css/bootstrap.min.css';
4
- import "./style.css";
5
- import { Footer } from "./Footer";
6
- const BigBoard = () => {
7
- const [configs, setConfigs] = useState();
8
- useEffect(() => {
9
- (async () => {
10
- fetch('/kokomoBay/docs/testeranto.json')
11
- .then(response => response.json())
12
- .then(json => {
13
- setConfigs(json);
14
- })
15
- .catch(error => console.error(error));
16
- })();
17
- }, []);
18
- const [bigBoard, setBigBoard] = useState({});
19
- useEffect(() => {
20
- (async () => {
21
- fetch('/kokomoBay/docs/bigBoard.json')
22
- .then(response => response.json())
23
- .then(json => {
24
- setBigBoard(json);
25
- })
26
- .catch(error => console.error(error));
27
- })();
28
- }, []);
29
- const [staticAnalysis, setStaticAnalysis] = useState({});
30
- useEffect(() => {
31
- (async () => {
32
- let accumulator = {};
33
- for (const t of (configs || { tests: [] }).tests) {
34
- accumulator[t[0]] = await (await fetch(`/kokomoBay/docs/${t[1]}/${t[0].split(".").slice(0, -1).join(".")}/lint_errors.txt`)).text();
35
- }
36
- setStaticAnalysis(accumulator);
37
- })();
38
- }, [configs, bigBoard]);
39
- const [typeErrors, setTypeErrors] = useState({});
40
- useEffect(() => {
41
- (async () => {
42
- let accumulator = {};
43
- for (const t of (configs || { tests: [] }).tests) {
44
- accumulator[t[0]] = await (await fetch(`/kokomoBay/docs/${t[1]}/${t[0].split(".").slice(0, -1).join(".")}/type_errors.txt`)).text();
45
- }
46
- setTypeErrors(accumulator);
47
- })();
48
- }, [configs, bigBoard]);
49
- const [bddErrors, setBddErrors] = useState({});
50
- useEffect(() => {
51
- (async () => {
52
- let accumulator = {};
53
- for (const t of (configs || { tests: [] }).tests) {
54
- accumulator[t[0]] = await (await fetch(`/kokomoBay/docs/${t[1]}/${t[0].split(".").slice(0, -1).join(".")}/bdd_errors.txt`)).text();
55
- }
56
- setBddErrors(accumulator);
57
- })();
58
- }, [configs, bigBoard]);
59
- if (!configs || !staticAnalysis || !typeErrors || !bddErrors) {
60
- return React.createElement("div", null, "loading...");
61
- }
62
- const collated = configs.tests.map((c) => {
63
- return Object.assign(Object.assign({}, bigBoard[c[0]]), { name: c[0], runTime: c[1], tr: c[2], sidecars: c[3], staticAnalysis: staticAnalysis[c[0]], typeErrors: typeErrors[c[0]], bddErrors: bddErrors[c[0]] });
64
- });
65
- return React.createElement("div", null,
66
- React.createElement("table", null,
67
- React.createElement("tr", null,
68
- React.createElement("td", null, "name"),
69
- React.createElement("td", null, "run time"),
70
- React.createElement("td", null, "BDD errors"),
71
- React.createElement("td", null, "Lint errors"),
72
- React.createElement("td", null, "Type errors"),
73
- React.createElement("td", null, "prompt")),
74
- ...collated.map((c) => {
75
- return React.createElement("tr", null,
76
- React.createElement("td", null, c.name),
77
- React.createElement("td", null, c.runTime),
78
- React.createElement("td", null,
79
- React.createElement("a", { href: `${c.runTime}/${c.name.split(".").slice(0, -1).join(".")}/littleBoard.html` }, c.bddErrors)),
80
- React.createElement("td", null,
81
- React.createElement("a", { href: `${c.runTime}/${c.name.split(".").slice(0, -1).join(".")}/lint_errors.json` }, c.staticAnalysis)),
82
- React.createElement("td", null,
83
- React.createElement("a", { href: `${c.runTime}/${c.name.split(".").slice(0, -1).join(".")}/type_errors.txt` }, c.typeErrors)),
84
- React.createElement("td", null,
85
- React.createElement("pre", null,
86
- "aider --model deepseek/deepseek-chat --load ",
87
- `docs/${c.runTime}/${c.name.split(".").slice(0, -1).join(".")}/prompt.txt`)));
88
- })),
89
- React.createElement(Footer, null));
90
- };
91
- document.addEventListener("DOMContentLoaded", function () {
92
- const elem = document.getElementById("root");
93
- if (elem) {
94
- ReactDom.createRoot(elem).render(React.createElement(BigBoard, {}, []));
95
- }
96
- });
97
- console.log("hello BigBoard!");
@@ -1,17 +0,0 @@
1
- import staticServer from "node-static";
2
- import http from "http";
3
- const main = async () => {
4
- process.chdir("../"); // Navigate one level up
5
- const fileServer = new staticServer.Server(".", {});
6
- http
7
- .createServer(function (request, response) {
8
- request
9
- .addListener("end", function () {
10
- fileServer.serve(request, response);
11
- })
12
- .resume();
13
- })
14
- .listen(8080);
15
- console.log("Server running on port 8080");
16
- };
17
- main();
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import Testeranto from "../../../Node.js";
3
- export default (testImplementations, testSpecifications, testInput) => {
4
- return Testeranto(testInput, testSpecifications, testImplementations, {
5
- beforeEach: async () => {
6
- return new Promise((resolve, rej) => {
7
- resolve(React.createElement(testInput, {}, []));
8
- });
9
- },
10
- andWhen: function (s, whenCB) {
11
- return whenCB()(s);
12
- },
13
- });
14
- };
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import Testeranto from "../../../Web.js";
3
- export default (testImplementations, testSpecifications, testInput) => {
4
- return Testeranto(testInput, testSpecifications, testImplementations, {
5
- beforeEach: async () => {
6
- return new Promise((resolve, rej) => {
7
- resolve(React.createElement(testInput, {}, []));
8
- });
9
- },
10
- andWhen: function (s, whenCB) {
11
- return whenCB()(s);
12
- },
13
- });
14
- };
@@ -1,15 +0,0 @@
1
- import React from "react";
2
- export const testInterface = {
3
- andWhen: async (s, whenCB) => {
4
- await whenCB(s());
5
- return new Promise((resolve, rej) => {
6
- resolve(React.createElement(s));
7
- });
8
- },
9
- butThen: async (subject, thenCB) => {
10
- await thenCB(subject());
11
- return new Promise((resolve, rej) => {
12
- resolve(React.createElement(subject));
13
- });
14
- },
15
- };
@@ -1,5 +0,0 @@
1
- import Testeranto from "../../../Node.js";
2
- import { testInterface as baseInterface, } from "./index.js";
3
- export default (testImplementations, testSpecifications, testInput, testInterface = baseInterface) => {
4
- return Testeranto(testInput, testSpecifications, testImplementations, testInterface);
5
- };
@@ -1,5 +0,0 @@
1
- import Testeranto from "../../../Web.js";
2
- import { testInterface as baseInterface, } from "./index.js";
3
- export default (testImplementations, testSpecifications, testInput, testInterface) => {
4
- return Testeranto(testInput, testSpecifications, testImplementations, Object.assign(Object.assign({}, baseInterface), testInterface));
5
- };
@@ -1,80 +0,0 @@
1
- import { createElement } from "react";
2
- import { renderToStaticMarkup, renderToStaticNodeStream, } from "react-dom/server";
3
- import Stream from "stream";
4
- import Testeranto from "../../../Node.js";
5
- export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
6
- export default (testImplementations, testSpecifications, testInput) => {
7
- return Testeranto(testInput, testSpecifications, testImplementations, {
8
- beforeEach: async () => {
9
- return new Promise((resolve, rej) => {
10
- resolve(createElement(testInput));
11
- });
12
- },
13
- andWhen: async function (s, whenCB) {
14
- return whenCB(s);
15
- },
16
- butThen: async function (s) {
17
- return s;
18
- },
19
- afterEach: async function () {
20
- return {};
21
- },
22
- afterAll: () => {
23
- return;
24
- },
25
- });
26
- };
27
- // type IInput = typeof React.Component;
28
- // type InitialState = unknown;
29
- // type IWhenShape = any;
30
- // type IThenShape = any;
31
- // type ISelection = string;
32
- // type IStore = string;
33
- // type ISubject = string
34
- // export default <ITestShape extends ITTestShape>(
35
- // testImplementations: ITestImplementation<
36
- // InitialState,
37
- // ISelection,
38
- // IWhenShape,
39
- // IThenShape,
40
- // ITestShape
41
- // >,
42
- // testSpecifications: ITestSpecification<
43
- // ITestShape,
44
- // ISubject,
45
- // IStore,
46
- // ISelection,
47
- // IThenShape
48
- // >,
49
- // testInput: IInput
50
- // ) => {
51
- // return Testeranto<
52
- // ITestShape,
53
- // IInput,
54
- // ISubject,
55
- // IStore,
56
- // ISelection,
57
- // IThenShape,
58
- // IWhenShape,
59
- // InitialState
60
- // >(
61
- // testInput,
62
- // testSpecifications,
63
- // testImplementations,
64
- // {
65
- // beforeEach: async (
66
- // element,
67
- // ndx,
68
- // testResource,
69
- // artificer
70
- // ): Promise<IStore> => {
71
- // return new Promise((resolve, rej) => {
72
- // resolve(ReactDOMServer.renderToStaticMarkup(element));
73
- // });
74
- // },
75
- // andWhen: function (s: IStore, whenCB): Promise<ISelection> {
76
- // throw new Error(`"andWhens" are not permitted`);
77
- // }
78
- // },
79
- // )
80
- // };
@@ -1,62 +0,0 @@
1
- import { createElement } from "react";
2
- import ReactDom from "react-dom/client";
3
- import Testeranto from "../../../Web.js";
4
- export default (testInput, testSpecifications, testImplementations, testInterface) => {
5
- class TesterantoComponent extends testInput {
6
- constructor(props) {
7
- super(props);
8
- this.done = props.done;
9
- }
10
- componentDidMount() {
11
- super.componentDidMount && super.componentDidMount();
12
- return this.done(this);
13
- }
14
- }
15
- const t = Testeranto(testInput, testSpecifications, testImplementations, {
16
- beforeAll: async (subject, artificer) => {
17
- return await new Promise((resolve, rej) => {
18
- const htmlElement = document.getElementById("root");
19
- if (htmlElement) {
20
- const domRoot = ReactDom.createRoot(htmlElement);
21
- resolve({ domRoot, htmlElement });
22
- }
23
- });
24
- },
25
- beforeEach: async ({ domRoot, htmlElement }, initialValues, testResource, artificer) => {
26
- return new Promise(async (resolve, rej) => {
27
- domRoot.render(createElement(TesterantoComponent, Object.assign(Object.assign({}, initialValues), { done: (reactElement) => {
28
- resolve({
29
- htmlElement,
30
- reactElement,
31
- domRoot,
32
- });
33
- } }), []));
34
- });
35
- },
36
- andWhen: async function (s, whenCB) {
37
- return whenCB(s);
38
- },
39
- butThen: async function (s, thenCB) {
40
- return thenCB(s);
41
- },
42
- afterEach: (testInterface === null || testInterface === void 0 ? void 0 : testInterface.afterEach) ||
43
- async function (store, ndx, utils) {
44
- return store;
45
- },
46
- afterAll: async (store, utils) => {
47
- // setTimeout(() => {
48
- // console.log("This will run after 1 second");
49
- // }, 1000); // 1000 milliseconds = 1 second
50
- // store.htmlElement.remove();
51
- // store.htmlElement = document.createElement("root");
52
- return store;
53
- },
54
- });
55
- document.addEventListener("DOMContentLoaded", function () {
56
- const elem = document.getElementById("root");
57
- if (elem) {
58
- return t;
59
- }
60
- });
61
- return t;
62
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,31 +0,0 @@
1
- import { createElement } from "react";
2
- import { renderToStaticMarkup, renderToStaticNodeStream, } from "react-dom/server";
3
- import Stream from "stream";
4
- import Testeranto from "../../../Node.js";
5
- export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
6
- export default (testImplementations, testSpecifications, testInput) => {
7
- return Testeranto(testInput, testSpecifications, testImplementations, {
8
- beforeAll: async (prototype, artificer) => {
9
- return await new Promise((resolve, rej) => {
10
- resolve(null);
11
- });
12
- },
13
- beforeEach: async () => {
14
- return new Promise((resolve, rej) => {
15
- resolve(createElement(testInput));
16
- });
17
- },
18
- andWhen: async function (s, whenCB) {
19
- return s;
20
- },
21
- butThen: async function (s) {
22
- return s;
23
- },
24
- afterEach: async function (store, ndx, artificer) {
25
- return {};
26
- },
27
- afterAll: (store, artificer) => {
28
- return;
29
- },
30
- });
31
- };