@palbase/backend 40.0.1 → 40.0.3
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/package.json
CHANGED
package/template/AGENTS.md
CHANGED
|
@@ -187,10 +187,10 @@ Relative test imports need the extension (`./note.service.ts`); the scaffold all
|
|
|
187
187
|
`npm test` answers "is the logic right". It is not the deploy's own validation —
|
|
188
188
|
decorators, return types, SDK major — which answers "would this ship".
|
|
189
189
|
|
|
190
|
-
**The deploy runs your suites too** — against the CANDIDATE on a throwaway
|
|
191
|
-
before anything goes live; one failure and the candidate is discarded.
|
|
192
|
-
`
|
|
193
|
-
module's routes over real HTTP; its signed-in half needs a fixture user `author` (`palbase test-user templates set --file`).
|
|
190
|
+
**The deploy runs your `*.e2e.test.*` suites too** — against the CANDIDATE on a throwaway
|
|
191
|
+
database, before anything goes live; one failure and the candidate is discarded. Unit tests
|
|
192
|
+
beside your code (`note.service.test.ts`) are NOT sent: they need no stack, and a whole CI corpus inside the stack's memory envelope is how a deploy dies instead of answering.
|
|
193
|
+
`modules/notes/notes.e2e.test.ts` is the deploy kind: `api` (`@palbase/backend/test`) calls the module's routes over real HTTP; its signed-in half needs a fixture user `author` (`palbase test-user templates set --file`).
|
|
194
194
|
|
|
195
195
|
## Commands
|
|
196
196
|
|
|
@@ -10,10 +10,16 @@ import { NoteSchema } from "./dto/create.ts";
|
|
|
10
10
|
// below crosses the real stack — routing, the zod boundary, the auth rail,
|
|
11
11
|
// row-level security — exactly as a shipped app's call does.
|
|
12
12
|
//
|
|
13
|
-
//
|
|
14
|
-
// against the CANDIDATE release, on a throwaway database,
|
|
15
|
-
// live. One failure and the candidate is discarded: the
|
|
16
|
-
// serving. So a test here is a gate, and it is worth
|
|
13
|
+
// A test named `*.e2e.test.ts` — anywhere in the project — travels with a push,
|
|
14
|
+
// and the deploy runs it against the CANDIDATE release, on a throwaway database,
|
|
15
|
+
// before anything goes live. One failure and the candidate is discarded: the
|
|
16
|
+
// release you have keeps serving. So a test here is a gate, and it is worth
|
|
17
|
+
// writing one per module.
|
|
18
|
+
//
|
|
19
|
+
// Your UNIT tests stay home: `note.service.test.ts` beside this file measures
|
|
20
|
+
// logic against a stand-in and runs with `palbase test --unit`. A deploy has no
|
|
21
|
+
// use for it, and a large suite of them has a cost — it would run inside the
|
|
22
|
+
// stack's own memory envelope.
|
|
17
23
|
//
|
|
18
24
|
// `api` is configured by whoever runs it — the deploy, or `palbase test --live`
|
|
19
25
|
// against your own stack — and `testRun` says what that run was given. With no
|