@isentinel/jest-roblox 0.0.8 → 0.1.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,98 +1,7 @@
1
- import { a as ResolvedConfig, c as Argv, i as FormatterEntry, n as Config, o as SnapshotFormatOptions, r as DEFAULT_CONFIG, s as defineConfig, t as CliOptions } from "./schema-DcDQmTyn.mjs";
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-DqZE3wME.mjs";
2
2
  import { WebSocket, WebSocketServer } from "ws";
3
- import "arktype";
4
3
  import buffer from "node:buffer";
5
4
 
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/types/jest-result.d.ts
21
- type TestStatus = "disabled" | "failed" | "passed" | "pending" | "skipped" | "todo";
22
- interface TestCaseResult {
23
- ancestorTitles: Array<string>;
24
- duration?: number;
25
- failureMessages: Array<string>;
26
- fullName: string;
27
- location?: {
28
- column: number;
29
- line: number;
30
- };
31
- numPassingAsserts?: number;
32
- retryReasons?: Array<string>;
33
- status: TestStatus;
34
- title: string;
35
- }
36
- interface TestFileResult {
37
- failureMessage?: string;
38
- numFailingTests: number;
39
- numPassingTests: number;
40
- numPendingTests: number;
41
- testFilePath: string;
42
- testResults: Array<TestCaseResult>;
43
- }
44
- interface SnapshotSummary {
45
- added: number;
46
- matched: number;
47
- total: number;
48
- unmatched: number;
49
- updated: number;
50
- }
51
- interface JestResult {
52
- numFailedTests: number;
53
- numPassedTests: number;
54
- numPendingTests: number;
55
- numTodoTests?: number;
56
- numTotalTests: number;
57
- snapshot?: SnapshotSummary;
58
- startTime: number;
59
- success: boolean;
60
- testResults: Array<TestFileResult>;
61
- }
62
- //#endregion
63
- //#region src/reporter/parser.d.ts
64
- type SnapshotWrites = Record<string, string>;
65
- interface ParseResult {
66
- coverageData?: RawCoverageData;
67
- luauTiming?: Record<string, number>;
68
- result: JestResult;
69
- snapshotWrites?: SnapshotWrites;
70
- }
71
- declare function extractJsonFromOutput(output: string): string | undefined;
72
- declare function parseJestOutput(output: string): ParseResult;
73
- //#endregion
74
- //#region src/backends/interface.d.ts
75
- interface BackendOptions {
76
- config: ResolvedConfig;
77
- testFiles: Array<string>;
78
- }
79
- interface BackendTiming {
80
- executionMs: number;
81
- uploadCached?: boolean;
82
- uploadMs?: number;
83
- }
84
- interface BackendResult {
85
- coverageData?: RawCoverageData;
86
- gameOutput?: string;
87
- luauTiming?: Record<string, number>;
88
- result: JestResult;
89
- snapshotWrites?: SnapshotWrites;
90
- timing: BackendTiming;
91
- }
92
- interface Backend {
93
- runTests(options: BackendOptions): Promise<BackendResult>;
94
- }
95
- //#endregion
96
5
  //#region src/backends/http-client.d.ts
