testeranto 0.134.0 → 0.140.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.aider.chat.history.md +14577 -0
- package/.aider.input.history +566 -0
- package/.aider.tags.cache.v3/{8d/fa/12860238755bcfab9af8a93c52ab.val → bd/91/b71f967fd074cf4b757081b429b7.val} +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.aider.tags.cache.v3/{18/8b/7dfca822129dad10b5cacadf7728.val → fb/96/b0f91c7e75e08fc5a6907633cf99.val} +0 -0
- package/README.md +29 -423
- package/bundle.js +1 -1
- package/dist/common/src/CoreTypes.js +2 -0
- package/dist/common/src/Init.js +4 -1
- package/dist/common/src/Node.js +1 -1
- package/dist/common/src/PM/PM_WithEslintAndTsc.js +10 -8
- package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/common/src/PM/main.js +12 -7
- package/dist/common/src/PM/node.js +10 -3
- package/dist/common/src/Web.js +2 -2
- package/dist/common/src/build.js +7 -72
- package/dist/common/src/defaultConfig.js +0 -1
- package/dist/common/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
- package/dist/common/src/esbuildConfigs/node.js +2 -16
- package/dist/common/src/esbuildConfigs/pure.js +2 -16
- package/dist/common/src/esbuildConfigs/rebuildPlugin.js +22 -0
- package/dist/common/src/esbuildConfigs/web.js +2 -16
- package/dist/common/src/lib/abstractBase.js +8 -1
- package/dist/common/src/lib/basebuilder.js +4 -0
- package/dist/common/src/lib/classBuilder.js +2 -3
- 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/PM_WithEslintAndTsc.js +10 -8
- package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/module/src/PM/main.js +12 -7
- package/dist/module/src/PM/node.js +10 -3
- 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 -72
- package/dist/module/src/defaultConfig.js +0 -1
- package/dist/module/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
- package/dist/module/src/esbuildConfigs/node.js +2 -16
- package/dist/module/src/esbuildConfigs/pure.js +2 -16
- package/dist/module/src/esbuildConfigs/rebuildPlugin.js +17 -0
- package/dist/module/src/esbuildConfigs/web.js +2 -16
- package/dist/module/src/lib/abstractBase.js +8 -1
- package/dist/module/src/lib/basebuilder.js +4 -0
- package/dist/module/src/lib/classBuilder.js +2 -3
- 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 +77 -29
- package/dist/prebuild/TestReport.js +51 -32
- package/dist/prebuild/build.mjs +132 -131
- package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +14 -1
- package/dist/prebuild/init-docs.mjs +0 -4
- package/dist/prebuild/run.mjs +50 -31
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/src/CoreTypes.d.ts +53 -0
- package/dist/types/src/Node.d.ts +3 -3
- package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +2 -4
- package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +2 -4
- package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +2 -4
- package/dist/types/src/PM/index.d.ts +1 -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 +21 -61
- package/dist/types/src/Web.d.ts +3 -3
- package/dist/types/src/esbuildConfigs/rebuildPlugin.d.ts +6 -0
- package/dist/types/src/lib/abstractBase.d.ts +10 -16
- 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 +2 -2
- package/dist/types/src/utils/buildTemplates.d.ts +3 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docs/index.md +567 -0
- 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 +245 -24
- package/logo.svg +72 -0
- package/package.json +11 -2
- package/scripts/compile-docs.js +89 -0
- package/src/CoreTypes.ts +152 -0
- package/src/Init.ts +4 -4
- package/src/Node.ts +13 -13
- package/src/PM/PM_WithEslintAndTsc.ts +46 -15
- 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/index.ts +1 -1
- package/src/PM/main.ts +17 -16
- package/src/PM/node.ts +10 -10
- 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 +52 -151
- package/src/Web.ts +15 -14
- package/src/build.ts +22 -72
- package/src/defaultConfig.ts +2 -1
- package/src/esbuildConfigs/eslint-formatter-testeranto.ts +17 -1
- package/src/esbuildConfigs/node.ts +2 -18
- package/src/esbuildConfigs/pure.ts +2 -18
- package/src/esbuildConfigs/rebuildPlugin.ts +23 -0
- package/src/esbuildConfigs/web.ts +2 -18
- package/src/lib/BaseSuite.test.ts +457 -0
- package/src/lib/BaseSuite.ts +155 -0
- package/src/lib/abstractBase.ts +13 -163
- package/src/lib/basebuilder.ts +11 -11
- package/src/lib/classBuilder.ts +13 -7
- package/src/lib/core.ts +13 -17
- 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/.aider.tags.cache.v3/cache.db-shm +0 -0
- package/.aider.tags.cache.v3/cache.db-wal +0 -0
- 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/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/dist/{types/src/SP__Polygon.test.d.ts → module/src/CoreTypes.js} +0 -0
- /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/docs/index.md
ADDED
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
# Testeranto docs and core concepts
|
|
2
|
+
|
|
3
|
+
Testeranto's type system provides a rigorous framework for Behavior-Driven Development (BDD) testing. While powerful, the API can initially seem complex but everything you need to know can be summed up in **3 core functions and 5 essential types**. Follow these patterns, and TypeScript's type checker will guide you through the rest.
|
|
4
|
+
|
|
5
|
+
### ⚠️ this doc is a work in progress. It is 99% accurate but needs some attention to be complete. ⚠️
|
|
6
|
+
|
|
7
|
+
Let's break down the key components using a Rectangle class example.
|
|
8
|
+
|
|
9
|
+
### The Test Subject
|
|
10
|
+
|
|
11
|
+
This is the thing-to-be-tested, for this example, a very simple implementation of a Rectangle
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
class Rectangle {
|
|
15
|
+
constructor(public width: number, public height: number) {}
|
|
16
|
+
|
|
17
|
+
setWidth(w: number) {
|
|
18
|
+
this.width = w;
|
|
19
|
+
}
|
|
20
|
+
setHeight(h: number) {
|
|
21
|
+
this.height = h;
|
|
22
|
+
}
|
|
23
|
+
getArea() {
|
|
24
|
+
return this.width * this.height;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Testeranto's 3 functions
|
|
30
|
+
|
|
31
|
+
For each of testeranto's runtime, there is a specific Testeranto main function. Each is it's own import but all 3 are called in the same way.
|
|
32
|
+
|
|
33
|
+
#### Node
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import Testeranto from "testeranto/src/Node"; // <- import the Node main function
|
|
37
|
+
// below this point, all runtimes are identical!
|
|
38
|
+
|
|
39
|
+
// Note the type parameters I, O, and M: these will be important later
|
|
40
|
+
export default Testeranto<
|
|
41
|
+
I extends Ibdd_in,
|
|
42
|
+
O extends Ibdd_out,
|
|
43
|
+
M
|
|
44
|
+
>(
|
|
45
|
+
Rectangle.prototype, // <- the subject of the test.
|
|
46
|
+
specification,
|
|
47
|
+
implementation,
|
|
48
|
+
interface
|
|
49
|
+
);
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### Web
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
import Testeranto from "testeranto/src/Web"; // <- import the Web main function
|
|
56
|
+
// below this point, all runtimes are identical!
|
|
57
|
+
|
|
58
|
+
import { implementation } from "./Rectangle.test.implementation";
|
|
59
|
+
import { specification } from "./Rectangle.test.specification";
|
|
60
|
+
import { interface } from "./Rectangle.test.interface";
|
|
61
|
+
|
|
62
|
+
// Note the type parameters I, O, and M: these will be important later
|
|
63
|
+
export default Testeranto<
|
|
64
|
+
I extends Ibdd_in,
|
|
65
|
+
O extends Ibdd_out,
|
|
66
|
+
M
|
|
67
|
+
>(
|
|
68
|
+
Rectangle.prototype, // <- the subject of the test.
|
|
69
|
+
specification,
|
|
70
|
+
implementation,
|
|
71
|
+
interface
|
|
72
|
+
);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
#### Pure
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
import Testeranto from "testeranto/src/Pure"; // <- import the Pure main function
|
|
79
|
+
// below this point, all runtimes are identical!
|
|
80
|
+
|
|
81
|
+
import { implementation } from "./Rectangle.test.implementation";
|
|
82
|
+
import { specification } from "./Rectangle.test.specification";
|
|
83
|
+
import { interface } from "./Rectangle.test.interface";
|
|
84
|
+
|
|
85
|
+
// Note the type parameters I, O, and M: these will be important later
|
|
86
|
+
export default Testeranto<
|
|
87
|
+
I extends Ibdd_in,
|
|
88
|
+
O extends Ibdd_out,
|
|
89
|
+
M
|
|
90
|
+
>(
|
|
91
|
+
Rectangle.prototype, // <- the subject of the test.
|
|
92
|
+
specification,
|
|
93
|
+
implementation,
|
|
94
|
+
interface
|
|
95
|
+
);
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Testeranto's 5 Essential Types
|
|
99
|
+
|
|
100
|
+
Every testeranto test is built around these 5 types that form a complete testing pipeline:
|
|
101
|
+
|
|
102
|
+
1. **ITestSpecification** - The "what" of your tests (business requirements)
|
|
103
|
+
2. **ITestImplementation** - The "how" of your tests (concrete operations)
|
|
104
|
+
3. **ITestInterface** - The "glue" between specs and implementation
|
|
105
|
+
4. **Ibdd_in** - Defines the internal test flow shape
|
|
106
|
+
5. **Ibdd_out** - Defines the external test interface
|
|
107
|
+
|
|
108
|
+
```mermaid
|
|
109
|
+
flowchart LR
|
|
110
|
+
S[ITestSpecification] -->|defines| O[Ibdd_out]
|
|
111
|
+
I[ITestImplementation] -->|uses| O
|
|
112
|
+
I -->|uses| M[Modifier]
|
|
113
|
+
T[ITestInterface] -->|connects| N[Ibdd_in]
|
|
114
|
+
S -->|flows through| N
|
|
115
|
+
I -->|flows through| N
|
|
116
|
+
|
|
117
|
+
style S fill:#2aa198,stroke:#073642
|
|
118
|
+
style I fill:#859900,stroke:#073642
|
|
119
|
+
style T fill:#b58900,stroke:#073642
|
|
120
|
+
style O fill:#d33682,stroke:#073642
|
|
121
|
+
style N fill:#cb4b16,stroke:#073642
|
|
122
|
+
style M fill:#6c71c4,stroke:#073642
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
#### The Specification (ITestSpecification)
|
|
126
|
+
|
|
127
|
+
The Specification defines the business requirements in plain language, completely separate from implementation details. This is where you describe **what** should be tested without worrying about **how**.
|
|
128
|
+
|
|
129
|
+
- Pure business logic
|
|
130
|
+
- Human-readable test descriptions
|
|
131
|
+
- Defines test suites, scenarios (Given/When/Then)
|
|
132
|
+
- Maps directly to BDD concepts
|
|
133
|
+
- Uses Ibdd_out for type safety
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
import {
|
|
137
|
+
Ibdd_in,
|
|
138
|
+
Ibdd_out,
|
|
139
|
+
ITestSpecification,
|
|
140
|
+
} from "testeranto/src/CoreTypes";
|
|
141
|
+
|
|
142
|
+
// Note the type parameters I and O. These are important!
|
|
143
|
+
export const specification: ITestSpecification<
|
|
144
|
+
I extends Ibdd_in,
|
|
145
|
+
O extends Ibdd_out,
|
|
146
|
+
> = (
|
|
147
|
+
Suite,
|
|
148
|
+
Given,
|
|
149
|
+
When,
|
|
150
|
+
Then,
|
|
151
|
+
Check
|
|
152
|
+
) => {
|
|
153
|
+
return [
|
|
154
|
+
Suite.Default(
|
|
155
|
+
"Testing the Rectangle class",
|
|
156
|
+
{
|
|
157
|
+
test0: Given.Default(
|
|
158
|
+
["https://api.github.com/repos/adamwong246/testeranto/issues/8"],
|
|
159
|
+
[],
|
|
160
|
+
[Then.getWidth(2)]
|
|
161
|
+
),
|
|
162
|
+
test1: Given.Default(
|
|
163
|
+
[`Rectangles have width and height.`],
|
|
164
|
+
[When.setWidth(4), When.setHeight(5)],
|
|
165
|
+
[Then.getWidth(4), Then.getHeight(5), Then.area(20)]
|
|
166
|
+
),
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
// Ignore this for now
|
|
170
|
+
[]
|
|
171
|
+
),
|
|
172
|
+
];
|
|
173
|
+
};
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
#### The Implementation (ITestImplementation)
|
|
177
|
+
|
|
178
|
+
The Implementation provides the concrete operations that bring specifications to life. This is where you define **how** each test step actually works.
|
|
179
|
+
|
|
180
|
+
- `suites`: Test grouping and organization
|
|
181
|
+
- `givens`: Initial test states/setup
|
|
182
|
+
- `whens`: Actions that change state
|
|
183
|
+
- `thens`: Assertions and validations
|
|
184
|
+
- `checks`: Additional verification points
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
import {
|
|
188
|
+
Ibdd_in,
|
|
189
|
+
Ibdd_out,
|
|
190
|
+
ITestImplementation,
|
|
191
|
+
} from "testeranto/src/CoreTypes";
|
|
192
|
+
|
|
193
|
+
// Note the type parameters I and O. These are important!
|
|
194
|
+
export const implementation: ITestImplementation<
|
|
195
|
+
I extends Ibdd_in,
|
|
196
|
+
O extends Ibdd_out,
|
|
197
|
+
M
|
|
198
|
+
> = {
|
|
199
|
+
suites: {
|
|
200
|
+
Default: "a default suite",
|
|
201
|
+
},
|
|
202
|
+
|
|
203
|
+
givens: {
|
|
204
|
+
Default: () => new Rectangle(2, 2),
|
|
205
|
+
WidthAndHeightOf: (width, height) => new Rectangle(width, height),
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
whens: {
|
|
209
|
+
setWidth: (width: number) => (rectangle) => {
|
|
210
|
+
rectangle.setWidth(width);
|
|
211
|
+
return rectangle;
|
|
212
|
+
},
|
|
213
|
+
setHeight: (height: number) => (rectangle) => {
|
|
214
|
+
rectangle.setHeight(height);
|
|
215
|
+
return rectangle;
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
|
|
219
|
+
thens: {
|
|
220
|
+
getWidth: (expectedWidth) => (rectangle) => {
|
|
221
|
+
assert.equal(rectangle.getWidth(), expectedWidth);
|
|
222
|
+
return rectangle;
|
|
223
|
+
},
|
|
224
|
+
getHeight: (expectedHeight) => (rectangle) => {
|
|
225
|
+
assert.equal(rectangle.getHeight(), expectedHeight);
|
|
226
|
+
return rectangle;
|
|
227
|
+
},
|
|
228
|
+
area: (area) => (rectangle) => {
|
|
229
|
+
assert.equal(rectangle.area(), area);
|
|
230
|
+
return rectangle;
|
|
231
|
+
},
|
|
232
|
+
circumference: (circumference: number) => (rectangle: Rectangle) => {
|
|
233
|
+
assert.equal(rectangle.circumference(), circumference);
|
|
234
|
+
return rectangle;
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
checks: {
|
|
239
|
+
Default: () => new Rectangle(2, 2),
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
#### The Interface aka ITestInterface
|
|
245
|
+
|
|
246
|
+
The test interface is code which is NOT BDD . The interface adapts your test subject so that the BDD hooks can be applied. The interface implements the traditional BDD steps "before all", "after all", "before each", "after each", etc
|
|
247
|
+
|
|
248
|
+
```ts
|
|
249
|
+
|
|
250
|
+
import {
|
|
251
|
+
Ibdd_in,
|
|
252
|
+
ITestInterface,
|
|
253
|
+
} from "testeranto/src/CoreTypes";
|
|
254
|
+
|
|
255
|
+
// Note the type parameter. This is important!
|
|
256
|
+
export const testInterface: ITestInterface<
|
|
257
|
+
I extends Ibdd_in,
|
|
258
|
+
> = {
|
|
259
|
+
beforeEach: async (subject, i) => {
|
|
260
|
+
return i();
|
|
261
|
+
},
|
|
262
|
+
andWhen: async function (s, whenCB, tr, utils) {
|
|
263
|
+
return whenCB(s, utils);
|
|
264
|
+
},
|
|
265
|
+
butThen: async (s, t, tr, pm) => {
|
|
266
|
+
return t(s, pm);
|
|
267
|
+
},
|
|
268
|
+
afterEach: (z) => {
|
|
269
|
+
return z;
|
|
270
|
+
},
|
|
271
|
+
afterAll: () => {},
|
|
272
|
+
assertThis: (x: any, y) => {},
|
|
273
|
+
};
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
#### type I aka Ibdd_in
|
|
277
|
+
|
|
278
|
+
this type describes the "inner" shape of your BDD tests.
|
|
279
|
+
|
|
280
|
+
```ts
|
|
281
|
+
import { Ibdd_in } from "testeranto/src/CoreTypes";
|
|
282
|
+
|
|
283
|
+
// TODO this is inaccurate
|
|
284
|
+
export type I = Ibdd_in<
|
|
285
|
+
null,
|
|
286
|
+
null,
|
|
287
|
+
Rectangle,
|
|
288
|
+
Rectangle,
|
|
289
|
+
Rectangle,
|
|
290
|
+
(...x) => (rectangle: Rectangle, utils: IPM) => Rectangle,
|
|
291
|
+
(rectangle: Rectangle, utils: IPM) => Rectangle
|
|
292
|
+
>;
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
#### type O aka Ibdd_out
|
|
296
|
+
|
|
297
|
+
this type describes the "outer" shape of your BDD tests.
|
|
298
|
+
|
|
299
|
+
```ts
|
|
300
|
+
import { Ibdd_out } from "testeranto/src/CoreTypes";
|
|
301
|
+
|
|
302
|
+
export type O = Ibdd_out<
|
|
303
|
+
// Suite
|
|
304
|
+
{
|
|
305
|
+
Default: [string];
|
|
306
|
+
},
|
|
307
|
+
// "Given" are initial states
|
|
308
|
+
{
|
|
309
|
+
Default;
|
|
310
|
+
WidthOfOneAndHeightOfOne;
|
|
311
|
+
WidthAndHeightOf: [number, number];
|
|
312
|
+
},
|
|
313
|
+
// "Whens" are steps which change the state of the test subject
|
|
314
|
+
{
|
|
315
|
+
HeightIsPubliclySetTo: [number];
|
|
316
|
+
WidthIsPubliclySetTo: [number];
|
|
317
|
+
setWidth: [number];
|
|
318
|
+
setHeight: [number];
|
|
319
|
+
},
|
|
320
|
+
// "Thens" are steps which make assertions of the test subject
|
|
321
|
+
{
|
|
322
|
+
AreaPlusCircumference: [number];
|
|
323
|
+
circumference: [number];
|
|
324
|
+
getWidth: [number];
|
|
325
|
+
getHeight: [number];
|
|
326
|
+
area: [number];
|
|
327
|
+
prototype: [];
|
|
328
|
+
},
|
|
329
|
+
// "Checks" are similar to "Givens"
|
|
330
|
+
{
|
|
331
|
+
Default;
|
|
332
|
+
WidthOfOneAndHeightOfOne;
|
|
333
|
+
WidthAndHeightOf: [number, number];
|
|
334
|
+
}
|
|
335
|
+
>;
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
#### type M (optional)
|
|
339
|
+
|
|
340
|
+
this type describes the modifications to the shape of the "specification". It can be used to make your BDD tests DRYer but is not necessary
|
|
341
|
+
|
|
342
|
+
```ts
|
|
343
|
+
export type M = {
|
|
344
|
+
givens: {
|
|
345
|
+
[K in keyof O["givens"]]: (...Iw: O["givens"][K]) => Rectangle;
|
|
346
|
+
};
|
|
347
|
+
whens: {
|
|
348
|
+
[K in keyof O["whens"]]: (
|
|
349
|
+
...Iw: O["whens"][K]
|
|
350
|
+
) => (rectangle: Rectangle, utils: PM) => Rectangle;
|
|
351
|
+
};
|
|
352
|
+
thens: {
|
|
353
|
+
[K in keyof O["thens"]]: (
|
|
354
|
+
...Iw: O["thens"][K]
|
|
355
|
+
) => (rectangle: Rectangle, utils: PM) => Rectangle;
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
## Putting it all together
|
|
361
|
+
|
|
362
|
+
```ts
|
|
363
|
+
// Make sure you import the right runtime
|
|
364
|
+
import Testeranto from "testeranto/src/Pure";
|
|
365
|
+
|
|
366
|
+
import {
|
|
367
|
+
Ibdd_in,
|
|
368
|
+
Ibdd_out,
|
|
369
|
+
ITestImplementation,
|
|
370
|
+
ITestSpecification,
|
|
371
|
+
ITestInterface,
|
|
372
|
+
} from "testeranto/src/CoreTypes";
|
|
373
|
+
|
|
374
|
+
// The test subject
|
|
375
|
+
class Rectangle {
|
|
376
|
+
constructor(public width: number, public height: number) {}
|
|
377
|
+
|
|
378
|
+
setWidth(w: number) {
|
|
379
|
+
this.width = w;
|
|
380
|
+
}
|
|
381
|
+
setHeight(h: number) {
|
|
382
|
+
this.height = h;
|
|
383
|
+
}
|
|
384
|
+
getArea() {
|
|
385
|
+
return this.width * this.height;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
////////////////////////////////////////////////////////
|
|
390
|
+
|
|
391
|
+
// TODO this is inaccurate
|
|
392
|
+
type I = Ibdd_in<
|
|
393
|
+
null,
|
|
394
|
+
null,
|
|
395
|
+
Rectangle,
|
|
396
|
+
Rectangle,
|
|
397
|
+
Rectangle,
|
|
398
|
+
(...x) => (rectangle: Rectangle, utils: IPM) => Rectangle,
|
|
399
|
+
(rectangle: Rectangle, utils: IPM) => Rectangle
|
|
400
|
+
>;
|
|
401
|
+
|
|
402
|
+
type O = Ibdd_out<
|
|
403
|
+
// Suites
|
|
404
|
+
{
|
|
405
|
+
Default: [string];
|
|
406
|
+
},
|
|
407
|
+
// Givens
|
|
408
|
+
{
|
|
409
|
+
Default;
|
|
410
|
+
WidthOfOneAndHeightOfOne;
|
|
411
|
+
WidthAndHeightOf: [number, number];
|
|
412
|
+
},
|
|
413
|
+
// Whens
|
|
414
|
+
{
|
|
415
|
+
HeightIsPubliclySetTo: [number];
|
|
416
|
+
WidthIsPubliclySetTo: [number];
|
|
417
|
+
setWidth: [number];
|
|
418
|
+
setHeight: [number];
|
|
419
|
+
},
|
|
420
|
+
// Thens
|
|
421
|
+
{
|
|
422
|
+
AreaPlusCircumference: [number];
|
|
423
|
+
circumference: [number];
|
|
424
|
+
getWidth: [number];
|
|
425
|
+
getHeight: [number];
|
|
426
|
+
area: [number];
|
|
427
|
+
prototype: [];
|
|
428
|
+
},
|
|
429
|
+
// Checks are broken right now, ignore them
|
|
430
|
+
{
|
|
431
|
+
Default;
|
|
432
|
+
WidthOfOneAndHeightOfOne;
|
|
433
|
+
WidthAndHeightOf: [number, number];
|
|
434
|
+
}
|
|
435
|
+
>;
|
|
436
|
+
|
|
437
|
+
type M = {
|
|
438
|
+
givens: {
|
|
439
|
+
[K in keyof O["givens"]]: (...Iw: O["givens"][K]) => Rectangle;
|
|
440
|
+
};
|
|
441
|
+
whens: {
|
|
442
|
+
[K in keyof O["whens"]]: (
|
|
443
|
+
...Iw: O["whens"][K]
|
|
444
|
+
) => (rectangle: Rectangle, utils: PM) => Rectangle;
|
|
445
|
+
};
|
|
446
|
+
thens: {
|
|
447
|
+
[K in keyof O["thens"]]: (
|
|
448
|
+
...Iw: O["thens"][K]
|
|
449
|
+
) => (rectangle: Rectangle, utils: PM) => Rectangle;
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
const testInterface: ITestInterface<
|
|
454
|
+
I extends Ibdd_in,
|
|
455
|
+
> = {
|
|
456
|
+
beforeEach: async (subject, i) => {
|
|
457
|
+
return i();
|
|
458
|
+
},
|
|
459
|
+
andWhen: async function (s, whenCB, tr, utils) {
|
|
460
|
+
return whenCB(s, utils);
|
|
461
|
+
},
|
|
462
|
+
butThen: async (s, t, tr, pm) => {
|
|
463
|
+
return t(s, pm);
|
|
464
|
+
},
|
|
465
|
+
afterEach: (z) => {
|
|
466
|
+
return z;
|
|
467
|
+
},
|
|
468
|
+
afterAll: () => {},
|
|
469
|
+
assertThis: (x: any, y) => {},
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
const testImplementation: ITestImplementation<
|
|
473
|
+
I extends Ibdd_in,
|
|
474
|
+
O extends Ibdd_out,
|
|
475
|
+
M
|
|
476
|
+
> = {
|
|
477
|
+
suites: {
|
|
478
|
+
Default: "a default suite",
|
|
479
|
+
},
|
|
480
|
+
|
|
481
|
+
givens: {
|
|
482
|
+
Default: () => new Rectangle(2, 2),
|
|
483
|
+
WidthAndHeightOf: (width, height) => new Rectangle(width, height),
|
|
484
|
+
},
|
|
485
|
+
|
|
486
|
+
whens: {
|
|
487
|
+
setWidth: (width: number) => (rectangle) => {
|
|
488
|
+
rectangle.setWidth(width);
|
|
489
|
+
return rectangle;
|
|
490
|
+
},
|
|
491
|
+
setHeight: (height: number) => (rectangle) => {
|
|
492
|
+
rectangle.setHeight(height);
|
|
493
|
+
return rectangle;
|
|
494
|
+
},
|
|
495
|
+
},
|
|
496
|
+
|
|
497
|
+
thens: {
|
|
498
|
+
getWidth: (expectedWidth) => (rectangle) => {
|
|
499
|
+
assert.equal(rectangle.getWidth(), expectedWidth);
|
|
500
|
+
return rectangle;
|
|
501
|
+
},
|
|
502
|
+
getHeight: (expectedHeight) => (rectangle) => {
|
|
503
|
+
assert.equal(rectangle.getHeight(), expectedHeight);
|
|
504
|
+
return rectangle;
|
|
505
|
+
},
|
|
506
|
+
area: (area) => (rectangle) => {
|
|
507
|
+
assert.equal(rectangle.area(), area);
|
|
508
|
+
return rectangle;
|
|
509
|
+
},
|
|
510
|
+
circumference: (circumference: number) => (rectangle: Rectangle) => {
|
|
511
|
+
assert.equal(rectangle.circumference(), circumference);
|
|
512
|
+
return rectangle;
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
|
|
516
|
+
checks: {
|
|
517
|
+
Default: () => new Rectangle(2, 2),
|
|
518
|
+
},
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
const testSpecification: ITestSpecification<
|
|
522
|
+
I extends Ibdd_in,
|
|
523
|
+
O extends Ibdd_out,
|
|
524
|
+
> = (
|
|
525
|
+
Suite,
|
|
526
|
+
Given,
|
|
527
|
+
When,
|
|
528
|
+
Then,
|
|
529
|
+
Check
|
|
530
|
+
) => {
|
|
531
|
+
return [
|
|
532
|
+
Suite.Default(
|
|
533
|
+
"Testing the Rectangle class",
|
|
534
|
+
{
|
|
535
|
+
test0: Given.Default(
|
|
536
|
+
["https://api.github.com/repos/adamwong246/testeranto/issues/8"],
|
|
537
|
+
[],
|
|
538
|
+
[Then.getWidth(2)]
|
|
539
|
+
),
|
|
540
|
+
test1: Given.Default(
|
|
541
|
+
[`Rectangles have width and height.`],
|
|
542
|
+
[When.setWidth(4), When.setHeight(5)],
|
|
543
|
+
[Then.getWidth(4), Then.getHeight(5), Then.area(20)]
|
|
544
|
+
),
|
|
545
|
+
},
|
|
546
|
+
|
|
547
|
+
// Ignore this for now
|
|
548
|
+
[]
|
|
549
|
+
),
|
|
550
|
+
];
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
// 1 function will launch the test
|
|
554
|
+
export default Testeranto<
|
|
555
|
+
I extends Ibdd_in,
|
|
556
|
+
O extends Ibdd_out,
|
|
557
|
+
M
|
|
558
|
+
>(
|
|
559
|
+
Rectangle.prototype,
|
|
560
|
+
testSpecification,
|
|
561
|
+
testSmplementation,
|
|
562
|
+
testSnterface
|
|
563
|
+
);
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
```
|
package/docs/style.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Official Color Palette
|
|
2
|
+
|
|
3
|
+
<div class="color-sampler">
|
|
4
|
+
<div class="color-group">
|
|
5
|
+
<h2>Primary Colors</h2>
|
|
6
|
+
<div class="color-row">
|
|
7
|
+
<div class="color-swatch" style="background-color: #ff6b6b; color: white;">
|
|
8
|
+
<span class="hex">#ff6b6b</span>
|
|
9
|
+
<span class="name">Coral Blush</span>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="color-swatch" style="background-color: #4ecdc4; color: white;">
|
|
12
|
+
<span class="hex">#4ecdc4</span>
|
|
13
|
+
<span class="name">Mint Teal</span>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="color-swatch" style="background-color: #E6B422; color: #292f36;">
|
|
16
|
+
<span class="hex">#E6B422</span>
|
|
17
|
+
<span class="name">Muted Gold</span>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="color-swatch" style="background-color: #00B4A0; color: white;">
|
|
20
|
+
<span class="hex">#00B4A0</span>
|
|
21
|
+
<span class="name">Deep Teal</span>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="color-group">
|
|
27
|
+
<h2>Text & Background</h2>
|
|
28
|
+
<div class="color-row">
|
|
29
|
+
<div class="color-swatch" style="background-color: #292f36; color: white;">
|
|
30
|
+
<span class="hex">#292f36</span>
|
|
31
|
+
<span class="name">Midnight Ink</span>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="color-swatch" style="background-color: #f1faee; color: #292f36;">
|
|
34
|
+
<span class="hex">#f1faee</span>
|
|
35
|
+
<span class="name">Pearl Mist</span>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div class="color-group">
|
|
41
|
+
<h2>Gradient Colors</h2>
|
|
42
|
+
<div class="color-row">
|
|
43
|
+
<div class="color-swatch" style="background-color: #0a0f1f; color: white;">
|
|
44
|
+
<span class="hex">#0a0f1f</span>
|
|
45
|
+
<span class="name">Deep Cosmos</span>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="color-swatch" style="background-color: #1a2b50; color: white;">
|
|
48
|
+
<span class="hex">#1a2b50</span>
|
|
49
|
+
<span class="name">Twilight Navy</span>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="color-swatch" style="background-color: #B07D85; color: white;">
|
|
52
|
+
<span class="hex">#B07D85</span>
|
|
53
|
+
<span class="name">Muted Rose</span>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="color-swatch" style="background-color: #7fb3d5; color: white;">
|
|
56
|
+
<span class="hex">#7fb3d5</span>
|
|
57
|
+
<span class="name">Sky Whisper</span>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<style>
|
|
64
|
+
.color-sampler {
|
|
65
|
+
margin: 2rem 0;
|
|
66
|
+
max-width: 800px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.color-group {
|
|
70
|
+
margin-bottom: 2rem;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.color-row {
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-wrap: wrap;
|
|
76
|
+
gap: 1rem;
|
|
77
|
+
margin-top: 1rem;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.color-swatch {
|
|
81
|
+
flex: 1;
|
|
82
|
+
min-width: 150px;
|
|
83
|
+
padding: 1rem;
|
|
84
|
+
border-radius: 8px;
|
|
85
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
height: 100px;
|
|
91
|
+
transition: transform 0.2s ease;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.color-swatch:hover {
|
|
95
|
+
transform: translateY(-5px);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.hex {
|
|
99
|
+
font-family: monospace;
|
|
100
|
+
font-weight: bold;
|
|
101
|
+
font-size: 1.1rem;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.name {
|
|
105
|
+
font-style: italic;
|
|
106
|
+
margin-top: 0.5rem;
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
109
|
+
|
|
110
|
+
## Usage Guidelines
|
|
111
|
+
|
|
112
|
+
- Use "Coral Blush" for primary actions and important elements
|
|
113
|
+
- "Mint Teal" works well for secondary actions and accents
|
|
114
|
+
- The gradient colors create the sunrise effect from dark to light
|
|
115
|
+
- "Muted Gold" and "Deep Teal" provide sophisticated accents
|
|
116
|
+
- "Midnight Ink" and "Pearl Mist" ensure good text contrast
|