-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathvitest.config.ts
More file actions
37 lines (35 loc) · 1.91 KB
/
Copy pathvitest.config.ts
File metadata and controls
37 lines (35 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
import { defineConfig } from 'vitest/config';
import path from 'node:path';
export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
},
resolve: {
// `action-predicate-sparse-face.test.ts` (#8990) drives this app's row
// action predicate through the CEL engine itself, because the whole point
// of that pin is what the ENGINE answers on a sparse list row — a fault
// versus a considered `false`, which are the same pixel to the user.
// Unaliased, `@objectstack/formula` resolves through the workspace link to
// `dist/` — a build artifact — so the verdict would be a function of build
// state rather than of the source in this checkout. The loud half (a
// missing export) is the mild one; a dist merely BEHIND runs the suite
// GREEN against the engine's OLD null/absence semantics, which is exactly
// the behaviour these assertions exist to pin. `pnpm check:test-source-alias`
// is the gate.
//
// ANCHORED regex, array form, deliberately: a bare string `find` matches by
// PREFIX, so with a FILE replacement it would also swallow any subpath and
// resolve it to `…/formula/src/index.ts/<sub>` — `ENOTDIR` at run time,
// from a config that reads as correct.
alias: [
{ find: /^@objectstack\/formula$/, replacement: path.resolve(__dirname, '../../packages/formula/src/index.ts') },
],
},
});