|
1 | 1 | // Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. |
2 | 2 |
|
3 | | -// This package needs nothing beyond the shared preset; see its header. |
4 | | -export { default } from '../../../vitest.preset.mts'; |
| 3 | +import { defineConfig } from 'vitest/config'; |
| 4 | +import path from 'node:path'; |
| 5 | +import { fileURLToPath } from 'node:url'; |
| 6 | + |
| 7 | +const HERE = path.dirname(fileURLToPath(import.meta.url)); |
| 8 | + |
| 9 | +export default defineConfig({ |
| 10 | + test: { |
| 11 | + // A late console.* must not redden a green suite (#10374): vitest's worker |
| 12 | + // forwards console output over RPC and discards the promise, and a write |
| 13 | + // landing after teardown's rpcDone() snapshot is rejected into an unhandled |
| 14 | + // error — a fully green run that exits 1. Disarming removes the mechanism. |
| 15 | + // Mechanism + measured costs: examples/app-showcase/vitest.config.ts. |
| 16 | + // Enforced repo-wide by scripts/check-console-intercept-disarm.mjs. |
| 17 | + disableConsoleIntercept: true, |
| 18 | + // `mcp-include-credential-scope.test.ts` boots the credential store on a |
| 19 | + // real ObjectQL, whose registry logs one line per registered item; quiet |
| 20 | + // it through the engine's own `OS_REGISTRY_LOG` seam, not a change to its |
| 21 | + // shipped default (scripts/check-registry-log-declared.mjs). |
| 22 | + env: { OS_REGISTRY_LOG: 'warn' }, |
| 23 | + }, |
| 24 | + resolve: { |
| 25 | + // The store-backed test reads these three from SOURCE, so its verdict is |
| 26 | + // about the checkout, never about whatever `dist/` was last built |
| 27 | + // (`pnpm check:test-source-alias`). Anchored, array form: a bare string |
| 28 | + // key matches by prefix and would swallow the subpaths. |
| 29 | + alias: [ |
| 30 | + { find: /^@objectstack\/driver-sql$/, replacement: path.resolve(HERE, '../../drivers/driver-sql/src/index.ts') }, |
| 31 | + { find: /^@objectstack\/objectql$/, replacement: path.resolve(HERE, '../../objectql/src/index.ts') }, |
| 32 | + { find: /^@objectstack\/platform-objects$/, replacement: path.resolve(HERE, '../../platform-objects/src/index.ts') }, |
| 33 | + ], |
| 34 | + }, |
| 35 | +}); |
0 commit comments