testeranto 0.75.0 → 0.79.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.
- package/.eslintrc.js +5 -2
- package/Bundle.Dockerfile +52 -0
- package/README.md +25 -24
- package/build-tests.ts +16 -0
- package/dist/common/build-tests.js +38 -0
- package/dist/common/init-docs.js +8 -0
- package/dist/common/run-tests.js +34 -0
- package/dist/common/src/Aider.js +96 -0
- package/dist/common/src/Init.js +10 -0
- package/dist/common/{Node.js → src/Node.js} +1 -0
- package/dist/common/src/PM/index.js +7 -0
- package/dist/common/{PM → src/PM}/main.js +287 -10
- package/dist/common/{PM → src/PM}/node.js +4 -0
- package/dist/common/{PM → src/PM}/web.js +3 -0
- package/dist/common/{Project.js → src/Project.js} +15 -57
- package/dist/common/{Puppeteer.js → src/Puppeteer.js} +65 -26
- package/dist/common/{SubPackages → src/SubPackages}/react-dom/component/web.js +5 -25
- package/dist/common/src/SubPackages/react-dom/jsx/web.js +117 -0
- package/dist/common/{SubPackages/react-test-renderer/component/index.js → src/SubPackages/react-test-renderer/component/interface.js} +0 -20
- package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +2 -2
- package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +2 -2
- package/dist/common/{Types.js → src/Types.js} +0 -2
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/index.js +1 -0
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +52 -0
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -1
- package/dist/common/src/esbuildConfigs/report.js +14 -0
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/web.js +3 -1
- package/dist/common/src/lib/abstractBase.js +581 -0
- package/dist/common/{lib → src/lib}/basebuilder.js +12 -38
- package/dist/common/{lib → src/lib}/classBuilder.js +1 -3
- package/dist/common/{lib → src/lib}/core.js +3 -5
- package/dist/common/src/lib/types.js +2 -0
- package/dist/common/src/utils.js +16 -0
- package/dist/common/testeranto.js +15 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/build-tests.js +10 -0
- package/dist/module/init-docs.js +3 -0
- package/dist/module/run-tests.js +6 -0
- package/dist/module/src/Aider.js +89 -0
- package/dist/module/src/Init.js +5 -0
- package/dist/module/{Node.js → src/Node.js} +1 -0
- package/dist/module/src/PM/index.js +3 -0
- package/dist/module/src/PM/main.js +617 -0
- package/dist/module/{PM → src/PM}/node.js +4 -0
- package/dist/module/{PM → src/PM}/web.js +3 -0
- package/dist/module/{Project.js → src/Project.js} +15 -57
- package/dist/module/{Puppeteer.js → src/Puppeteer.js} +65 -26
- package/dist/module/{SubPackages → src/SubPackages}/react-dom/component/web.js +5 -25
- package/dist/module/src/SubPackages/react-dom/jsx/web.js +89 -0
- package/dist/module/{SubPackages/react-test-renderer/component/index.js → src/SubPackages/react-test-renderer/component/interface.js} +0 -20
- package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +1 -1
- package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +1 -1
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/index.js +1 -0
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +47 -0
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -1
- package/dist/module/src/esbuildConfigs/report.js +14 -0
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/web.js +3 -1
- package/dist/module/src/lib/abstractBase.js +573 -0
- package/dist/module/{lib → src/lib}/basebuilder.js +12 -38
- package/dist/module/{lib → src/lib}/classBuilder.js +1 -3
- package/dist/module/{lib → src/lib}/core.js +3 -5
- package/dist/module/src/utils.js +9 -0
- package/dist/module/testeranto.js +13 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/build-tests.d.ts +3 -0
- package/dist/types/init-docs.d.ts +2 -0
- package/dist/types/run-tests.d.ts +2 -0
- package/dist/types/src/Aider.d.ts +1 -0
- package/dist/types/src/Init.d.ts +2 -0
- package/dist/types/src/Node.d.ts +6 -0
- package/dist/types/{PM → src/PM}/index.d.ts +3 -2
- package/dist/types/{PM → src/PM}/main.d.ts +6 -3
- package/dist/types/{PM → src/PM}/node.d.ts +2 -0
- package/dist/types/{PM → src/PM}/web.d.ts +1 -0
- package/dist/types/{Project.d.ts → src/Project.d.ts} +1 -1
- package/dist/types/src/Puppeteer.d.ts +2 -0
- package/dist/types/src/SubPackages/puppeteer.d.ts +6 -0
- package/dist/types/{SubPackages → src/SubPackages}/react/component/node.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react/component/web.d.ts +1 -1
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +4 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-dom/component/node.d.ts +2 -2
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +11 -0
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +6 -0
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +5 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/index.d.ts +0 -7
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +9 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/node.d.ts +1 -2
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +3 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.d.ts +1 -2
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.d.ts +1 -2
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +4 -0
- package/dist/types/src/Types.d.ts +51 -0
- package/dist/types/src/Web.d.ts +6 -0
- package/dist/types/src/esbuildConfigs/inputFilesPlugin.d.ts +5 -0
- package/dist/types/{lib → src/lib}/abstractBase.d.ts +8 -8
- package/dist/types/{lib → src/lib}/basebuilder.d.ts +1 -1
- package/dist/types/{lib → src/lib}/classBuilder.d.ts +1 -1
- package/dist/types/{lib → src/lib}/core.d.ts +1 -1
- package/dist/types/{lib → src/lib}/index.d.ts +5 -5
- package/dist/types/{lib → src/lib}/types.d.ts +15 -15
- package/dist/types/src/utils.d.ts +2 -0
- package/dist/types/testeranto.d.ts +16 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docker-compose.yml +37 -0
- package/init-docs.ts +5 -0
- package/package.json +72 -25
- package/run-tests.ts +9 -0
- package/src/Aider.ts +125 -0
- package/src/Init.ts +20 -0
- package/src/Node.ts +31 -2
- package/src/PM/index.ts +7 -84
- package/src/PM/main.ts +400 -16
- package/src/PM/node.ts +6 -0
- package/src/PM/web.ts +4 -0
- package/src/Project.ts +33 -84
- package/src/Puppeteer.ts +115 -62
- package/src/SubPackages/react-dom/component/web.ts +10 -30
- package/src/SubPackages/react-dom/jsx/web.ts +110 -76
- package/src/SubPackages/react-test-renderer/component/index.ts +0 -66
- package/src/SubPackages/react-test-renderer/component/interface.ts +48 -0
- package/src/SubPackages/react-test-renderer/component/node.ts +2 -1
- package/src/SubPackages/react-test-renderer/component/web.ts +2 -1
- package/src/Types.ts +138 -29
- package/src/Web.ts +32 -2
- package/src/esbuildConfigs/index.ts +1 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +67 -0
- package/src/esbuildConfigs/node.ts +4 -2
- package/src/esbuildConfigs/report.ts +13 -13
- package/src/esbuildConfigs/web.ts +4 -0
- package/src/lib/abstractBase.ts +366 -36
- package/src/lib/basebuilder.ts +26 -52
- package/src/lib/classBuilder.ts +14 -2
- package/src/lib/core.ts +18 -7
- package/src/lib/index.ts +115 -7
- package/src/lib/types.ts +143 -37
- package/src/utils.ts +15 -0
- package/testeranto.ts +13 -0
- package/tsconfig.common.json +12 -4
- package/tsconfig.json +9 -3
- package/tsconfig.module.json +2 -3
- package/tsconfig.types.json +1 -2
- package/dist/common/Features.js +0 -84
- package/dist/common/PM/index.js +0 -71
- package/dist/common/Reporter.js +0 -119
- package/dist/common/Scheduler.js +0 -1
- package/dist/common/SubPackages/react-dom/jsx/web.js +0 -93
- package/dist/common/esbuildConfigs/report.js +0 -13
- package/dist/common/lib/abstractBase.js +0 -348
- package/dist/common/preload.js +0 -15
- package/dist/common/report.html.js +0 -31
- package/dist/module/Features.js +0 -73
- package/dist/module/PM/index.js +0 -67
- package/dist/module/PM/main.js +0 -340
- package/dist/module/Reporter.js +0 -114
- package/dist/module/Scheduler.js +0 -1
- package/dist/module/SubPackages/react-dom/jsx/web.js +0 -65
- package/dist/module/Types.js +0 -3
- package/dist/module/esbuildConfigs/report.js +0 -11
- package/dist/module/lib/abstractBase.js +0 -340
- package/dist/module/preload.js +0 -15
- package/dist/module/report.html.js +0 -29
- package/dist/prebuild/Report.css +0 -11358
- package/dist/prebuild/Report.js +0 -37585
- package/dist/types/Features.d.ts +0 -68
- package/dist/types/Node.d.ts +0 -6
- package/dist/types/SubPackages/puppeteer.d.ts +0 -6
- package/dist/types/SubPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/SubPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/SubPackages/react-dom/component/web.d.ts +0 -5
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +0 -6
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +0 -4
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -5
- package/dist/types/Types.d.ts +0 -50
- package/dist/types/Web.d.ts +0 -6
- package/dist/types/esbuildConfigs/report.d.ts +0 -4
- package/dist/types/preload.d.ts +0 -0
- package/dist/types/report.html.d.ts +0 -2
- package/electronBuild.ts +0 -32
- package/src/Features.ts +0 -118
- package/src/Report.tsx +0 -521
- package/src/Reporter.ts +0 -134
- package/src/Scheduler.ts +0 -0
- package/src/preload.ts +0 -17
- package/src/report.html.ts +0 -29
- package/tests/Rectangle.test.ts +0 -189
- /package/dist/common/{SubPackages → src/SubPackages}/puppeteer.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/component/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/common/{lib/types.js → src/SubPackages/react-test-renderer/component/index.js} +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/common/{Web.js → src/Web.js} +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/features.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/tests.js +0 -0
- /package/dist/common/{lib → src/lib}/index.js +0 -0
- /package/dist/common/{puppeteerConfiger.js → src/puppeteerConfiger.js} +0 -0
- /package/dist/common/{web.html.js → src/web.html.js} +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/puppeteer.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/component/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/module/{lib/types.js → src/SubPackages/react-test-renderer/component/index.js} +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/{types/Puppeteer.d.ts → module/src/Types.js} +0 -0
- /package/dist/module/{Web.js → src/Web.js} +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/features.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/tests.js +0 -0
- /package/dist/module/{lib → src/lib}/index.js +0 -0
- /package/dist/{types/Reporter.d.ts → module/src/lib/types.js} +0 -0
- /package/dist/module/{puppeteerConfiger.js → src/puppeteerConfiger.js} +0 -0
- /package/dist/module/{web.html.js → src/web.html.js} +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/features.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/index.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/node.d.ts +0 -0
- /package/dist/types/{Scheduler.d.ts → src/esbuildConfigs/report.d.ts} +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/tests.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/web.d.ts +0 -0
- /package/dist/types/{puppeteerConfiger.d.ts → src/puppeteerConfiger.d.ts} +0 -0
- /package/dist/types/{web.html.d.ts → src/web.html.d.ts} +0 -0
package/src/Report.tsx
DELETED
|
@@ -1,521 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from "react";
|
|
2
|
-
import ReactDom from "react-dom/client";
|
|
3
|
-
import Col from 'react-bootstrap/Col';
|
|
4
|
-
import Nav from 'react-bootstrap/Nav';
|
|
5
|
-
import Row from 'react-bootstrap/Row';
|
|
6
|
-
import Tab from 'react-bootstrap/Tab';
|
|
7
|
-
import Tabs from 'react-bootstrap/Tabs';
|
|
8
|
-
import Graph from "graphology";
|
|
9
|
-
import { Sigma, RandomizeNodePositions, RelativeSize } from 'react-sigma';
|
|
10
|
-
|
|
11
|
-
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
12
|
-
|
|
13
|
-
import { TesterantoFeatures } from "./Features.js";
|
|
14
|
-
import { IRunTime, ITestTypes } from "./lib/types.js";
|
|
15
|
-
|
|
16
|
-
type IGraphData = {
|
|
17
|
-
nodes: { id: string, label: string }[],
|
|
18
|
-
edges: { id: string, source: string, target: string, label: string }[]
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const graphToIGraphData: (g: Graph) => IGraphData = (g) => {
|
|
22
|
-
return {
|
|
23
|
-
nodes: g.nodes().map((n) => {
|
|
24
|
-
return {
|
|
25
|
-
id: n,
|
|
26
|
-
label: n
|
|
27
|
-
}
|
|
28
|
-
}),
|
|
29
|
-
edges: g.mapEdges((id, attributes, source, target) => {
|
|
30
|
-
return {
|
|
31
|
-
id,
|
|
32
|
-
label: id,
|
|
33
|
-
source,
|
|
34
|
-
target,
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
document.addEventListener("DOMContentLoaded", function () {
|
|
41
|
-
const elem = document.getElementById("root");
|
|
42
|
-
if (elem) {
|
|
43
|
-
ReactDom.createRoot(elem).render(React.createElement(Report, {}));
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
const Report = () => {
|
|
48
|
-
|
|
49
|
-
const [state, setState] = useState<{
|
|
50
|
-
tests: ITestTypes[],
|
|
51
|
-
buildDir: string,
|
|
52
|
-
features: TesterantoFeatures
|
|
53
|
-
results: any
|
|
54
|
-
}>({
|
|
55
|
-
tests: [],
|
|
56
|
-
buildDir: "",
|
|
57
|
-
features: new TesterantoFeatures({}, {
|
|
58
|
-
undirected: [],
|
|
59
|
-
directed: [],
|
|
60
|
-
dags: []
|
|
61
|
-
}),
|
|
62
|
-
results: {}
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
const [tests, setTests] = useState<
|
|
66
|
-
{
|
|
67
|
-
tests: ITestTypes[],
|
|
68
|
-
buildDir: string,
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
>({
|
|
72
|
-
tests: [],
|
|
73
|
-
buildDir: ""
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
const [features, setFeatures] = useState<TesterantoFeatures>(
|
|
77
|
-
new TesterantoFeatures({}, {
|
|
78
|
-
undirected: [],
|
|
79
|
-
directed: [],
|
|
80
|
-
dags: []
|
|
81
|
-
})
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
const [results, setResults] = useState<Record<string, { exitcode, log, testresults, manifest }>>(
|
|
85
|
-
{}
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
const importState = async () => {
|
|
89
|
-
const features = await import('features.test.js');
|
|
90
|
-
const config = await (await fetch("./testeranto.json")).json();
|
|
91
|
-
const results = await Promise.all(config.tests.map((test) => {
|
|
92
|
-
return new Promise(async (res, rej) => {
|
|
93
|
-
const src: string = test[0];
|
|
94
|
-
const runtime: IRunTime = test[1];
|
|
95
|
-
const s: string = [tests.buildDir, runtime as string].concat(src.split(".").slice(0, - 1).join(".")).join("/");
|
|
96
|
-
const exitcode = await (await fetch(config.buildDir + "/" + s + "/exitcode")).text()
|
|
97
|
-
const log = await (await fetch(config.buildDir + "/" + s + "/log.txt")).text()
|
|
98
|
-
const testresults = await (await fetch(config.buildDir + "/" + s + "/tests.json")).json()
|
|
99
|
-
const manifest = await (await fetch(config.buildDir + "/" + s + "/manifest.json")).json()
|
|
100
|
-
|
|
101
|
-
res({ src, exitcode, log, testresults, manifest })
|
|
102
|
-
})
|
|
103
|
-
}))
|
|
104
|
-
// const results = await config.tests.reduce(async (p, test) => {
|
|
105
|
-
// const src: string = test[0];
|
|
106
|
-
// const runtime: IRunTime = test[1];
|
|
107
|
-
// console.log(runtime)
|
|
108
|
-
// const s: string = [tests.buildDir, runtime as string].concat(src.split(".").slice(0, - 1).join(".")).join("/");
|
|
109
|
-
// // const srr
|
|
110
|
-
// console.log("s", s)
|
|
111
|
-
|
|
112
|
-
// const exitcode = await (await fetch(config.buildDir + "/" + s + "/exitcode")).text()
|
|
113
|
-
// const log = await (await fetch(config.buildDir + "/" + s + "/log.txt")).text()
|
|
114
|
-
// const testresults = await (await fetch(config.buildDir + "/" + s + "/tests.json")).text()
|
|
115
|
-
|
|
116
|
-
// // setResults({ src, exitcode, log, testresults })
|
|
117
|
-
// // console.log("a", await a.text())
|
|
118
|
-
// p[src] = { exitcode, log, testresults }
|
|
119
|
-
// return p
|
|
120
|
-
// }, {});
|
|
121
|
-
|
|
122
|
-
console.log("results", results)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
setState({ tests: config.tests as any, results, features: features as any, buildDir: config.buildDir })
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
const importFeatures = async () => {
|
|
129
|
-
const module = await import('features.test.js');
|
|
130
|
-
setFeatures(module.default);
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
const importTests = async () => {
|
|
134
|
-
const x = await fetch("./testeranto.json")
|
|
135
|
-
const y = await x.json();
|
|
136
|
-
setTests(y as any);
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
useEffect(() => { importState(); }, []);
|
|
140
|
-
|
|
141
|
-
useEffect(() => { importFeatures(); }, []);
|
|
142
|
-
useEffect(() => { importTests(); }, []);
|
|
143
|
-
|
|
144
|
-
useEffect(() => {
|
|
145
|
-
const collateResults = async () => {
|
|
146
|
-
console.log("collating", tests, features);
|
|
147
|
-
const r = tests.tests.reduce(async (p, test) => {
|
|
148
|
-
const src: string = test[0];
|
|
149
|
-
const runtime: IRunTime = test[1];
|
|
150
|
-
console.log(runtime)
|
|
151
|
-
const s: string = [tests.buildDir, runtime as string].concat(src.split(".").slice(0, - 1).join(".")).join("/");
|
|
152
|
-
// const srr
|
|
153
|
-
// console.log(s)
|
|
154
|
-
|
|
155
|
-
const exitcode = await (await fetch(s + "/exitcode")).text()
|
|
156
|
-
const log = await (await fetch(s + "/log.txt")).text()
|
|
157
|
-
const testresults = await (await fetch(s + "/tests.json")).text()
|
|
158
|
-
|
|
159
|
-
// setResults({ src, exitcode, log, testresults })
|
|
160
|
-
// console.log("a", await a.text())
|
|
161
|
-
p[src] = { exitcode, log, testresults }
|
|
162
|
-
}, {});
|
|
163
|
-
|
|
164
|
-
setResults(r);
|
|
165
|
-
// const x = await fetch("./testeranto.json")
|
|
166
|
-
// const y = await x.json();
|
|
167
|
-
// setTests(y as any);
|
|
168
|
-
// const module = await import('tests.json', {
|
|
169
|
-
// with: {
|
|
170
|
-
// type: 'json'
|
|
171
|
-
// }
|
|
172
|
-
// });
|
|
173
|
-
// console.log("imported tests", module.default);
|
|
174
|
-
// setResults("foo");
|
|
175
|
-
};
|
|
176
|
-
collateResults();
|
|
177
|
-
}, []);
|
|
178
|
-
|
|
179
|
-
console.log("state.results", state.results);
|
|
180
|
-
|
|
181
|
-
return (
|
|
182
|
-
<div>
|
|
183
|
-
<style>
|
|
184
|
-
{`
|
|
185
|
-
pre, code, p {
|
|
186
|
-
max-width: 30rem;
|
|
187
|
-
text-wrap: auto;
|
|
188
|
-
}
|
|
189
|
-
footer {
|
|
190
|
-
background-color: lightgray;
|
|
191
|
-
margin: 0.5rem;
|
|
192
|
-
padding: 0.5rem;
|
|
193
|
-
position: fixed;
|
|
194
|
-
bottom: 0;
|
|
195
|
-
right: 0;
|
|
196
|
-
}
|
|
197
|
-
`}
|
|
198
|
-
</style>
|
|
199
|
-
|
|
200
|
-
{features && tests && < Tabs defaultActiveKey="config" >
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
<Tab eventKey="config" title="config">
|
|
205
|
-
<pre>{JSON.stringify(state, null, 2)}</pre>
|
|
206
|
-
</Tab>
|
|
207
|
-
|
|
208
|
-
<Tab eventKey="results" title="results">
|
|
209
|
-
<pre>{JSON.stringify(state.results, null, 2)}</pre>
|
|
210
|
-
</Tab>
|
|
211
|
-
|
|
212
|
-
<Tab eventKey="features" title="features">
|
|
213
|
-
<Tab.Container id="left-tabs-example5" defaultActiveKey="feature-0">
|
|
214
|
-
<Row>
|
|
215
|
-
<Col sm={2}>
|
|
216
|
-
<Nav variant="pills" className="flex-column">
|
|
217
|
-
{Object.keys(features.features).map((featureKey, ndx) => <Nav.Item key={ndx}>
|
|
218
|
-
<Nav.Link eventKey={`feature-${ndx}`}>
|
|
219
|
-
{featureKey}
|
|
220
|
-
</Nav.Link>
|
|
221
|
-
</Nav.Item>)}
|
|
222
|
-
</Nav>
|
|
223
|
-
</Col>
|
|
224
|
-
<Col sm={6}>
|
|
225
|
-
<Tab.Content>
|
|
226
|
-
{Object.keys(features.features).map((featureKey, ndx) => {
|
|
227
|
-
const feature = features[featureKey];
|
|
228
|
-
return (
|
|
229
|
-
<Tab.Pane eventKey={`feature-${ndx}`} key={ndx}>
|
|
230
|
-
<pre>{JSON.stringify(feature, null, 2)}</pre>
|
|
231
|
-
</Tab.Pane>
|
|
232
|
-
)
|
|
233
|
-
}
|
|
234
|
-
)}
|
|
235
|
-
</Tab.Content>
|
|
236
|
-
</Col>
|
|
237
|
-
|
|
238
|
-
<Col sm={4}>
|
|
239
|
-
< Tabs defaultActiveKey="feature.networks" >
|
|
240
|
-
<Tab eventKey="feature.networks" title="networks">
|
|
241
|
-
< Tabs defaultActiveKey="dag" >
|
|
242
|
-
|
|
243
|
-
<Tab eventKey="dag" title="DAG">
|
|
244
|
-
<Tab.Content>
|
|
245
|
-
<pre>{JSON.stringify(features.graphs.dags, null, 2)}</pre>
|
|
246
|
-
</Tab.Content>
|
|
247
|
-
</Tab>
|
|
248
|
-
|
|
249
|
-
<Tab eventKey="directed" title="Directed">
|
|
250
|
-
<Tab.Content>
|
|
251
|
-
<pre>{JSON.stringify(features.graphs.directed, null, 2)}</pre>
|
|
252
|
-
</Tab.Content>
|
|
253
|
-
</Tab>
|
|
254
|
-
|
|
255
|
-
<Tab eventKey="undirected" title="Undirected">
|
|
256
|
-
<Tab.Content>
|
|
257
|
-
<pre>{JSON.stringify(features.graphs.undirected, null, 2)}</pre>
|
|
258
|
-
</Tab.Content>
|
|
259
|
-
</Tab>
|
|
260
|
-
|
|
261
|
-
</Tabs>
|
|
262
|
-
</Tab>
|
|
263
|
-
|
|
264
|
-
<Tab eventKey="feature.tests" title="tests">
|
|
265
|
-
<pre id="theProps">{JSON.stringify(tests.tests, null, 2)}</pre>
|
|
266
|
-
</Tab>
|
|
267
|
-
</Tabs>
|
|
268
|
-
</Col>
|
|
269
|
-
|
|
270
|
-
</Row>
|
|
271
|
-
</Tab.Container>
|
|
272
|
-
</Tab>
|
|
273
|
-
|
|
274
|
-
<Tab eventKey="networks" title="networks">
|
|
275
|
-
<Tab.Container id="left-tabs-example88" defaultActiveKey={`dag`}>
|
|
276
|
-
<Row>
|
|
277
|
-
< Tabs defaultActiveKey="dag" >
|
|
278
|
-
|
|
279
|
-
<Tab eventKey="dag" title="DAG">
|
|
280
|
-
<Tab.Content>
|
|
281
|
-
|
|
282
|
-
<Row>
|
|
283
|
-
<Col sm={2}>
|
|
284
|
-
<Nav variant="pills" className="flex-column">
|
|
285
|
-
{features.graphs.dags.map((g, ndx2) => <Nav.Item key={ndx2}>
|
|
286
|
-
<Nav.Link eventKey={`networks-dags-${ndx2}`}>
|
|
287
|
-
{g.name}
|
|
288
|
-
</Nav.Link>
|
|
289
|
-
</Nav.Item>
|
|
290
|
-
)}
|
|
291
|
-
</Nav>
|
|
292
|
-
</Col>
|
|
293
|
-
<Col sm={6}>
|
|
294
|
-
<Tab.Content>
|
|
295
|
-
|
|
296
|
-
{
|
|
297
|
-
features.graphs.dags[0] && <>
|
|
298
|
-
<Sigma graph={graphToIGraphData(features.graphs.dags[0].graph)} settings={{ drawEdges: true, clone: false }}>
|
|
299
|
-
<RelativeSize initialSize={25} />
|
|
300
|
-
<RandomizeNodePositions />
|
|
301
|
-
</Sigma>
|
|
302
|
-
<pre>{JSON.stringify(features.graphs.dags[0].graph, null, 2)}</pre>
|
|
303
|
-
</>
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
</Tab.Content>
|
|
309
|
-
</Col>
|
|
310
|
-
|
|
311
|
-
<Col sm={4}>
|
|
312
|
-
< Tabs defaultActiveKey="networks.features" >
|
|
313
|
-
<Tab eventKey="networks.features" title="features">
|
|
314
|
-
<pre id="theProps">{JSON.stringify(features, null, 2)}</pre>
|
|
315
|
-
</Tab>
|
|
316
|
-
|
|
317
|
-
<Tab eventKey="feature.tests" title="tests">
|
|
318
|
-
<pre id="theProps">{JSON.stringify(tests.tests, null, 2)}</pre>
|
|
319
|
-
</Tab>
|
|
320
|
-
</Tabs>
|
|
321
|
-
</Col>
|
|
322
|
-
|
|
323
|
-
</Row>
|
|
324
|
-
|
|
325
|
-
</Tab.Content>
|
|
326
|
-
</Tab>
|
|
327
|
-
|
|
328
|
-
<Tab eventKey="directed" title="Directed">
|
|
329
|
-
<Tab.Content>
|
|
330
|
-
|
|
331
|
-
<Row>
|
|
332
|
-
<Col sm={2}>
|
|
333
|
-
<Nav variant="pills" className="flex-column">
|
|
334
|
-
{features.graphs.directed.map((g, ndx2) => <Nav.Item key={ndx2}>
|
|
335
|
-
<Nav.Link eventKey={`networks-directed-${ndx2}`}>
|
|
336
|
-
{g.name}
|
|
337
|
-
</Nav.Link>
|
|
338
|
-
</Nav.Item>
|
|
339
|
-
)}
|
|
340
|
-
</Nav>
|
|
341
|
-
</Col>
|
|
342
|
-
<Col sm={6}>
|
|
343
|
-
<Tab.Content>
|
|
344
|
-
|
|
345
|
-
{
|
|
346
|
-
features.graphs.directed[0] && <>
|
|
347
|
-
<Sigma graph={graphToIGraphData(features.graphs.directed[0].graph)} settings={{ drawEdges: true, clone: false }}>
|
|
348
|
-
<RelativeSize initialSize={25} />
|
|
349
|
-
<RandomizeNodePositions />
|
|
350
|
-
</Sigma>
|
|
351
|
-
<pre>{JSON.stringify(features.graphs.directed[0].graph, null, 2)}</pre>
|
|
352
|
-
</>
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
</Tab.Content>
|
|
359
|
-
</Col>
|
|
360
|
-
<Col sm={4}>
|
|
361
|
-
< Tabs defaultActiveKey="networks.features" >
|
|
362
|
-
<Tab eventKey="networks.features" title="features">
|
|
363
|
-
<pre id="theProps">{JSON.stringify(features, null, 2)}</pre>
|
|
364
|
-
</Tab>
|
|
365
|
-
|
|
366
|
-
<Tab eventKey="feature.tests" title="tests">
|
|
367
|
-
<pre id="theProps">{JSON.stringify(tests.tests, null, 2)}</pre>
|
|
368
|
-
</Tab>
|
|
369
|
-
</Tabs>
|
|
370
|
-
</Col>
|
|
371
|
-
</Row>
|
|
372
|
-
|
|
373
|
-
</Tab.Content>
|
|
374
|
-
</Tab>
|
|
375
|
-
|
|
376
|
-
<Tab eventKey="undirected" title="Undirected">
|
|
377
|
-
<Tab.Content>
|
|
378
|
-
<Row>
|
|
379
|
-
<Col sm={2}>
|
|
380
|
-
<Nav variant="pills" className="flex-column">
|
|
381
|
-
{features.graphs.undirected.map((g, ndx2) => <Nav.Item key={ndx2}>
|
|
382
|
-
<Nav.Link eventKey={`networks-undirected-${ndx2}`}>
|
|
383
|
-
{g.name}
|
|
384
|
-
</Nav.Link>
|
|
385
|
-
</Nav.Item>
|
|
386
|
-
)}
|
|
387
|
-
</Nav>
|
|
388
|
-
</Col>
|
|
389
|
-
<Col sm={6}>
|
|
390
|
-
<Tab.Content>
|
|
391
|
-
|
|
392
|
-
{
|
|
393
|
-
features.graphs.undirected[0] && <>
|
|
394
|
-
<Sigma graph={graphToIGraphData(features.graphs.undirected[0].graph)} settings={{ drawEdges: true, clone: false }}>
|
|
395
|
-
<RelativeSize initialSize={25} />
|
|
396
|
-
<RandomizeNodePositions />
|
|
397
|
-
</Sigma>
|
|
398
|
-
<pre>{JSON.stringify(features.graphs.undirected[0].graph, null, 2)}</pre>
|
|
399
|
-
</>
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
</Tab.Content>
|
|
406
|
-
</Col>
|
|
407
|
-
<Col sm={4}>
|
|
408
|
-
< Tabs defaultActiveKey="networks.features" >
|
|
409
|
-
<Tab eventKey="networks.features" title="features">
|
|
410
|
-
<pre id="theProps">{JSON.stringify(features, null, 2)}</pre>
|
|
411
|
-
</Tab>
|
|
412
|
-
|
|
413
|
-
<Tab eventKey="feature.tests" title="tests">
|
|
414
|
-
<pre id="theProps">{JSON.stringify(tests.tests, null, 2)}</pre>
|
|
415
|
-
</Tab>
|
|
416
|
-
</Tabs>
|
|
417
|
-
</Col>
|
|
418
|
-
</Row>
|
|
419
|
-
</Tab.Content>
|
|
420
|
-
</Tab>
|
|
421
|
-
|
|
422
|
-
</Tabs>
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
</Row>
|
|
426
|
-
</Tab.Container>
|
|
427
|
-
</Tab>
|
|
428
|
-
|
|
429
|
-
<Tab eventKey="tests" title="tests">
|
|
430
|
-
<Tab.Container id="left-tabs-example5" defaultActiveKey="feature-0">
|
|
431
|
-
<Row>
|
|
432
|
-
<Col sm={4}>
|
|
433
|
-
{/* <Tree tests={features.tests} /> */}
|
|
434
|
-
<Nav variant="pills" className="flex-column">
|
|
435
|
-
{
|
|
436
|
-
tests.tests.map((t, ndx) =>
|
|
437
|
-
<Nav.Item key={ndx}>
|
|
438
|
-
<Nav.Link eventKey={`test-${ndx}`}>
|
|
439
|
-
{t[0]} - {t[1]}
|
|
440
|
-
</Nav.Link>
|
|
441
|
-
</Nav.Item>
|
|
442
|
-
)
|
|
443
|
-
}
|
|
444
|
-
</Nav>
|
|
445
|
-
</Col>
|
|
446
|
-
<Col sm={4}>
|
|
447
|
-
<Tab.Content>
|
|
448
|
-
|
|
449
|
-
{
|
|
450
|
-
tests.tests.map((t, ndx) =>
|
|
451
|
-
<Tab.Pane eventKey={`test-${ndx}`}>
|
|
452
|
-
{/* <pre>{JSON.stringify(t, null, 2)}</pre> */}
|
|
453
|
-
{/* <pre>{JSON.stringify(state.results, null, 2)}</pre> */}
|
|
454
|
-
<pre>{JSON.stringify(Object.entries(state.results).filter(([k, v]: [string, { src: string }]) => {
|
|
455
|
-
console.log(v.src, tests.tests[ndx][0])
|
|
456
|
-
return v.src === tests.tests[ndx][0]
|
|
457
|
-
}), null, 2)}</pre>
|
|
458
|
-
|
|
459
|
-
{/* {tests.tests.map((t, ndx) => {
|
|
460
|
-
return (
|
|
461
|
-
<Tab.Pane eventKey={`feature-${ndx}`} key={ndx}>
|
|
462
|
-
<pre>{JSON.stringify(t, null, 2)}</pre>
|
|
463
|
-
</Tab.Pane>
|
|
464
|
-
)
|
|
465
|
-
}
|
|
466
|
-
)} */}
|
|
467
|
-
|
|
468
|
-
</Tab.Pane>
|
|
469
|
-
|
|
470
|
-
)
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
</Tab.Content>
|
|
477
|
-
</Col>
|
|
478
|
-
|
|
479
|
-
<Col sm={4}>
|
|
480
|
-
< Tabs defaultActiveKey="feature.networks" >
|
|
481
|
-
<Tab eventKey="feature.networks" title="networks">
|
|
482
|
-
< Tabs defaultActiveKey="dag" >
|
|
483
|
-
|
|
484
|
-
<Tab eventKey="dag" title="DAG">
|
|
485
|
-
<Tab.Content>
|
|
486
|
-
<pre>{JSON.stringify(features.graphs.dags, null, 2)}</pre>
|
|
487
|
-
</Tab.Content>
|
|
488
|
-
</Tab>
|
|
489
|
-
|
|
490
|
-
<Tab eventKey="directed" title="Directed">
|
|
491
|
-
<Tab.Content>
|
|
492
|
-
<pre>{JSON.stringify(features.graphs.directed, null, 2)}</pre>
|
|
493
|
-
</Tab.Content>
|
|
494
|
-
</Tab>
|
|
495
|
-
|
|
496
|
-
<Tab eventKey="undirected" title="Undirected">
|
|
497
|
-
<Tab.Content>
|
|
498
|
-
<pre>{JSON.stringify(features.graphs.undirected, null, 2)}</pre>
|
|
499
|
-
</Tab.Content>
|
|
500
|
-
</Tab>
|
|
501
|
-
|
|
502
|
-
</Tabs>
|
|
503
|
-
</Tab>
|
|
504
|
-
|
|
505
|
-
<Tab eventKey="tests.features" title="features">
|
|
506
|
-
<pre id="theProps">{JSON.stringify(features, null, 2)}</pre>
|
|
507
|
-
</Tab>
|
|
508
|
-
</Tabs>
|
|
509
|
-
</Col>
|
|
510
|
-
|
|
511
|
-
</Row>
|
|
512
|
-
</Tab.Container>
|
|
513
|
-
</Tab>
|
|
514
|
-
|
|
515
|
-
</Tabs >}
|
|
516
|
-
|
|
517
|
-
<footer>made with ❤️ and <a href="https://adamwong246.github.io/testeranto/" >testeranto </a></footer>
|
|
518
|
-
|
|
519
|
-
</div >
|
|
520
|
-
);
|
|
521
|
-
};
|
package/src/Reporter.ts
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import readline from "readline";
|
|
2
|
-
import fs from "fs";
|
|
3
|
-
import { jsonc } from "jsonc";
|
|
4
|
-
import puppeteer from "puppeteer-core";
|
|
5
|
-
|
|
6
|
-
import { IBuiltConfig, IRunTime } from "./lib/types";
|
|
7
|
-
|
|
8
|
-
// import { PM_Main } from "./PM/main.js";
|
|
9
|
-
|
|
10
|
-
// var mode: "DEV" | "PROD" = process.argv[2] === "-dev" ? "DEV" : "PROD";
|
|
11
|
-
|
|
12
|
-
// const node2web: Record<string, string[]> = {};
|
|
13
|
-
// const web2node: Record<string, string[]> = {};
|
|
14
|
-
// const childProcesses: Record<string, "loaded" | "running" | "done"> = {};
|
|
15
|
-
|
|
16
|
-
readline.emitKeypressEvents(process.stdin);
|
|
17
|
-
if (process.stdin.isTTY) process.stdin.setRawMode(true);
|
|
18
|
-
|
|
19
|
-
console.log("\n Puppeteer is running. Press 'q' to quit\n");
|
|
20
|
-
process.stdin.on("keypress", (str, key) => {
|
|
21
|
-
if (key.name === "q") {
|
|
22
|
-
process.exit();
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const main = async () => {
|
|
27
|
-
const configs = jsonc.parse(
|
|
28
|
-
(await fs.readFileSync("./docs/testeranto.json")).toString()
|
|
29
|
-
) as IBuiltConfig;
|
|
30
|
-
|
|
31
|
-
// const pm = new PM_Main(configs);
|
|
32
|
-
|
|
33
|
-
// await puppeteer.launch(options);
|
|
34
|
-
const browser = await puppeteer.launch(
|
|
35
|
-
{
|
|
36
|
-
waitForInitialPage: false,
|
|
37
|
-
executablePath: "/opt/homebrew/bin/chromium",
|
|
38
|
-
headless: false,
|
|
39
|
-
args: [
|
|
40
|
-
"--allow-file-access-from-files",
|
|
41
|
-
"--allow-running-insecure-content",
|
|
42
|
-
// "--auto-open-devtools-for-tabs",
|
|
43
|
-
"--disable-dev-shm-usage",
|
|
44
|
-
"--disable-extensions",
|
|
45
|
-
"--disable-gpu",
|
|
46
|
-
"--disable-setuid-sandbox",
|
|
47
|
-
"--disable-site-isolation-trials",
|
|
48
|
-
"--disable-web-security",
|
|
49
|
-
"--disable-web-security",
|
|
50
|
-
"--no-first-run",
|
|
51
|
-
"--no-sandbox",
|
|
52
|
-
"--no-startup-window",
|
|
53
|
-
"--no-zygote",
|
|
54
|
-
"--reduce-security-for-testing",
|
|
55
|
-
"--remote-allow-origins=*",
|
|
56
|
-
// "--remote-allow-origins=ws://localhost:3234",
|
|
57
|
-
"--unsafely-treat-insecure-origin-as-secure=*",
|
|
58
|
-
// "--disable-features=IsolateOrigins",
|
|
59
|
-
// "--single-process",
|
|
60
|
-
// "--unsafely-treat-insecure-origin-as-secure",
|
|
61
|
-
// "--unsafely-treat-insecure-origin-as-secure=ws://192.168.0.101:3234",
|
|
62
|
-
// `--remote-debugging-port=3234`,
|
|
63
|
-
],
|
|
64
|
-
}
|
|
65
|
-
// "."
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
console.log("Creating new page...");
|
|
69
|
-
const page = await browser.newPage();
|
|
70
|
-
|
|
71
|
-
await page.setViewport({ width: 0, height: 0 });
|
|
72
|
-
|
|
73
|
-
console.log("Requesting url...");
|
|
74
|
-
await page.goto(`file://${process.cwd()}/docs/report.html`);
|
|
75
|
-
|
|
76
|
-
// const destinationOfRuntime = (f: string, r: IRunTime) => {
|
|
77
|
-
// return path
|
|
78
|
-
// .normalize(`${configs.buildDir}/${r}/${f}`)
|
|
79
|
-
// .split(".")
|
|
80
|
-
// .slice(0, -1)
|
|
81
|
-
// .join(".");
|
|
82
|
-
// };
|
|
83
|
-
|
|
84
|
-
// configs.tests.forEach(([test, runtime, secondaryArtifacts]) => {
|
|
85
|
-
// if (runtime === "node") {
|
|
86
|
-
// pm.launchNode(test, destinationOfRuntime(test, "node"));
|
|
87
|
-
// } else if (runtime === "web") {
|
|
88
|
-
// pm.launchWeb(test, destinationOfRuntime(test, "web"));
|
|
89
|
-
// } else {
|
|
90
|
-
// console.error("runtime makes no sense", runtime);
|
|
91
|
-
// }
|
|
92
|
-
// });
|
|
93
|
-
|
|
94
|
-
// console.log("ready and watching for changes...", configs.buildDir);
|
|
95
|
-
// fs.watch(
|
|
96
|
-
// configs.buildDir,
|
|
97
|
-
// {
|
|
98
|
-
// recursive: true,
|
|
99
|
-
// },
|
|
100
|
-
// (eventType, changedFile) => {
|
|
101
|
-
// if (changedFile) {
|
|
102
|
-
// configs.tests.forEach(([test, runtime, secondaryArtifacts]) => {
|
|
103
|
-
// if (eventType === "change" || eventType === "rename") {
|
|
104
|
-
// if (
|
|
105
|
-
// changedFile ===
|
|
106
|
-
// test
|
|
107
|
-
// .replace("./", "node/")
|
|
108
|
-
// .split(".")
|
|
109
|
-
// .slice(0, -1)
|
|
110
|
-
// .concat("mjs")
|
|
111
|
-
// .join(".")
|
|
112
|
-
// ) {
|
|
113
|
-
// pm.launchNode(test, destinationOfRuntime(test, "node"));
|
|
114
|
-
// }
|
|
115
|
-
|
|
116
|
-
// if (
|
|
117
|
-
// changedFile ===
|
|
118
|
-
// test
|
|
119
|
-
// .replace("./", "web/")
|
|
120
|
-
// .split(".")
|
|
121
|
-
// .slice(0, -1)
|
|
122
|
-
// .concat("mjs")
|
|
123
|
-
// .join(".")
|
|
124
|
-
// ) {
|
|
125
|
-
// pm.launchWeb(test, destinationOfRuntime(test, "web"));
|
|
126
|
-
// }
|
|
127
|
-
// }
|
|
128
|
-
// });
|
|
129
|
-
// }
|
|
130
|
-
// }
|
|
131
|
-
// );
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
main();
|
package/src/Scheduler.ts
DELETED
|
File without changes
|
package/src/preload.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// import puppeteer from "puppeteer-core";
|
|
2
|
-
|
|
3
|
-
// import { NodeWriter } from "./NodeWriter";
|
|
4
|
-
// import puppeteerConfiger from "./puppeteerConfiger";
|
|
5
|
-
|
|
6
|
-
// (window as any).NodeWriter = NodeWriter;
|
|
7
|
-
|
|
8
|
-
// (window as any).browser = new Promise(async (res, rej) => {
|
|
9
|
-
// const browser = await puppeteerConfiger("2999").then(async (json) => {
|
|
10
|
-
// const b = await puppeteer.connect({
|
|
11
|
-
// browserWSEndpoint: json.webSocketDebuggerUrl,
|
|
12
|
-
// defaultViewport: null,
|
|
13
|
-
// });
|
|
14
|
-
// console.log("connected!", b.isConnected());
|
|
15
|
-
// return res(b);
|
|
16
|
-
// });
|
|
17
|
-
// });
|