testeranto 0.135.0 → 0.140.1
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/.aider.chat.history.md +13976 -0
- package/.aider.input.history +530 -0
- package/.aider.tags.cache.v3/{d8/b0/a8966fcd65890fd9f70d7afe8141.val → bd/91/b71f967fd074cf4b757081b429b7.val} +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.aider.tags.cache.v3/{8e/ec/2d4659a1589a0187a757ab1cbefa.val → fb/96/b0f91c7e75e08fc5a6907633cf99.val} +0 -0
- package/README.md +29 -135
- package/bundle.js +1 -1
- package/dist/common/src/Init.js +4 -1
- package/dist/common/src/Node.js +1 -1
- package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/common/src/Web.js +2 -2
- package/dist/common/src/build.js +7 -73
- package/dist/common/src/defaultConfig.js +0 -1
- package/dist/common/src/lib/abstractBase.js +2 -0
- package/dist/common/src/lib/basebuilder.js +4 -0
- package/dist/common/src/lib/core.js +2 -0
- package/dist/common/src/run.js +1 -1
- package/dist/common/src/utils/buildTemplates.js +88 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Init.js +4 -1
- package/dist/module/src/Node.js +1 -1
- package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/module/src/Project.js +41 -47
- package/dist/module/src/TestReport.js +34 -31
- package/dist/module/src/Web.js +2 -2
- package/dist/module/src/build.js +7 -73
- package/dist/module/src/defaultConfig.js +0 -1
- package/dist/module/src/lib/abstractBase.js +2 -0
- package/dist/module/src/lib/basebuilder.js +4 -0
- package/dist/module/src/lib/core.js +2 -0
- package/dist/module/src/run.js +1 -1
- package/dist/module/src/utils/buildTemplates.js +82 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Project.js +62 -13
- package/dist/prebuild/TestReport.js +39 -18
- package/dist/prebuild/build.mjs +96 -73
- package/dist/prebuild/init-docs.mjs +0 -4
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/src/CoreTypes.d.ts +5 -3
- package/dist/types/src/Node.d.ts +3 -3
- package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +17 -1
- package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +17 -1
- package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +17 -1
- package/dist/types/src/PM/nodeSidecar.d.ts +2 -2
- package/dist/types/src/Pure.d.ts +3 -3
- package/dist/types/src/Types.d.ts +18 -14
- package/dist/types/src/Web.d.ts +3 -3
- package/dist/types/src/lib/abstractBase.d.ts +8 -8
- package/dist/types/src/lib/basebuilder.d.ts +3 -3
- package/dist/types/src/lib/classBuilder.d.ts +2 -2
- package/dist/types/src/lib/core.d.ts +2 -2
- package/dist/types/src/lib/index.d.ts +7 -6
- package/dist/types/src/lib/types.d.ts +8 -8
- package/dist/types/src/mothership/test.d.ts +20 -1
- package/dist/types/src/utils/buildTemplates.d.ts +3 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docs/index.md +344 -54
- package/docs/style.md +116 -0
- package/docs.html +537 -0
- package/example.css +351 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Black.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Bold.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-ExtraBold.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Light.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Medium.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Regular.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Thin.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/OFL.txt +91 -0
- package/index.html +246 -24
- package/logo.svg +72 -0
- package/package.json +6 -2
- package/scripts/compile-docs.js +89 -0
- package/src/CoreTypes.ts +24 -43
- package/src/Init.ts +4 -4
- package/src/Node.ts +6 -20
- package/src/PM/__tests__/nodeSidecar.testeranto.ts +13 -20
- package/src/PM/__tests__/pureSidecar.testeranto.ts +8 -15
- package/src/PM/__tests__/webSidecar.testeranto.ts +8 -15
- package/src/PM/nodeSidecar.ts +2 -2
- package/src/PM/pure.ts +0 -4
- package/src/Project.tsx +289 -292
- package/src/Pure.ts +13 -14
- package/src/PureSidecar.ts +1 -0
- package/src/TestReport.tsx +179 -165
- package/src/Types.ts +29 -144
- package/src/Web.ts +15 -11
- package/src/build.ts +22 -73
- package/src/defaultConfig.ts +2 -1
- package/src/lib/BaseSuite.test.ts +457 -0
- package/src/lib/BaseSuite.ts +155 -0
- package/src/lib/abstractBase.ts +7 -162
- package/src/lib/basebuilder.ts +11 -11
- package/src/lib/classBuilder.ts +8 -3
- package/src/lib/core.ts +12 -12
- package/src/lib/index.ts +21 -24
- package/src/lib/types.ts +23 -9
- package/src/mothership/test.ts +13 -10
- package/src/run.ts +1 -1
- package/src/style.css +1 -1
- package/src/utils/buildTemplates.ts +88 -0
- package/style.css +496 -0
- package/testeranto/bundles/node/{mothership/chunk-V2EQEXU2.mjs → allTests/chunk-4PJCC2XT.mjs} +66 -59
- package/testeranto/bundles/node/allTests/metafile.json +4151 -0
- package/testeranto/bundles/node/allTests/src/PM/__tests__/nodeSidecar.testeranto.mjs +187 -0
- package/testeranto/bundles/node/{mothership → allTests}/src/PM/__tests__/pureSidecar.testeranto.mjs +1 -1
- package/testeranto/bundles/node/{mothership → allTests}/src/PM/__tests__/webSidecar.testeranto.mjs +1 -1
- package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test.mjs +305 -0
- package/testeranto/bundles/node/{mothership → allTests}/src/mothership/test.mjs +1 -1
- package/testeranto/dev.html +29 -0
- package/testeranto/index.html +28 -27
- package/testeranto/reports/allTests/config.json +57 -0
- package/testeranto/reports/{mothership/index.html → allTests/dev.html} +2 -0
- package/testeranto/reports/allTests/index.html +26 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/sidecar.testeranto/node/index.html → allTests/src/PM/__tests__/nodeSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +80 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +28 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/webSidecar.testeranto/node/index.html → allTests/src/PM/__tests__/pureSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/{mothership → allTests}/src/PM/__tests__/pureSidecar.testeranto/node/lint_errors.json +12 -12
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +32 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/nodeSidecar.testeranto/node/index.html → allTests/src/PM/__tests__/webSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/{mothership → allTests}/src/PM/__tests__/webSidecar.testeranto/node/lint_errors.json +12 -12
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +32 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/console_log.txt +35 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/pureSidecar.testeranto/node/index.html → allTests/src/lib/BaseSuite.test/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/index.html +21 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/lint_errors.json +608 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/message +1 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/prompt.txt +7 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/type_errors.txt +68 -0
- package/testeranto/reports/allTests/src/mothership/test/node/dev.html +21 -0
- package/testeranto/reports/allTests/src/mothership/test/node/index.html +21 -0
- package/testeranto/reports/allTests/src/mothership/test/node/message +1 -0
- package/testeranto/reports/allTests/src/mothership/test/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/mothership/test/node/type_errors.txt +24 -0
- package/testeranto/reports/allTests/summary.json +37 -0
- package/testeranto.config.ts +16 -26
- package/tsc.log +66 -69
- package/dist/common/src/SP__Polygon.test.js +0 -10
- package/dist/module/src/ReportClient.js +0 -132
- package/dist/module/src/SP__Polygon.test.js +0 -8
- package/dist/prebuild/ReportClient.js +0 -3
- package/dist/types/src/SP__Polygon.test.d.ts +0 -1
- package/src/ReportClient.tsx +0 -164
- package/src/SP__Polygon.test.ts +0 -13
- package/testeranto/ReportClient.css +0 -11367
- package/testeranto/ReportClient.js +0 -24641
- package/testeranto/bundles/node/mothership/metafile.json +0 -389
- package/testeranto/bundles/node/mothership/src/PM/__tests__/nodeSidecar.testeranto.mjs +0 -1219
- package/testeranto/bundles/node/mothership/src/PM/__tests__/sidecar.testeranto.mjs +0 -1199
- package/testeranto/reports/mothership/config.json +0 -25
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +0 -1564
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +0 -22
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +0 -35
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +0 -26
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/bdd_errors.txt +0 -1
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/lint_errors.json +0 -1564
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/prompt.txt +0 -22
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/tests.json +0 -56
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/type_errors.txt +0 -29
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +0 -26
- package/testeranto/reports/mothership/src/mothership/test/node/bdd_errors.txt +0 -1
- package/testeranto/reports/mothership/src/mothership/test/node/console_log.txt +0 -4
- package/testeranto/reports/mothership/src/mothership/test/node/index.html +0 -20
- package/testeranto/reports/mothership/src/mothership/test/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/mothership/test/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/mothership/test/node/tests.json +0 -24
- package/testeranto/reports/mothership/src/mothership/test/node/type_errors.txt +0 -18
- package/testeranto/reports/mothership/summary.json +0 -9
- /package/testeranto/bundles/node/{mothership → allTests}/chunk-PG6KUKNP.mjs +0 -0
- /package/testeranto/bundles/pure/{mothership → allTests}/metafile.json +0 -0
- /package/testeranto/bundles/web/{mothership → allTests}/metafile.json +0 -0
- /package/testeranto/reports/{mothership/src/PM/__tests__/nodeSidecar.testeranto → allTests/src/lib/BaseSuite.test}/node/log.txt +0 -0
- /package/testeranto/reports/{mothership → allTests}/src/mothership/test/node/lint_errors.json +0 -0
package/index.html
CHANGED
|
@@ -1,30 +1,252 @@
|
|
|
1
|
+
|
|
1
2
|
<!DOCTYPE html>
|
|
2
3
|
<html lang="en">
|
|
3
|
-
|
|
4
4
|
<head>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<script src="/dist/testeranto.js"></script>
|
|
13
|
-
|
|
14
|
-
<script type="importmap">
|
|
15
|
-
{
|
|
16
|
-
"imports": {
|
|
17
|
-
"tests.test.js": "./tests.test.js",
|
|
18
|
-
"features.test.js": "./features.test.js"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
</script>
|
|
22
|
-
</head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>README.md</title>
|
|
8
|
+
|
|
9
|
+
<!-- Prism.js CSS -->
|
|
10
|
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css" rel="stylesheet" />
|
|
11
|
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/line-numbers/prism-line-numbers.min.css" rel="stylesheet" />
|
|
23
12
|
|
|
13
|
+
<!-- load style AFTER prism -->
|
|
14
|
+
<link rel="stylesheet" href="style.css">
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
</head>
|
|
24
18
|
<body>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</
|
|
19
|
+
<div class="parallax-background"></div>
|
|
20
|
+
<div id="container">
|
|
21
|
+
<h1>testeranto</h1>
|
|
22
|
+
<h2>The AI-powered BDD test framework for TypeScript projects</h2>
|
|
23
|
+
<h4>🚧 WARNING: Testeranto is still under development and is not ready for production yet. 🚧</h4>
|
|
24
|
+
<ul>
|
|
25
|
+
<li>README: [index.html]: <a href="https://adamwong246.github.io/testeranto/"></a></li>
|
|
26
|
+
<li>demo: <a href="https://www.youtube.com/embed/WvU5xMqGi6Q">youtube</a></li>
|
|
27
|
+
<li>source: <a href="https://github.com/adamwong246/testeranto">github.com/adamwong246/testeranto</a></li>
|
|
28
|
+
<li>npm: <a href="https://www.npmjs.com/package/testeranto">npmjs.com/package/testeranto</a></li>
|
|
29
|
+
<li>dev: <a href="https://github.dev/adamwong246/testeranto">github.dev/adamwong246/testeranto</a></li>
|
|
30
|
+
<li>example repo: <a href="https://github.com/adamwong246/testeranto-starter">testeranto-starter</a></li>
|
|
31
|
+
</ul>
|
|
32
|
+
<h2>What is testeranto?</h2>
|
|
33
|
+
<ul>
|
|
34
|
+
<li>Testeranto produces test results which can be fed to Aider.ai to automatically fix failing tests.</li>
|
|
35
|
+
<li>Testeranto tests are specified in a strongly-typed gherkin-like syntax. Rather than testing your code directly, Testeranto requires you wrap your code with a semantic interface which is based on TS type signatures.</li>
|
|
36
|
+
<li>Testeranto can run tests in the frontend or the backend, or both.</li>
|
|
37
|
+
<li>Testeranto can be used to test anything that can be bundled with esbuild.</li>
|
|
38
|
+
<li>Testeranto connects "features" to "tests". This allows the AI to read feature documentation from external systems, like Jira.</li>
|
|
39
|
+
<li>Testeranto generates test results into static a website which can be deployed to github pages easily.</li>
|
|
40
|
+
<li>Testeranto uses esbuild to bundle it's tests. The result is used to refine the list of files added to the context of the AI. <strong>The consequence of this is that you can fit all relevant files, and ONLY the relevant files, into the LLMs context.</strong></li>
|
|
41
|
+
</ul>
|
|
42
|
+
<h2>Key Technologies</h2>
|
|
43
|
+
<table>
|
|
44
|
+
<thead>
|
|
45
|
+
<tr>
|
|
46
|
+
<th></th>
|
|
47
|
+
<th></th>
|
|
48
|
+
</tr>
|
|
49
|
+
</thead>
|
|
50
|
+
<tbody><tr>
|
|
51
|
+
<td>ESM</td>
|
|
52
|
+
<td>Modern javascript tooling</td>
|
|
53
|
+
</tr>
|
|
54
|
+
<tr>
|
|
55
|
+
<td>TypeScript</td>
|
|
56
|
+
<td>Strongly-typed test definitions</td>
|
|
57
|
+
</tr>
|
|
58
|
+
<tr>
|
|
59
|
+
<td>Puppeteer</td>
|
|
60
|
+
<td>Cross-runtime testing (Node & Browser)</td>
|
|
61
|
+
</tr>
|
|
62
|
+
<tr>
|
|
63
|
+
<td>esbuild</td>
|
|
64
|
+
<td>Fast test bundling</td>
|
|
65
|
+
</tr>
|
|
66
|
+
<tr>
|
|
67
|
+
<td>Aider.ai</td>
|
|
68
|
+
<td>AI-powered test fixing</td>
|
|
69
|
+
</tr>
|
|
70
|
+
<tr>
|
|
71
|
+
<td>ESLint</td>
|
|
72
|
+
<td>Static analysis of test files</td>
|
|
73
|
+
</tr>
|
|
74
|
+
<tr>
|
|
75
|
+
<td>tsc</td>
|
|
76
|
+
<td>Type checking of test files</td>
|
|
77
|
+
</tr>
|
|
78
|
+
<tr>
|
|
79
|
+
<td>Markdown</td>
|
|
80
|
+
<td>Feature documentation format</td>
|
|
81
|
+
</tr>
|
|
82
|
+
</tbody></table>
|
|
83
|
+
<h2>Quick Start</h2>
|
|
84
|
+
<ol>
|
|
85
|
+
<li>Install testeranto:</li>
|
|
86
|
+
</ol>
|
|
87
|
+
<pre>npm install testeranto</pre><ol start="2">
|
|
88
|
+
<li>Create a test file (e.g., <code>rectangle.test.ts</code>):</li>
|
|
89
|
+
</ol>
|
|
90
|
+
<pre class="language-typescript line-numbers"><code class="language-typescript">import { Given, When, Then } from "testeranto";
|
|
91
|
+
|
|
92
|
+
type Rectangle = { width: number; height: number };
|
|
93
|
+
|
|
94
|
+
const RectangleSpec = (Suite, Given, When, Then) => [
|
|
95
|
+
Suite.Default("Rectangle tests", {
|
|
96
|
+
test1: Given.Default(
|
|
97
|
+
["Basic rectangle operations"],
|
|
98
|
+
[When.setWidth(5), When.setHeight(10)],
|
|
99
|
+
[Then.getWidth(5), Then.getHeight(10)]
|
|
100
|
+
),
|
|
101
|
+
}),
|
|
102
|
+
];</code></pre><ol start="3">
|
|
103
|
+
<li>Run the tests</li>
|
|
104
|
+
</ol>
|
|
105
|
+
<p>To start testeranto in dev mode, build your tests in one terminal and execute them in another</p>
|
|
106
|
+
<pre># Terminal 1 - Build in watch mode
|
|
107
|
+
yarn t-build rectangle.test.ts yourProject dev
|
|
108
|
+
|
|
109
|
+
# Terminal 2 - Run in watch mode
|
|
110
|
+
yarn t-run rectangle.test.ts yourProject dev</pre><p>or build and run your tests only once</p>
|
|
111
|
+
<pre>yarn t-build rectangle.test.ts yourProject once && yarn t-run rectangle.test.ts yourProject once</pre><h2>Runtime Platforms</h2>
|
|
112
|
+
<table>
|
|
113
|
+
<thead>
|
|
114
|
+
<tr>
|
|
115
|
+
<th></th>
|
|
116
|
+
<th>Runs on</th>
|
|
117
|
+
<th>You should use this runtime for...</th>
|
|
118
|
+
<th>Important differences</th>
|
|
119
|
+
</tr>
|
|
120
|
+
</thead>
|
|
121
|
+
<tbody><tr>
|
|
122
|
+
<td><strong>Node</strong></td>
|
|
123
|
+
<td>node V8 with fork</td>
|
|
124
|
+
<td>testing backend code, Node APIs (like <code>fs</code> and <code>crypto</code>), or anything needing filesystem access</td>
|
|
125
|
+
<td>has access to the filesystem and io</td>
|
|
126
|
+
</tr>
|
|
127
|
+
<tr>
|
|
128
|
+
<td><strong>Web</strong></td>
|
|
129
|
+
<td>chrome browser</td>
|
|
130
|
+
<td>testing frontend code, anything that uses <code>document</code> or <code>window</code>, UI interactions, or visual regression</td>
|
|
131
|
+
<td>can take screenshots/recordings</td>
|
|
132
|
+
</tr>
|
|
133
|
+
<tr>
|
|
134
|
+
<td><strong>Pure</strong></td>
|
|
135
|
+
<td>node v8, dynamically imported</td>
|
|
136
|
+
<td>testing code which can run on both node-v8 and the the browser</td>
|
|
137
|
+
<td>Very similar to "Node" but has no IO access and thus, no console.log. This runtime is theoretically faster.</td>
|
|
138
|
+
</tr>
|
|
139
|
+
</tbody></table>
|
|
140
|
+
<h2>CLI Commands</h2>
|
|
141
|
+
<table>
|
|
142
|
+
<thead>
|
|
143
|
+
<tr>
|
|
144
|
+
<th></th>
|
|
145
|
+
<th></th>
|
|
146
|
+
</tr>
|
|
147
|
+
</thead>
|
|
148
|
+
<tbody><tr>
|
|
149
|
+
<td><code>yarn t-init</code></td>
|
|
150
|
+
<td>Create a new testeranto project</td>
|
|
151
|
+
</tr>
|
|
152
|
+
<tr>
|
|
153
|
+
<td><code>yarn t-build <YOUR_TESTS> dev|once</code></td>
|
|
154
|
+
<td>Build test bundles (watch or single-run mode)</td>
|
|
155
|
+
</tr>
|
|
156
|
+
<tr>
|
|
157
|
+
<td><code>yarn t-run <YOUR_TESTS> dev|once</code></td>
|
|
158
|
+
<td>Run tests (watch or single-run mode)</td>
|
|
159
|
+
</tr>
|
|
160
|
+
<tr>
|
|
161
|
+
<td><code>yarn t-report</code></td>
|
|
162
|
+
<td>Launch test report server</td>
|
|
163
|
+
</tr>
|
|
164
|
+
<tr>
|
|
165
|
+
<td><code>yarn t-aider</code></td>
|
|
166
|
+
<td>Fix failing tests with AI</td>
|
|
167
|
+
</tr>
|
|
168
|
+
</tbody></table>
|
|
169
|
+
<h2>Example workflow:</h2>
|
|
170
|
+
<pre># Initialize project
|
|
171
|
+
yarn t-init
|
|
172
|
+
|
|
173
|
+
# Write tests in test/*.test.ts
|
|
174
|
+
|
|
175
|
+
# In terminal 1 - Build tests (watch mode)
|
|
176
|
+
yarn t-build test/rectangle.test.ts dev
|
|
29
177
|
|
|
30
|
-
|
|
178
|
+
# In terminal 2 - Run tests (watch mode)
|
|
179
|
+
yarn t-run test/rectangle.test.ts dev
|
|
180
|
+
|
|
181
|
+
# Or for single-run mode:
|
|
182
|
+
yarn t-build test/rectangle.test.ts once
|
|
183
|
+
yarn t-run test/rectangle.test.ts once
|
|
184
|
+
|
|
185
|
+
# Get AI help with failures
|
|
186
|
+
yarn t-aider</pre><h2>Aider</h2>
|
|
187
|
+
<p>Testeranto generates a "prompt" alongside test results. This prompt is passed to aider as input.</p>
|
|
188
|
+
<pre>// input src files which can be edited by aider
|
|
189
|
+
/add test/node.ts
|
|
190
|
+
|
|
191
|
+
// test report files that inform aider but should not be edited
|
|
192
|
+
/read testeranto/reports/allTests/node/test/node/tests.json
|
|
193
|
+
/read testeranto/reports/allTests/test/node/node/lint_errors.json
|
|
194
|
+
/read testeranto/reports/allTests/test/node/node/type_errors.txt
|
|
195
|
+
|
|
196
|
+
// A list of features which can inform aider.
|
|
197
|
+
/load testeranto/reports/allTests/node/test/node/featurePrompt.txt
|
|
198
|
+
|
|
199
|
+
// tell the AI what to do
|
|
200
|
+
Fix the failing tests described in testeranto/reports/allTests/node/test/node/tests.json. Correct any type signature errors described in the files testeranto/reports/allTests/test/node/node/type_errors.txt. Implement any method which throws "Function not implemented. Resolve the lint errors described in testeranto/reports/allTests/test/node/node/lint_errors.json"</pre><h2>"Features"</h2>
|
|
201
|
+
<p>Testeranto connects "features" to tests. The features may be simple strings, but they can also take the form of local markdown files, or remote URLs to external feature tracking systems. For instance, this could be a jira ticket or a github issue. These features are used to inform the AI context.</p>
|
|
202
|
+
<pre class="language-typescript line-numbers"><code class="language-typescript">import someMarkdownFile from "someMarkdownFile.md";
|
|
203
|
+
|
|
204
|
+
...
|
|
205
|
+
|
|
206
|
+
test0: Given.Default(
|
|
207
|
+
[
|
|
208
|
+
"https://api.github.com/repos/adamwong246/testeranto/issues/8",
|
|
209
|
+
"you can set the width and height of a Rectangle",
|
|
210
|
+
someMarkdownFile
|
|
211
|
+
],
|
|
212
|
+
|
|
213
|
+
[When.setWidth(4), When.setHeight(19)],
|
|
214
|
+
[Then.getWidth(4), Then.getHeight(19)]
|
|
215
|
+
),
|
|
216
|
+
...
|
|
217
|
+
</code></pre><h2>Sidecars (COMING SOON)</h2>
|
|
218
|
+
<p>Along side your test, you can include a number of "sidecars" which are other bundled javascript assets upon which your test depends. For example, suppose you have an app with a frontend and backend component. You could run a react test in the web and include the node http server as a sidecar.</p>
|
|
219
|
+
<h2><code>eslint</code> and <code>tsc</code></h2>
|
|
220
|
+
<p>Alongside the bdd tests, testeranto runs eslint and tsc upon the input files to generate a list of static analysis errors and a list of type errors, respectively.</p>
|
|
221
|
+
<h2>Subprojects</h2>
|
|
222
|
+
<p>Testeranto has a core repo, but there are also subprojects which implement tests by type and by technology</p>
|
|
223
|
+
<h3>testeranto-solidity</h3>
|
|
224
|
+
<p>Test a solidity contract. Also included is an example of deploying a contrct to a ganache server.</p>
|
|
225
|
+
<h3>testeranto-reduxtoolkit</h3>
|
|
226
|
+
<p>Test a redux store.</p>
|
|
227
|
+
<h3>testeranto-http</h3>
|
|
228
|
+
<p>Test a node http server.</p>
|
|
229
|
+
<h3>testeranto-react (COMING SOON)</h3>
|
|
230
|
+
<p>Test a react component. You can choose from a variety of types (jsx functions, class style, etc) and you can test with <code>react</code>, <code>react-dom</code>, or <code>react-test-renderer</code></p>
|
|
231
|
+
<h3>testeranto-express (COMING SOON)</h3>
|
|
232
|
+
<h3>testeranto-xstate (COMING SOON)</h3>
|
|
233
|
+
|
|
234
|
+
</div>
|
|
235
|
+
<!-- Prism.js JS -->
|
|
236
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
|
|
237
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-typescript.min.js"></script>
|
|
238
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
|
|
239
|
+
<script>
|
|
240
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
241
|
+
Prism.highlightAll();
|
|
242
|
+
|
|
243
|
+
// Parallax effect
|
|
244
|
+
const parallaxBg = document.querySelector('.parallax-background');
|
|
245
|
+
window.addEventListener('scroll', function() {
|
|
246
|
+
const scrollPosition = window.pageYOffset;
|
|
247
|
+
parallaxBg.style.transform = 'translateY(scrollPosition)';
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
</script>
|
|
251
|
+
</body>
|
|
252
|
+
</html>
|
package/logo.svg
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300" width="300" height="300">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="gradient1" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" stop-color="#FF6B6B" />
|
|
5
|
+
<stop offset="100%" stop-color="#7FB3D5" />
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="gradient2" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
8
|
+
<stop offset="0%" stop-color="#4ECDC4" />
|
|
9
|
+
<stop offset="100%" stop-color="#00B4A0" />
|
|
10
|
+
</linearGradient>
|
|
11
|
+
</defs>
|
|
12
|
+
|
|
13
|
+
<!-- Playful background shape -->
|
|
14
|
+
<path d="M50,50 Q150,20 250,50 Q280,150 250,250 Q150,280 50,250 Q20,150 50,50 Z"
|
|
15
|
+
fill="url(#gradient1)" stroke="#FF6B6B" stroke-width="4" />
|
|
16
|
+
|
|
17
|
+
<!-- Robot mascot head -->
|
|
18
|
+
<circle cx="150" cy="125" r="40" fill="#7FB3D5" stroke="#292F36" stroke-width="3" />
|
|
19
|
+
|
|
20
|
+
<!-- Robot eyes -->
|
|
21
|
+
<circle cx="130" cy="115" r="8" fill="#292F36" />
|
|
22
|
+
<circle cx="170" cy="115" r="8" fill="#292F36" />
|
|
23
|
+
|
|
24
|
+
<!-- Robot mouth (smile) -->
|
|
25
|
+
<path d="M130,135 Q150,155 170,135" fill="none" stroke="#292F36" stroke-width="3"
|
|
26
|
+
stroke-linecap="round" />
|
|
27
|
+
|
|
28
|
+
<!-- BDD elements orbiting face center (150,125) -->
|
|
29
|
+
<g>
|
|
30
|
+
|
|
31
|
+
<!-- First ball + label -->
|
|
32
|
+
<g xmlns="http://www.w3.org/2000/svg">
|
|
33
|
+
|
|
34
|
+
<circle cx="212" cy="125" r="15" fill="#E6B422" />
|
|
35
|
+
|
|
36
|
+
<text x="212" y="130" text-anchor="middle" fill="#292F36" font-family="monospace"
|
|
37
|
+
font-size="9" font-weight="bold">GIVEN</text>
|
|
38
|
+
<animateTransform attributeName="transform" type="rotate" from="0 150 125" to="360 150
|
|
39
|
+
125" dur="10s" repeatCount="indefinite" />
|
|
40
|
+
</g>
|
|
41
|
+
|
|
42
|
+
<!-- Second ball + label -->
|
|
43
|
+
<g xmlns="http://www.w3.org/2000/svg">
|
|
44
|
+
|
|
45
|
+
<circle cx="126" cy="181.6" r="15" fill="#FF6B6B" />
|
|
46
|
+
|
|
47
|
+
<text x="126" y="186.6" text-anchor="middle" fill="#292F36" font-family="monospace"
|
|
48
|
+
font-size="10" font-weight="bold">WHEN</text>
|
|
49
|
+
<animateTransform attributeName="transform" type="rotate" from="0 150 125" to="360 150
|
|
50
|
+
125" dur="10s" repeatCount="indefinite"/>
|
|
51
|
+
</g>
|
|
52
|
+
|
|
53
|
+
<!-- Third ball + label -->
|
|
54
|
+
<g xmlns="http://www.w3.org/2000/svg">
|
|
55
|
+
<circle cx="120" cy="71.4" r="15" fill="#4ECDC4"/>
|
|
56
|
+
<text x="120" y="75.4" text-anchor="middle" fill="#0A0F1F" font-family="monospace"
|
|
57
|
+
font-size="10" font-weight="bold">THEN</text>
|
|
58
|
+
<animateTransform attributeName="transform" type="rotate" from="0 150 125" to="360 150
|
|
59
|
+
125" dur="10s" repeatCount="indefinite"/>
|
|
60
|
+
</g>
|
|
61
|
+
</g>
|
|
62
|
+
|
|
63
|
+
<!-- Higher title position with more padding -->
|
|
64
|
+
<g>
|
|
65
|
+
<path id="titlePath" d="M50,220 Q150,250 250,220" fill="none" />
|
|
66
|
+
<text font-family="monospace" font-size="33" font-weight="bold" fill="#1D3557">
|
|
67
|
+
<textPath href="#titlePath" startOffset="50%" text-anchor="middle" fill="#292F36">TESTERANTO</textPath>
|
|
68
|
+
</text>
|
|
69
|
+
|
|
70
|
+
</g>
|
|
71
|
+
|
|
72
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testeranto",
|
|
3
3
|
"description": "the AI powered BDD test framework for typescript projects",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.140.1",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "18.18.0"
|
|
7
7
|
},
|
|
@@ -131,7 +131,8 @@
|
|
|
131
131
|
"t-build": "tsx dist/prebuild/build.mjs",
|
|
132
132
|
"t-run": "tsx dist/prebuild/run.mjs",
|
|
133
133
|
"t-init": "tsx dist/prebuild/init-docs.mjs",
|
|
134
|
-
"t-report": "tsx dist/prebuild/ReportServer.mjs"
|
|
134
|
+
"t-report": "tsx dist/prebuild/ReportServer.mjs",
|
|
135
|
+
"build-docs": "node scripts/compile-docs.js"
|
|
135
136
|
},
|
|
136
137
|
"peerDependencies": {
|
|
137
138
|
"@types/react": "18.2.0",
|
|
@@ -157,6 +158,7 @@
|
|
|
157
158
|
"@types/ws": "^8.5.10",
|
|
158
159
|
"@typescript-eslint/eslint-plugin": "^5.46.0",
|
|
159
160
|
"@typescript-eslint/parser": "^5.46.0",
|
|
161
|
+
"marked": "^12.0.2",
|
|
160
162
|
"testeranto-solidity": "latest",
|
|
161
163
|
"testeranto_with_reduxjs_toolkit": "latest",
|
|
162
164
|
"ts-node": "^10.9.1",
|
|
@@ -192,6 +194,8 @@
|
|
|
192
194
|
"is-path-inside": "^4.0.0",
|
|
193
195
|
"iterm-tab": "^0.4.0",
|
|
194
196
|
"live-server": "^1.2.2",
|
|
197
|
+
"mermaid": "^11.8.1",
|
|
198
|
+
"mermaid-isomorphic": "^3.0.4",
|
|
195
199
|
"node-static": "^0.7.11",
|
|
196
200
|
"octokit": "^4.1.2",
|
|
197
201
|
"puppeteer": "^24.4.0",
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { marked } from "marked";
|
|
4
|
+
|
|
5
|
+
marked.use({
|
|
6
|
+
renderer: {
|
|
7
|
+
code: function (code, lang) {
|
|
8
|
+
if (lang == "mermaid") return `<pre class="mermaid">${code}</pre>`;
|
|
9
|
+
if (lang == "typescript")
|
|
10
|
+
return `<pre class="language-typescript line-numbers"><code class="language-typescript">${code}</code></pre>`;
|
|
11
|
+
return `<pre>${code}</pre>`;
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
// Simple HTML template with our CSS
|
|
17
|
+
const template = (title, content) => `
|
|
18
|
+
<!DOCTYPE html>
|
|
19
|
+
<html lang="en">
|
|
20
|
+
<head>
|
|
21
|
+
<meta charset="UTF-8">
|
|
22
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
23
|
+
<title>${title}</title>
|
|
24
|
+
|
|
25
|
+
<!-- Prism.js CSS -->
|
|
26
|
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css" rel="stylesheet" />
|
|
27
|
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/line-numbers/prism-line-numbers.min.css" rel="stylesheet" />
|
|
28
|
+
|
|
29
|
+
<!-- load style AFTER prism -->
|
|
30
|
+
<link rel="stylesheet" href="style.css">
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
</head>
|
|
34
|
+
<body>
|
|
35
|
+
<div class="parallax-background"></div>
|
|
36
|
+
<div id="container">
|
|
37
|
+
${content.replace(/<p>⚠️(.*?)<\/p>/g, '<div class="warning">$1</div>')}
|
|
38
|
+
</div>
|
|
39
|
+
<!-- Prism.js JS -->
|
|
40
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
|
|
41
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-typescript.min.js"></script>
|
|
42
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
|
|
43
|
+
<script>
|
|
44
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
45
|
+
Prism.highlightAll();
|
|
46
|
+
|
|
47
|
+
// Parallax effect
|
|
48
|
+
const parallaxBg = document.querySelector('.parallax-background');
|
|
49
|
+
window.addEventListener('scroll', function() {
|
|
50
|
+
const scrollPosition = window.pageYOffset;
|
|
51
|
+
parallaxBg.style.transform = 'translateY(scrollPosition)';
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
</script>
|
|
55
|
+
</body>
|
|
56
|
+
</html>
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
// Process markdown files
|
|
60
|
+
const processFile = (filePath) => {
|
|
61
|
+
const markdown = fs.readFileSync(filePath, "utf8");
|
|
62
|
+
return template(path.basename(filePath), marked.parse(markdown));
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// Main function
|
|
66
|
+
const main = () => {
|
|
67
|
+
try {
|
|
68
|
+
// Create docs-output directory if it doesn't exist
|
|
69
|
+
const outDir = "./";
|
|
70
|
+
if (!fs.existsSync(outDir)) {
|
|
71
|
+
fs.mkdirSync(outDir);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Process README.md -> documentation.html
|
|
75
|
+
const readmeHtml = processFile("README.md");
|
|
76
|
+
fs.writeFileSync(path.join(outDir, "index.html"), readmeHtml);
|
|
77
|
+
console.log("Generated: index.html");
|
|
78
|
+
|
|
79
|
+
// Process docs/index.md -> api-reference.html
|
|
80
|
+
const docsHtml = processFile("docs/index.md");
|
|
81
|
+
fs.writeFileSync(path.join(outDir, "docs.html"), docsHtml);
|
|
82
|
+
console.log("Generated: docs.html");
|
|
83
|
+
} catch (err) {
|
|
84
|
+
console.error("Error compiling docs:", err);
|
|
85
|
+
process.exit(1);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
main();
|
package/src/CoreTypes.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
2
|
import { ITTestResourceConfiguration } from "./lib";
|
|
2
3
|
|
|
3
4
|
import { IPM, ITestCheckCallback } from "./lib/types";
|
|
@@ -21,17 +22,7 @@ import {
|
|
|
21
22
|
|
|
22
23
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
23
24
|
|
|
24
|
-
export type ITestInterface<
|
|
25
|
-
I extends Ibdd_in<
|
|
26
|
-
unknown,
|
|
27
|
-
unknown,
|
|
28
|
-
unknown,
|
|
29
|
-
unknown,
|
|
30
|
-
unknown,
|
|
31
|
-
unknown,
|
|
32
|
-
unknown
|
|
33
|
-
>
|
|
34
|
-
> = {
|
|
25
|
+
export type ITestInterface<I extends Ibdd_in_any> = {
|
|
35
26
|
assertThis: (x: I["then"]) => any;
|
|
36
27
|
andWhen: (
|
|
37
28
|
store: I["istore"],
|
|
@@ -64,22 +55,8 @@ export type ITestInterface<
|
|
|
64
55
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
65
56
|
|
|
66
57
|
export type ITestSpecification<
|
|
67
|
-
I extends
|
|
68
|
-
|
|
69
|
-
unknown,
|
|
70
|
-
unknown,
|
|
71
|
-
unknown,
|
|
72
|
-
unknown,
|
|
73
|
-
unknown,
|
|
74
|
-
unknown
|
|
75
|
-
>,
|
|
76
|
-
O extends Ibdd_out<
|
|
77
|
-
TestSuiteShape,
|
|
78
|
-
TestGivenShape,
|
|
79
|
-
TestWhenShape,
|
|
80
|
-
TestThenShape,
|
|
81
|
-
TestCheckShape
|
|
82
|
-
>
|
|
58
|
+
I extends Ibdd_in_any,
|
|
59
|
+
O extends Ibdd_out_any
|
|
83
60
|
> = (
|
|
84
61
|
Suite: SuiteSpecification<I, O>,
|
|
85
62
|
Given: GivenSpecification<I, O>,
|
|
@@ -91,22 +68,8 @@ export type ITestSpecification<
|
|
|
91
68
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
92
69
|
|
|
93
70
|
export type ITestImplementation<
|
|
94
|
-
I extends
|
|
95
|
-
|
|
96
|
-
unknown,
|
|
97
|
-
unknown,
|
|
98
|
-
unknown,
|
|
99
|
-
unknown,
|
|
100
|
-
unknown,
|
|
101
|
-
unknown
|
|
102
|
-
>,
|
|
103
|
-
O extends Ibdd_out<
|
|
104
|
-
TestSuiteShape,
|
|
105
|
-
TestGivenShape,
|
|
106
|
-
TestWhenShape,
|
|
107
|
-
TestThenShape,
|
|
108
|
-
TestCheckShape
|
|
109
|
-
>,
|
|
71
|
+
I extends Ibdd_in_any,
|
|
72
|
+
O extends Ibdd_out_any,
|
|
110
73
|
modifier = {
|
|
111
74
|
whens: TestWhenImplementation<I, O>;
|
|
112
75
|
}
|
|
@@ -137,6 +100,14 @@ export type Ibdd_out<
|
|
|
137
100
|
checks: IChecks;
|
|
138
101
|
};
|
|
139
102
|
|
|
103
|
+
export type Ibdd_out_any = Ibdd_out<
|
|
104
|
+
TestSuiteShape,
|
|
105
|
+
TestGivenShape,
|
|
106
|
+
TestWhenShape,
|
|
107
|
+
TestThenShape,
|
|
108
|
+
TestCheckShape
|
|
109
|
+
>;
|
|
110
|
+
|
|
140
111
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
141
112
|
|
|
142
113
|
export type Ibdd_in<
|
|
@@ -169,3 +140,13 @@ export type Ibdd_in<
|
|
|
169
140
|
/** Function type for Then steps */
|
|
170
141
|
then: IThen;
|
|
171
142
|
};
|
|
143
|
+
|
|
144
|
+
export type Ibdd_in_any = Ibdd_in<
|
|
145
|
+
unknown,
|
|
146
|
+
unknown,
|
|
147
|
+
unknown,
|
|
148
|
+
unknown,
|
|
149
|
+
unknown,
|
|
150
|
+
unknown,
|
|
151
|
+
unknown
|
|
152
|
+
>;
|
package/src/Init.ts
CHANGED
|
@@ -25,10 +25,10 @@ export default async () => {
|
|
|
25
25
|
`testeranto/Project.js`
|
|
26
26
|
);
|
|
27
27
|
|
|
28
|
-
fs.copyFileSync(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
);
|
|
28
|
+
// fs.copyFileSync(
|
|
29
|
+
// `node_modules/testeranto/dist/prebuild/ReportClient.js`,
|
|
30
|
+
// `testeranto/ReportClient.js`
|
|
31
|
+
// );
|
|
32
32
|
|
|
33
33
|
fs.copyFileSync(
|
|
34
34
|
`node_modules/testeranto/dist/prebuild/Project.css`,
|
package/src/Node.ts
CHANGED
|
@@ -4,35 +4,21 @@ import {
|
|
|
4
4
|
ITTestResourceConfiguration,
|
|
5
5
|
ITTestResourceRequest,
|
|
6
6
|
} from "./lib/index.js";
|
|
7
|
-
import type {} from // INodeTestInterface,
|
|
8
|
-
// IT,
|
|
9
|
-
// ITestImplementation,
|
|
10
|
-
// ITestInterface,
|
|
11
|
-
// ITestSpecification,
|
|
12
|
-
// OT,
|
|
13
|
-
"./Types.js";
|
|
14
7
|
import { PM_Node } from "./PM/node.js";
|
|
15
8
|
import {
|
|
16
9
|
ITestSpecification,
|
|
17
10
|
ITestImplementation,
|
|
18
11
|
ITestInterface,
|
|
19
|
-
|
|
12
|
+
Ibdd_in_any,
|
|
13
|
+
Ibdd_out_any,
|
|
20
14
|
Ibdd_out,
|
|
21
15
|
} from "./CoreTypes.js";
|
|
22
16
|
|
|
23
17
|
let ipcfile;
|
|
24
18
|
|
|
25
19
|
export class NodeTesteranto<
|
|
26
|
-
I extends
|
|
27
|
-
|
|
28
|
-
unknown,
|
|
29
|
-
unknown,
|
|
30
|
-
unknown,
|
|
31
|
-
unknown,
|
|
32
|
-
unknown,
|
|
33
|
-
unknown
|
|
34
|
-
>,
|
|
35
|
-
O extends Ibdd_out,
|
|
20
|
+
I extends Ibdd_in_any,
|
|
21
|
+
O extends Ibdd_out_any,
|
|
36
22
|
M
|
|
37
23
|
> extends Testeranto<I, O, M> {
|
|
38
24
|
constructor(
|
|
@@ -65,7 +51,7 @@ export class NodeTesteranto<
|
|
|
65
51
|
}
|
|
66
52
|
}
|
|
67
53
|
|
|
68
|
-
const testeranto = async <I extends
|
|
54
|
+
const testeranto = async <I extends Ibdd_in_any, O extends Ibdd_out, M>(
|
|
69
55
|
input: I["iinput"],
|
|
70
56
|
testSpecification: ITestSpecification<I, O>,
|
|
71
57
|
testImplementation: ITestImplementation<I, O, M>,
|
|
@@ -108,7 +94,7 @@ const testeranto = async <I extends IT, O extends OT, M>(
|
|
|
108
94
|
// });
|
|
109
95
|
}
|
|
110
96
|
|
|
111
|
-
return t;
|
|
97
|
+
// return t;
|
|
112
98
|
};
|
|
113
99
|
|
|
114
100
|
export default testeranto;
|