97
6
  interface HttpResponse {
98
7
  body: unknown;
@@ -158,60 +67,9 @@ declare class StudioBackend implements Backend {
158
67
  declare function createStudioBackend(options: StudioOptions): StudioBackend;
159
68
  //#endregion
160
69
  //#region src/config/loader.d.ts
161
- /**
162
- * Merges a partial Config with DEFAULT_CONFIG. Useful for external consumers
163
- * who build a Config manually (e.g. from CLI args) without going through
164
- * file-based loadConfig.
165
- */
166
70
  declare function resolveConfig(config: Config): ResolvedConfig;
167
71
  declare function loadConfig(configPath?: string, cwd?: string): Promise<ResolvedConfig>;
168
72
  //#endregion
169
- //#region src/source-mapper/index.d.ts
170
- interface MappedLocation {
171
- luauLine: number;
172
- luauPath: string;
173
- sourceContent?: string;
174
- tsColumn?: number;
175
- tsLine?: number;
176
- tsPath?: string;
177
- }
178
- interface MappedFailure {
179
- locations: Array<MappedLocation>;
180
- message: string;
181
- }
182
- interface SourceMapper {
183
- mapFailureMessage(message: string): string;
184
- mapFailureWithLocations(message: string): MappedFailure;
185
- resolveTestFilePath(testFilePath: string): string | undefined;
186
- }
187
- //#endregion
188
- //#region src/executor.d.ts
189
- interface ExecuteOptions {
190
- backend: Backend;
191
- config: ResolvedConfig;
192
- testFiles: Array<string>;
193
- version: string;
194
- }
195
- interface ExecuteResult {
196
- coverageData?: RawCoverageData;
197
- exitCode: number;
198
- gameOutput?: string;
199
- output: string;
200
- result: JestResult;
201
- sourceMapper?: SourceMapper;
202
- }
203
- declare function execute(options: ExecuteOptions): Promise<ExecuteResult>;
204
- //#endregion
205
- //#region src/types/timing.d.ts
206
- interface TimingResult {
207
- executionMs: number;
208
- startTime: number;
209
- testsMs: number;
210
- totalMs: number;
211
- uploadCached?: boolean;
212
- uploadMs?: number;
213
- }
214
- //#endregion
215
73
  //#region src/formatters/formatter.d.ts
216
74
  interface FormatOptions {
217
75
  collectCoverage?: boolean;
@@ -222,6 +80,7 @@ interface FormatOptions {
222
80
  rootDir: string;
223
81
  showLuau?: boolean;
224
82
  sourceMapper?: SourceMapper;
83
+ typeErrors?: number;
225
84
  verbose: boolean;
226
85
  version: string;
227
86
  }
@@ -270,7 +129,9 @@ declare function formatFailure({
270
129
  totalFailures?: number;
271
130
  useColor?: boolean;
272
131
  }): string;
273
- declare function formatTestSummary(result: JestResult, timing: TimingResult, styles?: Styles): string;
132
+ declare function formatTestSummary(result: JestResult, timing: TimingResult, styles?: Styles, options?: {
133
+ typeErrors?: number;
134
+ }): string;
274
135
  declare function formatResult(result: JestResult, timing: TimingResult, options: FormatOptions): string;
275
136
  //#endregion
276
137
  //#region src/formatters/github-actions.d.ts
@@ -391,4 +252,4 @@ declare function formatGameOutputNotice(filePath: string, entryCount: number): s
391
252
  declare function parseGameOutput(raw: string | undefined): Array<GameOutputEntry>;
392
253
  declare function writeGameOutput(filePath: string, entries: Array<GameOutputEntry>): void;
393
254
  //#endregion
394
- export { type Backend, type BackendOptions, type CliOptions, type Config, DEFAULT_CONFIG, type ExecuteOptions, type ExecuteResult, type FormatterEntry, type GameOutputEntry, type GitHubActionsFormatterOptions, type JestArgv, type JestResult, OpenCloudBackend, type ResolvedConfig, StudioBackend, type TestCaseResult, type TestDefinition, type TestFileResult, type TestStatus, type TscErrorInfo, type TypecheckOptions, buildJestArgv, createOpenCloudBackend, createStudioBackend, defineConfig, execute, extractJsonFromOutput, formatAnnotations, formatFailure, formatGameOutputNotice, formatJobSummary, formatJson, formatResult, formatTestSummary, generateTestScript, loadConfig, parseGameOutput, parseJestOutput, resolveConfig, runTypecheck, writeGameOutput, writeJsonFile };
255
+ export { 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, 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, writeGameOutput, writeJsonFile };
package/dist/index.mjs CHANGED
@@ -1,3 +1,2 @@
1
- import { A as parseJestOutput, C as createStudioBackend, D as generateTestScript, E as buildJestArgv, S as StudioBackend, T as createOpenCloudBackend, _ as resolveConfig, a as formatAnnotations, b as defineConfig, c as execute, d as writeJsonFile, f as formatFailure, g as loadConfig, i as runTypecheck, k as extractJsonFromOutput, m as formatTestSummary, n as parseGameOutput, o as formatJobSummary, p as formatResult, r as writeGameOutput, t as formatGameOutputNotice, u as formatJson, v as DEFAULT_CONFIG, w as OpenCloudBackend } from "./game-output-M8du29nj.mjs";
2
-
3
- export { DEFAULT_CONFIG, OpenCloudBackend, StudioBackend, buildJestArgv, createOpenCloudBackend, createStudioBackend, defineConfig, execute, extractJsonFromOutput, formatAnnotations, formatFailure, formatGameOutputNotice, formatJobSummary, formatJson, formatResult, formatTestSummary, generateTestScript, loadConfig, parseGameOutput, parseJestOutput, resolveConfig, runTypecheck, writeGameOutput, writeJsonFile };
1
+ import { A as generateTestScript, C as resolveConfig, D as createOpenCloudBackend, E as OpenCloudBackend, F as defineProject, M as ROOT_ONLY_KEYS, P as defineConfig, R as extractJsonFromOutput, S as loadConfig, T as createStudioBackend, _ as formatResult, a as formatAnnotations, c as execute, f as formatJson, h as formatFailure, i as runTypecheck, j as DEFAULT_CONFIG, k as buildJestArgv, l as formatExecuteOutput, n as parseGameOutput, o as formatJobSummary, p as writeJsonFile, r as writeGameOutput, t as formatGameOutputNotice, v as formatTestSummary, w as StudioBackend, z as parseJestOutput } from "./game-output-C0_-YIAY.mjs";
2
+ export { DEFAULT_CONFIG, OpenCloudBackend, ROOT_ONLY_KEYS, StudioBackend, buildJestArgv, createOpenCloudBackend, createStudioBackend, defineConfig, defineProject, execute, extractJsonFromOutput, formatAnnotations, formatExecuteOutput, formatFailure, formatGameOutputNotice, formatJobSummary, formatJson, formatResult, formatTestSummary, generateTestScript, loadConfig, parseGameOutput, parseJestOutput, resolveConfig, runTypecheck, writeGameOutput, writeJsonFile };
Binary file