@isentinel/jest-roblox 0.2.7 → 0.3.1

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/dist/index.d.mts CHANGED
@@ -1,51 +1,268 @@
1
- import { A as defineConfig, C as FormatterEntry, D as ROOT_ONLY_KEYS, E as ProjectTestConfig, M as Argv, O as ResolvedConfig, S as DisplayName, T as ProjectEntry, _ as ResolvedProjectConfig, a as formatExecuteOutput, b as ConfigInput, c as Backend, d as extractJsonFromOutput, f as parseJestOutput, g as TestStatus, h as TestFileResult, i as execute, j as defineProject, k as SnapshotFormatOptions, l as BackendOptions, m as TestCaseResult, n as ExecuteResult, o as TimingResult, p as JestResult, r as FormatOutputOptions, s as SourceMapper, t as ExecuteOptions, u as BackendResult, v as CliOptions, w as InlineProjectConfig, x as DEFAULT_CONFIG, y as Config } from "./executor-COuwZJJX.mjs";
1
+ import { _ as SnapshotFormatOptions, a as DisplayName, b as defineProject, c as GlobalTestConfig, d as ProjectEntry, f as ProjectTestConfig, g as SharedTestConfig, h as SHARED_TEST_KEYS, i as DEFAULT_CONFIG, l as InlineProjectConfig, m as ResolvedConfig, n as Config, o as FormatterEntry, p as ROOT_CLI_KEYS, r as ConfigInput, s as GLOBAL_TEST_KEYS, t as CliOptions, u as JEST_ARGV_EXCLUDED_KEYS, v as WorkspaceConfig, y as defineConfig } from "./schema-BpjBo-Aw.mjs";
2
+ import { type } from "arktype";
2
3
  import { WebSocket, WebSocketServer } from "ws";
3
- import buffer from "node:buffer";
4
+ import { StorageClient } from "@bedrock-rbx/ocale/storage";
4
5
 
