@vibe2founder/tests2dialects 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/bun.lock +22 -0
  3. package/bunfig.toml +2 -0
  4. package/critica.md +77 -0
  5. package/docs/4-ideias.md +66 -0
  6. package/docs/api-api.md +93 -0
  7. package/docs/api-imperativo.md +125 -0
  8. package/docs/api-matematico.md +145 -0
  9. package/docs/api-narrativo.md +181 -0
  10. package/docs/guia-rapido.md +189 -0
  11. package/docs/whitepaper.md +21 -0
  12. package/examples/imperative.spec.ts +58 -0
  13. package/examples/math.spec.ts +52 -0
  14. package/examples/narrative.spec.ts +61 -0
  15. package/examples/polyglot-shopping-cart.spec.ts +212 -0
  16. package/examples/sanity.spec.ts +54 -0
  17. package/examples/showcase-api.spec.ts +70 -0
  18. package/examples/test-api.ts +36 -0
  19. package/infograficos/detalhado.png +0 -0
  20. package/infograficos/mobile.png +0 -0
  21. package/infograficos/normal.png +0 -0
  22. package/landing-page/README.md +38 -0
  23. package/landing-page/bun.lock +609 -0
  24. package/landing-page/eslint.config.js +23 -0
  25. package/landing-page/index.html +17 -0
  26. package/landing-page/package-lock.json +2962 -0
  27. package/landing-page/package.json +34 -0
  28. package/landing-page/postcss.config.js +6 -0
  29. package/landing-page/public/vite.svg +1 -0
  30. package/landing-page/src/App.tsx +358 -0
  31. package/landing-page/src/assets/react.svg +1 -0
  32. package/landing-page/src/index.css +34 -0
  33. package/landing-page/src/main.tsx +10 -0
  34. package/landing-page/tailwind.config.js +59 -0
  35. package/landing-page/tsconfig.app.json +28 -0
  36. package/landing-page/tsconfig.json +7 -0
  37. package/landing-page/tsconfig.node.json +26 -0
  38. package/landing-page/vite.config.ts +7 -0
  39. package/logo.png +0 -0
  40. package/output.log +60 -0
  41. package/package.json +36 -0
  42. package/packages/api-test-dialect/README.md +30 -0
  43. package/packages/api-test-dialect/index.ts +132 -0
  44. package/packages/api-test-dialect/openapi.json +64 -0
  45. package/packages/reqify/README.md +33 -0
  46. package/packages/reqify/index.ts +48 -0
  47. package/podcast/O_Matem/303/241tico,_o_Narrador_e_o_Engenheiro.json +0 -0
  48. package/podcast/O_Matem/303/241tico,_o_Narrador_e_o_Engenheiro.md +0 -0
  49. package/podcast/critica-Dialetos_de_teste__inova/303/247/303/243o_ou_fragmenta/303/247/303/243o_.json +0 -0
  50. package/podcast/critica-Dialetos_de_teste__inova/303/247/303/243o_ou_fragmenta/303/247/303/243o_.md +0 -0
  51. package/podcast/critica-Unificar_filosofia_e_pr/303/241tica_na_documenta/303/247/303/243o_(7_words__covers_t.md +1 -0
  52. package/podcast/critica-Unificar_filosofia_e_pr/303/241tica_na_documenta/303/247/303/243o__7_words__covers_t.ogg +0 -0
  53. package/podcast/critica2-Sil/303/252ncio_estrat/303/251gico_e_sobrecarga_em_READMEs.ogg +0 -0
  54. package/podcast/critica2.json +3191 -0
  55. package/podcast/critica2.md +1 -0
  56. package/podcast/debate-Dialetos_de_teste__inova/303/247/303/243o_ou_fragmenta/303/247/303/243o_.json +0 -0
  57. package/podcast/debate-Dialetos_de_teste__inova/303/247/303/243o_ou_fragmenta/303/247/303/243o_.md +0 -0
  58. package/readme.md +58 -0
  59. package/reports/01-01-2026_00-45.md +40 -0
  60. package/reports/01-01-2026_02-30.md +37 -0
  61. package/reports/03-02-2026_10-55.md +8 -0
  62. package/reports/03-02-2026_11-45.md +13 -0
  63. package/reports/03-02-2026_11-50.md +10 -0
  64. package/reports/26-01-2026_16-25.md +31 -0
  65. package/reports/26-01-2026_19-20.md +27 -0
  66. package/reports/31-12-2025_22-35.md +25 -0
  67. package/reports/31-12-2025_22-45.md +15 -0
  68. package/slides/Dialetos_de_Teste_Um_Executor_M/303/272ltiplos_Vocabul/303/241rios.pdf +0 -0
  69. package/src/cli.ts +445 -0
  70. package/src/index.ts +539 -0
  71. package/tabela.html +350 -0
  72. package/tsconfig.json +22 -0
  73. package/types/api-types.ts +11 -0
  74. package/www/index.html +1344 -0
package/tabela.html ADDED
@@ -0,0 +1,350 @@
1
+ <!DOCTYPE html>
2
+ <html lang="pt-BR">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>tests2dialects Testing Framework - Rosetta Stone</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link
9
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=JetBrains+Mono:wght@400;700&display=swap"
10
+ rel="stylesheet"
11
+ />
12
+ <style>
13
+ body {
14
+ font-family: "Inter", sans-serif;
15
+ }
16
+ .mono {
17
+ font-family: "JetBrains Mono", monospace;
18
+ }
19
+ </style>
20
+ </head>
21
+ <body class="bg-slate-50 text-slate-800 p-4 md:p-8">
22
+ <div class="max-w-7xl mx-auto">
23
+ <header class="mb-10 text-center">
24
+ <h1 class="text-3xl md:text-4xl font-bold text-slate-900 mb-2">
25
+ tests2dialects Testing Framework
26
+ </h1>
27
+ <p class="text-lg text-slate-600">Matriz de Tradução Semântica</p>
28
+ </header>
29
+
30
+ <!-- Tabela Principal -->
31
+ <div class="overflow-x-auto shadow-xl rounded-lg border border-slate-200">
32
+ <table class="w-full text-left text-sm bg-white">
33
+ <thead class="bg-slate-900 text-slate-50 uppercase tracking-wider">
34
+ <tr>
35
+ <th class="px-6 py-4 font-bold border-r border-slate-700 w-1/5">
36
+ Conceito / Jest
37
+ </th>
38
+ <th
39
+ class="px-6 py-4 font-bold bg-indigo-900 border-r border-indigo-800 w-1/4"
40
+ >
41
+ <div class="flex items-center gap-2">
42
+ <span>📐 Matemático</span>
43
+ <span class="text-xs opacity-75 font-normal normal-case"
44
+ >(Lógico/Funcional)</span
45
+ >
46
+ </div>
47
+ </th>
48
+ <th
49
+ class="px-6 py-4 font-bold bg-emerald-900 border-r border-emerald-800 w-1/4"
50
+ >
51
+ <div class="flex items-center gap-2">
52
+ <span>📖 Narrativo</span>
53
+ <span class="text-xs opacity-75 font-normal normal-case"
54
+ >(BDD/Humano)</span
55
+ >
56
+ </div>
57
+ </th>
58
+ <th class="px-6 py-4 font-bold bg-amber-900 w-1/4">
59
+ <div class="flex items-center gap-2">
60
+ <span>🛡️ Imperativo</span>
61
+ <span class="text-xs opacity-75 font-normal normal-case"
62
+ >(Técnico/Contrato)</span
63
+ >
64
+ </div>
65
+ </th>
66
+ </tr>
67
+ </thead>
68
+ <tbody class="divide-y divide-slate-200">
69
+ <!-- SEÇÃO: ESTRUTURA BÁSICA -->
70
+ <tr class="bg-slate-100">
71
+ <td
72
+ colspan="4"
73
+ class="px-6 py-2 font-bold text-xs text-slate-500 uppercase tracking-widest"
74
+ >
75
+ Estrutura & Execução
76
+ </td>
77
+ </tr>
78
+ <tr class="hover:bg-slate-50 transition-colors">
79
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
80
+ describe()
81
+ </td>
82
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">axiom()</td>
83
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
84
+ intend() / story()
85
+ </td>
86
+ <td class="px-6 py-4 text-amber-700 mono font-bold">
87
+ ensure() / suite()
88
+ </td>
89
+ </tr>
90
+ <tr class="hover:bg-slate-50 transition-colors">
91
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
92
+ it() / test()
93
+ </td>
94
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">
95
+ proof() / lemma()
96
+ </td>
97
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
98
+ detail() / scenario()
99
+ </td>
100
+ <td class="px-6 py-4 text-amber-700 mono font-bold">
101
+ check() / verify()
102
+ </td>
103
+ </tr>
104
+ <tr class="hover:bg-slate-50 transition-colors">
105
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
106
+ expect(x)
107
+ </td>
108
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">
109
+ implies(x)
110
+ </td>
111
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
112
+ to(x) / expect(x)
113
+ </td>
114
+ <td class="px-6 py-4 text-amber-700 mono font-bold">that(x)</td>
115
+ </tr>
116
+
117
+ <!-- SEÇÃO: MOCKS - CRIAÇÃO -->
118
+ <tr class="bg-slate-100">
119
+ <td
120
+ colspan="4"
121
+ class="px-6 py-2 font-bold text-xs text-slate-500 uppercase tracking-widest"
122
+ >
123
+ Criação de Mocks
124
+ </td>
125
+ </tr>
126
+ <tr class="hover:bg-slate-50 transition-colors">
127
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
128
+ jest.fn()
129
+ </td>
130
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">
131
+ arbitrary() / lambda()
132
+ </td>
133
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
134
+ dummy() / standIn()
135
+ </td>
136
+ <td class="px-6 py-4 text-amber-700 mono font-bold">
137
+ stub() / mock()
138
+ </td>
139
+ </tr>
140
+ <tr class="hover:bg-slate-50 transition-colors">
141
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
142
+ jest.spyOn()
143
+ </td>
144
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">
145
+ monitor()
146
+ </td>
147
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
148
+ watch() / shadow()
149
+ </td>
150
+ <td class="px-6 py-4 text-amber-700 mono font-bold">
151
+ inspect() / spy()
152
+ </td>
153
+ </tr>
154
+
155
+ <!-- SEÇÃO: MOCKS - COMPORTAMENTO -->
156
+ <tr class="bg-slate-100">
157
+ <td
158
+ colspan="4"
159
+ class="px-6 py-2 font-bold text-xs text-slate-500 uppercase tracking-widest"
160
+ >
161
+ Configuração de Mocks
162
+ </td>
163
+ </tr>
164
+ <tr class="hover:bg-slate-50 transition-colors">
165
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
166
+ mockReturnValue(v)
167
+ </td>
168
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">
169
+ yields(v) / mapsTo(v)
170
+ </td>
171
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
172
+ respondsWith(v)
173
+ </td>
174
+ <td class="px-6 py-4 text-amber-700 mono font-bold">
175
+ forceReturn(v)
176
+ </td>
177
+ </tr>
178
+ <tr class="hover:bg-slate-50 transition-colors">
179
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
180
+ mockResolvedValue(v)
181
+ </td>
182
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">
183
+ convergesTo(v)
184
+ </td>
185
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
186
+ eventuallyGives(v)
187
+ </td>
188
+ <td class="px-6 py-4 text-amber-700 mono font-bold">
189
+ resolveWith(v)
190
+ </td>
191
+ </tr>
192
+ <tr class="hover:bg-slate-50 transition-colors">
193
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
194
+ mockImplementation(fn)
195
+ </td>
196
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">
197
+ derive(fn)
198
+ </td>
199
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
200
+ actsLike(fn)
201
+ </td>
202
+ <td class="px-6 py-4 text-amber-700 mono font-bold">
203
+ executes(fn)
204
+ </td>
205
+ </tr>
206
+
207
+ <!-- SEÇÃO: MOCKS - ASSERÇÕES -->
208
+ <tr class="bg-slate-100">
209
+ <td
210
+ colspan="4"
211
+ class="px-6 py-2 font-bold text-xs text-slate-500 uppercase tracking-widest"
212
+ >
213
+ Validação de Chamadas
214
+ </td>
215
+ </tr>
216
+ <tr class="hover:bg-slate-50 transition-colors">
217
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
218
+ toHaveBeenCalled()
219
+ </td>
220
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">
221
+ .wasEvaluated()
222
+ </td>
223
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
224
+ .wasCalled()
225
+ </td>
226
+ <td class="px-6 py-4 text-amber-700 mono font-bold">
227
+ .triggered()
228
+ </td>
229
+ </tr>
230
+ <tr class="hover:bg-slate-50 transition-colors">
231
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
232
+ toHaveBeenCalledWith(x)
233
+ </td>
234
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">
235
+ .appliedTo(x)
236
+ </td>
237
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
238
+ .received(x)
239
+ </td>
240
+ <td class="px-6 py-4 text-amber-700 mono font-bold">
241
+ .calledWith(x)
242
+ </td>
243
+ </tr>
244
+ <tr class="hover:bg-slate-50 transition-colors">
245
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
246
+ toHaveBeenCalledTimes(n)
247
+ </td>
248
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">
249
+ .evaluated(n).times
250
+ </td>
251
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
252
+ .called(n).times
253
+ </td>
254
+ <td class="px-6 py-4 text-amber-700 mono font-bold">
255
+ .triggeredCount(n)
256
+ </td>
257
+ </tr>
258
+
259
+ <!-- SEÇÃO: LIFECYCLE -->
260
+ <tr class="bg-slate-100">
261
+ <td
262
+ colspan="4"
263
+ class="px-6 py-2 font-bold text-xs text-slate-500 uppercase tracking-widest"
264
+ >
265
+ Ciclo de Vida (Lifecycle)
266
+ </td>
267
+ </tr>
268
+ <tr class="hover:bg-slate-50 transition-colors">
269
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
270
+ beforeAll()
271
+ </td>
272
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">
273
+ postulate() / setup()
274
+ </td>
275
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
276
+ background()
277
+ </td>
278
+ <td class="px-6 py-4 text-amber-700 mono font-bold">initAll()</td>
279
+ </tr>
280
+ <tr class="hover:bg-slate-50 transition-colors">
281
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
282
+ afterAll()
283
+ </td>
284
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">
285
+ conclude()
286
+ </td>
287
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
288
+ cleanup()
289
+ </td>
290
+ <td class="px-6 py-4 text-amber-700 mono font-bold">
291
+ disposeAll()
292
+ </td>
293
+ </tr>
294
+ <tr class="hover:bg-slate-50 transition-colors">
295
+ <td class="px-6 py-4 font-semibold text-slate-700 mono">
296
+ beforeEach()
297
+ </td>
298
+ <td class="px-6 py-4 text-indigo-700 mono font-bold">given()</td>
299
+ <td class="px-6 py-4 text-emerald-700 mono font-bold">
300
+ before()
301
+ </td>
302
+ <td class="px-6 py-4 text-amber-700 mono font-bold">reset()</td>
303
+ </tr>
304
+ </tbody>
305
+ </table>
306
+ </div>
307
+
308
+ <div class="mt-8 grid grid-cols-1 md:grid-cols-3 gap-6">
309
+ <div class="bg-indigo-50 p-6 rounded-lg border border-indigo-100">
310
+ <h3 class="font-bold text-indigo-900 mb-2">Exemplo Matemático</h3>
311
+ <pre class="text-xs text-indigo-800 mono overflow-x-auto">
312
+ const f = arbitrary();
313
+ f.yields(10);
314
+
315
+ proof("f map", () => {
316
+ f();
317
+ implies(f).wasEvaluated();
318
+ });</pre
319
+ >
320
+ </div>
321
+
322
+ <div class="bg-emerald-50 p-6 rounded-lg border border-emerald-100">
323
+ <h3 class="font-bold text-emerald-900 mb-2">Exemplo Narrativo</h3>
324
+ <pre class="text-xs text-emerald-800 mono overflow-x-auto">
325
+ const login = standIn();
326
+ login.respondsWith(true);
327
+
328
+ scenario("Login", () => {
329
+ login();
330
+ to(login).wasCalled();
331
+ });</pre
332
+ >
333
+ </div>
334
+
335
+ <div class="bg-amber-50 p-6 rounded-lg border border-amber-100">
336
+ <h3 class="font-bold text-amber-900 mb-2">Exemplo Imperativo</h3>
337
+ <pre class="text-xs text-amber-800 mono overflow-x-auto">
338
+ const api = stub();
339
+ api.forceReturn(200);
340
+
341
+ check("API status", () => {
342
+ api();
343
+ that(api).triggered();
344
+ });</pre
345
+ >
346
+ </div>
347
+ </div>
348
+ </div>
349
+ </body>
350
+ </html>
package/tsconfig.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "lib": ["ES2022", "dom"],
7
+ "types": ["node"],
8
+ "outDir": "./dist",
9
+ "strict": true,
10
+ "noImplicitAny": true,
11
+ "esModuleInterop": true,
12
+ "skipLibCheck": true,
13
+ "forceConsistentCasingInFileNames": true,
14
+ "declaration": true,
15
+ "baseUrl": ".",
16
+ "paths": {
17
+ "@vibe2founder/tests2dialects": ["./src/index.ts"]
18
+ }
19
+ },
20
+ "include": ["src/**/*", "examples/**/*", "packages/**/*", "types/**/*"],
21
+ "exclude": ["node_modules"]
22
+ }
@@ -0,0 +1,11 @@
1
+ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2
+
3
+ export type HttpStatusCode = number; // Nominal naming implies keeping it in types folder
4
+
5
+ export type ApiUrl = string;
6
+
7
+ export type JsonBody = Record<string, unknown> | unknown[];
8
+
9
+ export type TestName = string;
10
+
11
+ export type SchemaDefinition = Record<string, unknown>;