@t0.labs/daxta 0.4.20 → 0.4.22

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/README.md CHANGED
@@ -12,7 +12,7 @@ DAxTA docs — recorded request, response, Try-it
12
12
  | After tests | On the app |
13
13
  | ------------------------------------- | -------------------------------------------------------- |
14
14
  | OpenAPI + HTML from real hits | `/docs` on the same port as Nest |
15
- | Success / validation / auth scenarios | Send + Copy cURL from recorded calls |
15
+ | POSITIVE / INVALID / SEMANTIC / AUTH scenarios | Example picker uses the `when` clause only |
16
16
  | DTO field map (required vs optional) | `DAXTA_DOCS=true|false` gate (like Swagger’s prod check) |
17
17
 
18
18
 
@@ -192,9 +192,16 @@ Suggested titles (method + path, never `:id` as a name):
192
192
 
193
193
  Old `{path} [METHOD] (integration)` still parses. `daxta titles --yes` rewrites to the new form.
194
194
 
195
- - `it()`: `{outcome} when {condition}` — e.g. `creates mock tbs when payload is valid`
196
- - `daxta titles` / `--yes` / `y` / `a` as before
197
- - **Before tests:** install, `daxta test`, and Jest `globalSetup` (TTY). `--yes` / `CI=1` skip questions.
195
+ `it()` keeps a unique sentence; `/docs` examples take the part after `when` (groups match describe: POSITIVE CASES, SEMANTIC ERROR CASES, …):
196
+
197
+ | Layer | Rule | Example |
198
+ | --- | --- | --- |
199
+ | Positive `it()` | `{creates\|returns\|updates\|…} … when {diff}` | `creates mock tbs TRNC record when cyprus payload shape` |
200
+ | Error `it()` | `returns error when {diff}` | `returns error when tax id already exists in mock TBS` |
201
+ | Invalid fields | leave interpolated | `` `${property} - should not be ${description}` `` |
202
+ | Docs / Postman | `{status} — {after when}` | `201 — cyprus payload shape` |
203
+
204
+ `--yes` / `a` rewrite **this case’s own text**, not one shared template. Interpolated `it(\`${…}\`)` is never rewritten.
198
205
 
199
206
  ```bash
200
207
  daxta titles # interactive (y = this recommended, a = all remaining)