5
- //#region packages/roblox-runner/dist/index.d.mts
6
- //#region src/http-client.d.ts
7
- interface HttpResponse {
8
- body: unknown;
9
- headers?: Record<string, string | undefined>;
10
- ok: boolean;
11
- status: number;
6
+ //#region src/coverage/types.d.ts
7
+ /**
8
+ * Raw hit counts for a single file, keyed by statement/function index.
9
+ */
10
+ interface RawFileCoverage {
11
+ b?: Record<string, Array<number>>;
12
+ f?: Record<string, number>;
13
+ s: Record<string, number>;
14
+ }
15
+ /**
16
+ * Raw coverage data for all files, keyed by original Luau-relative path.
17
+ */
18
+ type RawCoverageData = Record<string, RawFileCoverage>;
19
+ //#endregion
20
+ //#region src/memory-store/sorted-map-client.d.ts
21
+ /**
22
+ * Slim per-package summary published mid-task via the MemoryStore SortedMap.
23
+ * Intentionally compact — Roblox caps SortedMap items at 32 KB, so we leave
24
+ * the full `jestOutput` JSON out of streaming and reconstruct it from the
25
+ * task's final envelope. Streaming only needs enough fields to render a
26
+ * one-line progress message.
27
+ */
28
+ interface StreamingResultEntry {
29
+ elapsedMs: number;
30
+ numFailedTests: number;
31
+ numPassedTests: number;
32
+ numPendingTests: number;
33
+ pkg: string;
34
+ project: string;
35
+ success: boolean;
36
+ }
37
+ interface StreamingResultRecord {
38
+ id: string;
39
+ value: StreamingResultEntry;
12
40
  }
13
- interface RequestOptions {
14
- body?: unknown;
15
- headers?: Record<string, string>;
41
+ /**
42
+ * Minimal surface used by streaming polling — lets backends and tests
43
+ * stand in a stub without depending on the SDK class hierarchy.
44
+ */
45
+ interface StreamingResultReader {
46
+ delete(itemId: string): Promise<void>;
47
+ readAll(): Promise<Array<StreamingResultRecord>>;
16
48
  }
17
- interface HttpClient {
18
- request(method: string, url: string, options?: RequestOptions): Promise<HttpResponse>;
49
+ //#endregion
50
+ //#region src/types/jest-result.d.ts
51
+ type TestStatus = "disabled" | "failed" | "passed" | "pending" | "skipped" | "todo";
52
+ interface TestCaseResult {
53
+ ancestorTitles: Array<string>;
54
+ duration?: number;
55
+ failureMessages: Array<string>;
56
+ fullName: string;
57
+ location?: {
58
+ column: number;
59
+ line: number;
60
+ };
61
+ numPassingAsserts?: number;
62
+ retryReasons?: Array<string>;
63
+ status: TestStatus;
64
+ title: string;
65
+ }
66
+ interface TestFileResult {
67
+ failureMessage?: string;
68
+ numFailingTests: number;
69
+ numPassingTests: number;
70
+ numPendingTests: number;
71
+ testFilePath: string;
72
+ testResults: Array<TestCaseResult>;
73
+ }
74
+ interface SnapshotSummary {
75
+ added: number;
76
+ didUpdate?: boolean;
77
+ filesRemoved?: number;
78
+ matched: number;
79
+ total: number;
80
+ unchecked?: number;
81
+ unmatched: number;
82
+ updated: number;
83
+ }
84
+ interface JestResult {
85
+ numFailedTests: number;
86
+ numPassedTests: number;
87
+ numPendingTests: number;
88
+ numTodoTests?: number;
89
+ numTotalTests: number;
90
+ snapshot?: SnapshotSummary;
91
+ startTime: number;
92
+ success: boolean;
93
+ testResults: Array<TestFileResult>;
19
94
  }
20
95
  //#endregion
21
- //#region src/backends/open-cloud.d.ts
22
- interface OpenCloudCredentials {
96
+ //#region src/reporter/parser.d.ts
97
+ type SnapshotWrites = Record<string, string>;
98
+ interface ParseResult {
99
+ coverageData?: RawCoverageData;
100
+ luauTiming?: Record<string, number>;
101
+ result: JestResult;
102
+ setupSeconds?: number;
103
+ snapshotWrites?: SnapshotWrites;
104
+ }
105
+ declare function extractJsonFromOutput(output: string): string | undefined;
106
+ declare function parseJestOutput(output: string): ParseResult;
107
+ //#endregion
108
+ //#region src/backends/interface.d.ts
109
+ interface EnvelopeEntry {
110
+ bannerOutput?: string;
111
+ elapsedMs?: number;
112
+ gameOutput?: string;
113
+ jestOutput: string;
114
+ pkg?: string;
115
+ project?: string;
116
+ snapshotWrites?: SnapshotWrites;
117
+ }
118
+ interface ProjectJob {
119
+ config: ResolvedConfig;
120
+ displayColor?: string;
121
+ displayName: string;
122
+ /**
123
+ * Workspace-mode only: the npm package name (e.g. `@halcyon/foo`) that
124
+ * owns this project. Combined with `displayName` it forms the lookup key
125
+ * used by work-stealing to match Luau-emitted entries to jobs. Outside
126
+ * workspace mode this is undefined and the lookup falls back to
127
+ * `displayName` alone.
128
+ */
129
+ pkg?: string;
130
+ /**
131
+ * Studio-only: filtered list of DataModel paths that should receive
132
+ * runtime `jest.config` ModuleScript injection. The CLI excludes mount
133
+ * paths where a user-authored `jest.config.luau` already exists on
134
+ * disk (synced by Rojo); injecting over those would either overwrite
135
+ * the canonical config or trigger the plugin's structural collision
136
+ * check. The Studio backend forwards this array (parallel to
137
+ * `configs`) as `runtimeStubMounts[i]` in the WebSocket payload; the
138
+ * plugin's Run Mode runner iterates only this list, never the
139
+ * unfiltered `cfg.projects`. Empty is meaningful — the project has no
140
+ * mounts needing runtime injection. Open-cloud backend ignores this
141
+ * field; it bakes stubs into the place file via the synthesizer.
142
+ */
143
+ runtimeInjectionPaths?: Array<string>;
144
+ testFiles: Array<string>;
145
+ }
146
+ interface StreamingHooks {
147
+ /**
148
+ * Called once per newly-observed SortedMap entry, in the order the
149
+ * backend's poll loop drains them. Duplicates from work-stealing
150
+ * fault-recovery are NOT filtered here — consumers handle that
151
+ * (the StreamingAggregator drops repeat pkg/project keys).
152
+ */
153
+ onPackageResult: (entry: StreamingResultEntry) => void;
154
+ /**
155
+ * Optional poll cadence in milliseconds. Defaults to 250ms — fast
156
+ * enough to feel live without saturating the Open Cloud rate limit.
157
+ */
158
+ pollMs?: number;
159
+ reader: StreamingResultReader;
160
+ }
161
+ interface BackendOptions {
162
+ jobs: Array<ProjectJob>;
163
+ /**
164
+ * Open-Cloud-only: number of concurrent Open Cloud Luau execution sessions
165
+ * to fire. Unset or 1 means one session carrying all jobs. `"auto"` resolves
166
+ * to min(jobs.length, 3). Studio backend must error when this is set to
167
+ * anything other than undefined/1 (Phase 4 enforces at the CLI layer).
168
+ */
169
+ parallel?: "auto" | number;
170
+ /**
171
+ * Workspace mode: pre-built Luau script that the backend should send
172
+ * verbatim instead of generating one from `jobs`. Used by the staged
173
+ * materializer pipeline so the CLI layer chooses the script and the
174
+ * backend stays unaware of the difference.
175
+ */
176
+ scriptOverride?: string;
177
+ /**
178
+ * Open-Cloud-only, work-stealing only: when provided, the backend polls
179
+ * the SortedMap concurrently with executeScript and invokes
180
+ * `onPackageResult` per newly-observed entry. Consumed entries are
181
+ * deleted to avoid re-emission. Streaming is best-effort: failure to
182
+ * poll/delete does not affect the final results returned in the task
183
+ * envelope.
184
+ */
185
+ streaming?: StreamingHooks;
186
+ /**
187
+ * Open-Cloud-only: when true, fire `parallel` tasks all running the SAME
188
+ * `scriptOverride` (no static job-bucket split). Each task pulls work from
189
+ * a MemoryStore queue (set up upstream) and returns whatever subset of
190
+ * packages it processed. Backend aggregates entries across all task
191
+ * envelopes and maps each to the matching `ProjectJob.displayName` by the
192
+ * entry's `pkg` field. `scriptOverride` is required when this is true.
193
+ */
194
+ workStealing?: boolean;
195
+ }
196
+ interface BackendTiming {
197
+ executionMs: number;
198
+ uploadMs?: number;
199
+ }
200
+ interface RawBackendEntry {
201
+ entry: EnvelopeEntry;
202
+ fallbackGameOutput?: string;
203
+ }
204
+ interface BackendResult {
205
+ rawResults: Array<RawBackendEntry>;
206
+ timing: BackendTiming;
207
+ }
208
+ interface Backend {
209
+ close?(): Promise<void> | void;
210
+ readonly kind: BackendKind;
211
+ runTests(options: BackendOptions): Promise<BackendResult>;
212
+ }
213
+ type BackendKind = "open-cloud" | "studio";
214
+ //#endregion
215
+ //#region packages/roblox-runner/dist/index.d.mts
216
+ //#endregion
217
+ //#region src/types.d.ts
218
+ interface RunnerCredentials {
23
219
  apiKey: string;
24
220
  placeId: string;
25
221
  universeId: string;
26
222
  }
223
+ interface UploadPlaceOptions {
224
+ placeFilePath: string;
225
+ }
226
+ interface UploadPlaceResult {
227
+ uploadMs: number;
228
+ versionNumber: number;
229
+ }
230
+ interface ExecuteScriptOptions {
231
+ script: string;
232
+ timeout: number;
233
+ }
234
+ interface ScriptResult {
235
+ durationMs: number;
236
+ outputs: Array<string>;
237
+ }
238
+ interface RemoteRunner {
239
+ executeScript(options: ExecuteScriptOptions): Promise<ScriptResult>;
240
+ uploadPlace(options: UploadPlaceOptions): Promise<UploadPlaceResult>;
241
+ } //#endregion
242
+ //#region src/credentials.d.ts
243
+ //#endregion
244
+ //#region src/backends/open-cloud.d.ts
245
+ type OpenCloudCredentials = RunnerCredentials;
27
246
  interface OpenCloudOptions {
28
- http?: HttpClient;
29
- readFile?: FileReader;
30
- sleep?: (ms: number) => Promise<void>;
247
+ /**
248
+ * Inject a pre-built {@link RemoteRunner}. When provided, the
249
+ * `credentials` argument to {@link OpenCloudBackend} is ignored —
250
+ * the injected runner already owns its own credentials. Intended
251
+ * primarily as a test seam.
252
+ */
253
+ runner?: RemoteRunner;
31
254
  }
32
- type FileReader = (path: string) => buffer.Buffer;
33
255
  declare class OpenCloudBackend implements Backend {
34
- private readonly baseUrl;
35
- private readonly credentials;
36
- private readonly http;
37
- private readonly readFile;
38
- private readonly sleepFn;
256
+ private readonly runner;
39
257
  readonly kind = "open-cloud";
40
258
  constructor(credentials: OpenCloudCredentials, options?: OpenCloudOptions);
41
259
  runTests(options: BackendOptions): Promise<BackendResult>;
42
- private createExecutionTask;
43
- private pollForCompletion;
44
260
  private runBucket;
45
- private uploadOrReuseCached;
46
- private uploadPlaceData;
261
+ private runStaticBuckets;
262
+ private runStealingTask;
263
+ private runWorkStealing;
47
264
  }
48
- declare function createOpenCloudBackend(): OpenCloudBackend;
265
+ declare function createOpenCloudBackend(credentials: OpenCloudCredentials): OpenCloudBackend;
49
266
  //#endregion
50
267
  //#region src/backends/studio.d.ts
51
268
  interface PreConnected {
@@ -68,9 +285,7 @@ declare class StudioBackend implements Backend {
68
285
  constructor(options: StudioOptions);
69
286
  close(): void;
70
287
  runTests(options: BackendOptions): Promise<BackendResult>;
71
- private buildProjectResult;
72
288
  private executeViaPlugin;
73
- private parseEnvelope;
74
289
  private waitForResult;
75
290
  }
76
291
  declare function createStudioBackend(options: StudioOptions): StudioBackend;
@@ -79,6 +294,156 @@ declare function createStudioBackend(options: StudioOptions): StudioBackend;
79
294
  declare function resolveConfig(config: Config): ResolvedConfig;
80
295
  declare function loadConfig(configPath?: string, cwd?: string): Promise<ResolvedConfig>;
81
296
  //#endregion
297
+ //#region packages/rojo-utils/dist/index.d.mts
298
+ interface Mount {
299
+ dataModelPath: string;
300
+ fsPath: string;
301
+ }
302
+ //#endregion
303
+ //#region src/config/projects.d.ts
304
+ interface ResolvedProjectConfig {
305
+ config: ResolvedConfig;
306
+ displayColor?: string;
307
+ displayName: string;
308
+ /** Original include patterns (with TS extensions) for filesystem discovery. */
309
+ include: Array<string>;
310
+ /**
311
+ * Single resolved output directory (workspace-relative). Set only when
312
+ * resolution produced exactly one mount; undefined when the project spans
313
+ * multiple rojo mounts. Kept for back-compat; new code should consume
314
+ * `rojoMounts` instead.
315
+ */
316
+ outDir?: string;
317
+ /** DataModel paths Jest walks up from to discover test configs. */
318
+ projects: Array<string>;
319
+ /** Internal: FS↔DataModel pairs for stub generation and shadow sync. */
320
+ rojoMounts: Array<Mount>;
321
+ /** Luau-side testMatch patterns (extensions stripped). */
322
+ testMatch: Array<string>;
323
+ }
324
+ //#endregion
325
+ //#region src/source-mapper/index.d.ts
326
+ interface MappedLocation {
327
+ luauLine: number;
328
+ luauPath: string;
329
+ sourceContent?: string;
330
+ tsColumn?: number;
331
+ tsLine?: number;
332
+ tsPath?: string;
333
+ }
334
+ interface MappedFailure {
335
+ locations: Array<MappedLocation>;
336
+ message: string;
337
+ }
338
+ interface SourceMapper {
339
+ mapFailureMessage(message: string): string;
340
+ mapFailureWithLocations(message: string): MappedFailure;
341
+ resolveDisplayPath(testFilePath: string): string;
342
+ resolveTestFilePath(testFilePath: string): string | undefined;
343
+ }
344
+ //#endregion
345
+ //#region src/timing/orchestration-collector.d.ts
346
+ interface TimingCollector {
347
+ flushTimingReport: () => void;
348
+ profile: <T>(name: string, func: () => T extends Promise<unknown> ? never : T) => T;
349
+ profileAsync: <T>(name: string, func: () => Promise<T>) => Promise<T>;
350
+ /**
351
+ * Register a leaf span under the current stack frame whose `elapsedMs` is
352
+ * supplied directly. Used to surface durations the orchestrator did not
353
+ * measure itself — the backend reports `uploadMs` / `executionMs` from
354
+ * inside its own `runTests` call, and the Luau runner reports per-game
355
+ * phases inside the Roblox VM. Repeated calls with the same `name`
356
+ * accumulate, matching `profile`'s behavior.
357
+ *
358
+ * Stack-empty fallback: when called outside any `profile`/`profileAsync`
359
+ * frame the span lands at root and contributes to `TOTAL (host)` like
360
+ * any other root. Call inside the relevant frame to keep totals clean
361
+ * — recording a value at root that is ALSO captured by a sibling root
362
+ * `profile` span would double-count toward the host total.
363
+ */
364
+ record: (name: string, elapsedMs: number) => void;
365
+ }
366
+ //#endregion
367
+ //#region src/types/timing.d.ts
368
+ interface TimingResult {
369
+ coverageMs?: number;
370
+ executionMs: number;
371
+ setupMs?: number;
372
+ startTime: number;
373
+ testsMs: number;
374
+ totalMs: number;
375
+ uploadMs?: number;
376
+ }
377
+ //#endregion
378
+ //#region src/executor.d.ts
379
+ interface ExecuteResult {
380
+ coverageData?: RawCoverageData;
381
+ exitCode: number;
382
+ gameOutput?: string;
383
+ output: string;
384
+ result: JestResult;
385
+ snapshotWriteFailures?: number;
386
+ sourceMapper?: SourceMapper;
387
+ timing: TimingResult;
388
+ }
389
+ interface FormatOutputOptions {
390
+ config: ResolvedConfig;
391
+ result: JestResult;
392
+ snapshotWriteFailures?: number;
393
+ sourceMapper?: SourceMapper;
394
+ timing: TimingResult;
395
+ version: string;
396
+ }
397
+ interface ProjectInput {
398
+ config: ResolvedConfig;
399
+ displayColor?: string;
400
+ displayName?: string;
401
+ pkg?: string;
402
+ /** Studio-only: forwarded to `ProjectJob.runtimeInjectionPaths`. */
403
+ runtimeInjectionPaths?: Array<string>;
404
+ testFiles: Array<string>;
405
+ }
406
+ interface RunProjectsOptions {
407
+ backend: Backend;
408
+ deferFormatting?: boolean;
409
+ parallel?: "auto" | number;
410
+ projects: Array<ProjectInput>;
411
+ scriptOverride?: string;
412
+ startTime: number;
413
+ streaming?: StreamingHooks;
414
+ /**
415
+ * Span-tree profiler owned by the top-level run. Optional so existing
416
+ * test seams (which exercise the executor directly) keep working without
417
+ * threading a collector through; production callers pass one through so
418
+ * the host waterfall captures `backend.runTests` + per-project
419
+ * post-processing.
420
+ */
421
+ timing?: TimingCollector;
422
+ version: string;
423
+ workStealing?: boolean;
424
+ }
425
+ interface RunProjectsResult {
426
+ backendTiming: BackendTiming;
427
+ results: Array<ExecuteResult>;
428
+ }
429
+ declare function formatExecuteOutput(options: FormatOutputOptions): string;
430
+ /**
431
+ * Unified orchestration entry point: builds jobs for every input project,
432
+ * dispatches them through the backend in one call, shapes each raw envelope
433
+ * entry into a `ProjectBackendResult`, then maps each through per-project
434
+ * post-processing. Single-, multi-, and workspace-run callers all funnel
435
+ * through here so the build→execute→shape→process sequence lives in
436
+ * exactly one place.
437
+ *
438
+ * Ordering contract: the returned `results` array is in the same order as
439
+ * `options.projects`. Backends MUST return `rawResults` in the same order
440
+ * as the submitted `jobs` envelope — `runProjects` indexes into `jobs[i]`
441
+ * to recover each project's resolved config and pair it with the matching
442
+ * raw entry, so out-of-order results would post-process with the wrong
443
+ * config.
444
+ */
445
+ declare function runProjects(options: RunProjectsOptions): Promise<RunProjectsResult>;
446
+ //#endregion
82
447
  //#region src/formatters/formatter.d.ts
83
448
  interface FormatOptions {
84
449
  collectCoverage?: boolean;
@@ -88,6 +453,8 @@ interface FormatOptions {
88
453
  outputFile?: string;
89
454
  rootDir: string;
90
455
  showLuau?: boolean;
456
+ slowTestThreshold?: number;
457
+ snapshotWriteFailures?: number;
91
458
  sourceMapper?: SourceMapper;
92
459
  typeErrors?: number;
93
460
  verbose: boolean;
@@ -100,6 +467,10 @@ interface Styles {
100
467
  received: ColorFunc;
101
468
  };
102
469
  dim: ColorFunc;
470
+ duration: {
471
+ fast: ColorFunc;
472
+ slow: ColorFunc;
473
+ };
103
474
  failBadge: ColorFunc;
104
475
  lineNumber: ColorFunc;
105
476
  location: ColorFunc;
@@ -108,6 +479,7 @@ interface Styles {
108
479
  file: ColorFunc;
109
480
  };
110
481
  runBadge: ColorFunc;
482
+ slowTestThreshold: number;
111
483
  status: {
112
484
  fail: ColorFunc;
113
485
  pass: ColorFunc;
@@ -139,18 +511,12 @@ declare function formatFailure({
139
511
  useColor?: boolean;
140
512
  }): string;
141
513
  declare function formatTestSummary(result: JestResult, timing: TimingResult, styles?: Styles, options?: {
514
+ snapshotWriteFailures?: number;
142
515
  typeErrors?: number;
143
516
  }): string;
144
517
  declare function formatResult(result: JestResult, timing: TimingResult, options: FormatOptions): string;
145
518
  //#endregion
146
519
  //#region src/formatters/github-actions.d.ts
147
- interface GitHubActionsOptions {
148
- repository?: string;
149
- serverUrl?: string;
150
- sha?: string;
151
- sourceMapper?: SourceMapper;
152
- workspace?: string;
153
- }
154
520
  interface GitHubActionsFormatterOptions {
155
521
  /**
156
522
  * Whether to emit `::error` workflow commands for test failures.
@@ -210,6 +576,13 @@ interface JobSummaryOptions {
210
576
  */
211
577
  outputPath: string | undefined;
212
578
  }
579
+ interface GitHubActionsOptions {
580
+ repository?: string;
581
+ serverUrl?: string;
582
+ sha?: string;
583
+ sourceMapper?: SourceMapper;
584
+ workspace?: string;
585
+ }
213
586
  declare function formatAnnotations(result: JestResult, options: GitHubActionsOptions): string;
214
587
  declare function formatJobSummary(result: JestResult, options: GitHubActionsOptions): string;
215
588
  //#endregion
@@ -217,6 +590,188 @@ declare function formatJobSummary(result: JestResult, options: GitHubActionsOpti
217
590
  declare function formatJson(result: JestResult): string;
218
591
  declare function writeJsonFile(result: JestResult, filePath: string): Promise<void>;
219
592
  //#endregion
593
+ //#region src/coverage/mapper.d.ts
594
+ interface MappedFileCoverage {
595
+ b: Record<string, Array<number>>;
596
+ branchMap: Record<string, {
597
+ loc: {
598
+ end: {
599
+ column: number;
600
+ line: number;
601
+ };
602
+ start: {
603
+ column: number;
604
+ line: number;
605
+ };
606
+ };
607
+ locations: Array<{
608
+ end: {
609
+ column: number;
610
+ line: number;
611
+ };
612
+ start: {
613
+ column: number;
614
+ line: number;
615
+ };
616
+ }>;
617
+ type: string;
618
+ }>;
619
+ f: Record<string, number>;
620
+ fnMap: Record<string, {
621
+ loc: {
622
+ end: {
623
+ column: number;
624
+ line: number;
625
+ };
626
+ start: {
627
+ column: number;
628
+ line: number;
629
+ };
630
+ };
631
+ name: string;
632
+ }>;
633
+ path: string;
634
+ s: Record<string, number>;
635
+ statementMap: Record<string, {
636
+ end: {
637
+ column: number;
638
+ line: number;
639
+ };
640
+ start: {
641
+ column: number;
642
+ line: number;
643
+ };
644
+ }>;
645
+ }
646
+ interface MappedCoverageResult {
647
+ files: Record<string, MappedFileCoverage>;
648
+ }
649
+ //#endregion
650
+ //#region src/run/types.d.ts
651
+ type RunMode = "multi" | "single" | "workspace";
652
+ interface ProjectResult {
653
+ displayColor?: string;
654
+ displayName: string;
655
+ result: ExecuteResult;
656
+ }
657
+ interface MultiProjectMerged {
658
+ coverageData?: ExecuteResult["coverageData"];
659
+ sourceMapper?: SourceMapper;
660
+ }
661
+ interface SingleRunResult {
662
+ mode: "single";
663
+ preCoverageMs: number;
664
+ runtimeResult?: ExecuteResult;
665
+ typecheckResult?: JestResult;
666
+ validationExitCode?: 2;
667
+ }
668
+ interface MultiRunResult {
669
+ collectCoverageFrom?: Array<string>;
670
+ merged: MultiProjectMerged;
671
+ mode: "multi";
672
+ preCoverageMs: number;
673
+ projectResults: Array<ProjectResult>;
674
+ typecheckResult?: JestResult;
675
+ validationExitCode?: 2;
676
+ validationMessage?: string;
677
+ }
678
+ interface WorkspaceRunResult {
679
+ /**
680
+ * Pre-aggregated TS-coord coverage merged from every package's
681
+ * `coverageData + coverageManifest`. Skips the single-package
682
+ * `loadCoverageManifest(rootDir)` path entirely. Undefined when
683
+ * `collectCoverage` is off or no package produced coverage data.
684
+ */
685
+ coverageMapped?: MappedCoverageResult;
686
+ /**
687
+ * Consensus-resolved Aggregated Game Output path the runner wrote (if any).
688
+ * Surfaced so formatters point "View …" hints at the file that exists,
689
+ * rather than the workspace-root `config.gameOutput` (which the runner does
690
+ * not consult).
691
+ */
692
+ gameOutput?: string;
693
+ merged: MultiProjectMerged;
694
+ mode: "workspace";
695
+ /** Consensus-resolved aggregated result path the runner wrote (if any). */
696
+ outputFile?: string;
697
+ preCoverageMs: number;
698
+ projectResults: Array<ProjectResult>;
699
+ typecheckResult?: JestResult;
700
+ validationExitCode?: 2;
701
+ validationMessage?: string;
702
+ }
703
+ type RunResult = MultiRunResult | SingleRunResult | WorkspaceRunResult;
704
+ interface RunOptions {
705
+ cli: CliOptions;
706
+ config: ResolvedConfig;
707
+ /**
708
+ * Span-tree profiler owned by `runJestRoblox`. Optional so direct test
709
+ * seams keep working with the existing two-property shape; production
710
+ * callers always pass one through.
711
+ */
712
+ timing?: TimingCollector;
713
+ }
714
+ //#endregion
715
+ //#region src/run.d.ts
716
+ declare function runJestRoblox(cli: CliOptions, config: ResolvedConfig): Promise<RunResult>;
717
+ //#endregion
718
+ //#region node_modules/.pnpm/@rbxts+jest@3.13.3-ts.1/node_modules/@rbxts/jest/src/config.d.ts
719
+ interface ReporterConfig {
720
+ reporter: string | ModuleScript;
721
+ options?: Record<string, any>;
722
+ }
723
+ type Argv = Partial<{
724
+ all: boolean;
725
+ automock: boolean;
726
+ bail: boolean | number;
727
+ changedSince: string;
728
+ ci: boolean;
729
+ clearCache: boolean;
730
+ clearMocks: boolean;
731
+ color: boolean;
732
+ colors: boolean;
733
+ config: string;
734
+ coverage: boolean;
735
+ debug: boolean;
736
+ env: string;
737
+ expand: boolean;
738
+ globals: string;
739
+ init: boolean;
740
+ injectGlobals: boolean;
741
+ json: boolean;
742
+ maxWorkers: number | string;
743
+ noStackTrace: boolean;
744
+ outputFile: string;
745
+ preset: string | undefined;
746
+ projects: Array<string>;
747
+ reporters: Array<string | ModuleScript | ReporterConfig>;
748
+ resetMocks: boolean;
749
+ resetModules: boolean;
750
+ restoreMocks: boolean;
751
+ rootDir: Instance;
752
+ roots: Array<string>;
753
+ runInBand: boolean;
754
+ selectProjects: Array<string>;
755
+ setupFiles: Array<ModuleScript>;
756
+ setupFilesAfterEnv: Array<ModuleScript>;
757
+ showConfig: boolean;
758
+ silent: boolean;
759
+ snapshotSerializers: Array<string>;
760
+ testEnvironment: string;
761
+ testEnvironmentOptions: string;
762
+ testFailureExitCode: string | undefined;
763
+ testMatch: Array<string>;
764
+ testNamePattern: string;
765
+ testPathIgnorePatterns: Array<string>;
766
+ testPathPattern: Array<string>;
767
+ testRegex: string | Array<string>;
768
+ testTimeout: number | undefined;
769
+ timers: string;
770
+ updateSnapshot: boolean;
771
+ verbose: boolean;
772
+ version: boolean;
773
+ }>;
774
+ //#endregion
220
775
  //#region src/test-script.d.ts
221
776
  type JestArgv = Argv & {
222
777
  snapshotFormat?: SnapshotFormatOptions;
@@ -550,4 +1105,4 @@ declare function visitExpression(expression: AstExpr, visitor: LuauVisitor): voi
550
1105
  declare function visitStatement(statement: AstStat, visitor: LuauVisitor): void;
551
1106
  declare function visitBlock(block: AstStatBlock, visitor: LuauVisitor): void; //#endregion
552
1107
  //#endregion
553
- export { type AstExpr, type AstExprBinary, type AstExprCall, type AstExprFunction, type AstStat, type AstStatBlock, type Backend, type BackendOptions, type CliOptions, type Config, type ConfigInput, DEFAULT_CONFIG, type DisplayName, type ExecuteOptions, type ExecuteResult, type FormatOutputOptions, type FormatterEntry, type GameOutputEntry, type GitHubActionsFormatterOptions, type InlineProjectConfig, type JestArgv, type JestResult, type LuauSpan, type LuauVisitor, OpenCloudBackend, type ProjectEntry, type ProjectTestConfig, ROOT_ONLY_KEYS, type ResolvedConfig, type ResolvedProjectConfig, StudioBackend, type TestCaseResult, type TestDefinition, type TestFileResult, type TestStatus, type TscErrorInfo, type TypecheckOptions, buildJestArgv, createOpenCloudBackend, createStudioBackend, defineConfig, defineProject, execute, extractJsonFromOutput, formatAnnotations, formatExecuteOutput, formatFailure, formatGameOutputNotice, formatJobSummary, formatJson, formatResult, formatTestSummary, generateTestScript, loadConfig, parseGameOutput, parseJestOutput, resolveConfig, runTypecheck, visitBlock, visitExpression, visitStatement, writeGameOutput, writeJsonFile };
1108
+ export { type AstExpr, type AstExprBinary, type AstExprCall, type AstExprFunction, type AstStat, type AstStatBlock, type Backend, type BackendOptions, type CliOptions, type Config, type ConfigInput, DEFAULT_CONFIG, type DisplayName, type ExecuteResult, type FormatOutputOptions, type FormatterEntry, GLOBAL_TEST_KEYS, type GameOutputEntry, type GitHubActionsFormatterOptions, type GlobalTestConfig, type InlineProjectConfig, JEST_ARGV_EXCLUDED_KEYS, type JestArgv, type JestResult, type LuauSpan, type LuauVisitor, type MultiProjectMerged, type MultiRunResult, OpenCloudBackend, type ProjectEntry, type ProjectInput, type ProjectResult, type ProjectTestConfig, ROOT_CLI_KEYS, type ResolvedConfig, type ResolvedProjectConfig, type RunMode, type RunOptions, type RunProjectsOptions, type RunProjectsResult, type RunResult, SHARED_TEST_KEYS, type SharedTestConfig, type SingleRunResult, StudioBackend, type TestCaseResult, type TestDefinition, type TestFileResult, type TestStatus, type TscErrorInfo, type TypecheckOptions, type WorkspaceConfig, type WorkspaceRunResult, buildJestArgv, createOpenCloudBackend, createStudioBackend, defineConfig, defineProject, extractJsonFromOutput, formatAnnotations, formatExecuteOutput, formatFailure, formatGameOutputNotice, formatJobSummary, formatJson, formatResult, formatTestSummary, generateTestScript, loadConfig, parseGameOutput, parseJestOutput, resolveConfig, runJestRoblox, runProjects, runTypecheck, visitBlock, visitExpression, visitStatement, writeGameOutput, writeJsonFile };