-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrstest.unit.config.ts
More file actions
53 lines (51 loc) · 2.01 KB
/
Copy pathrstest.unit.config.ts
File metadata and controls
53 lines (51 loc) · 2.01 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { defineConfig } from '@rstest/core';
import {
fixtureProjectTestFiles,
integrationTestFiles,
mcpConformanceTestFiles,
moduleMockTestFiles,
nativeHostTestFiles,
packedReleaseOnlyTestFiles,
packedTestFiles,
projectionTestFiles,
routeUnitTestFiles,
templateTestFiles,
workspaceTestFileGlob,
} from './rstest.integration-tests.ts';
import { poolTimeouts, workspaceGlobalSetup, workspaceSetupFiles } from './rstest.pools.ts';
import { withAgentBundleRslibConfig } from './rstest.rslib.ts';
/**
* No builds, no long-lived processes: files that run the compiler (`build()`
* from src/api, `compileMcpApps`) belong in integrationTestFiles; short-lived
* children a test spawns and reaps itself (a `node -e`, `git --version`, a
* one-shot Flight render worker) are fine here. Safe on parallel workers with
* a shared module cache. `pnpm test` runs this before the integration config.
*/
export default defineConfig({
extends: withAgentBundleRslibConfig(),
globalSetup: [...workspaceGlobalSetup],
include: [workspaceTestFileGlob],
exclude: [
...fixtureProjectTestFiles,
...integrationTestFiles,
...mcpConformanceTestFiles,
...moduleMockTestFiles,
...nativeHostTestFiles,
// Packs and installs like packedTestFiles, and is release-boundary-only:
// `test:packed:release` owns it, not the build-free per-PR pool.
...packedReleaseOnlyTestFiles,
...packedTestFiles,
...projectionTestFiles,
...routeUnitTestFiles,
...templateTestFiles,
],
setupFiles: [...workspaceSetupFiles],
// Unit files construct per-test services; logs-real.e2e is not in this pool.
isolate: false,
// The slowest unit cases build a TypeScript program in-process
// (inspect-state.test.ts: 2.3–4.5 s per case under load, and a 5 s-default
// timeout in 1 of 3 audited runs — #576). 15 s is >3× that; the runCli
// journeys that legitimately take longer (runtime-client-surface-proxy,
// eval-native-mount) carry their own per-test timeouts, which win.
...poolTimeouts(15_000),
});