@isentinel/jest-roblox 0.3.0 → 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/README.md +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +36 -0
- package/dist/index.mjs +1 -1
- package/dist/{run-BEUPi80L.mjs → run-Cl5gYSQr.mjs} +339 -228
- package/dist/sea-entry.cjs +343 -227
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -326,7 +326,7 @@ Create a file named drillbit.toml in your project's directory.
|
|
|
326
326
|
|
|
327
327
|
```toml
|
|
328
328
|
[plugins.jest_roblox]
|
|
329
|
-
github = "https://github.com/christopher-buss/jest-roblox-cli/releases/download/v0.
|
|
329
|
+
github = "https://github.com/christopher-buss/jest-roblox-cli/releases/download/v0.2.7/JestRobloxRunner.rbxm"
|
|
330
330
|
```
|
|
331
331
|
|
|
332
332
|
Then run `drillbit` and it will download the plugin and install it in Studio for you.
|
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as mergeCliWithConfig, D as LuauScriptError, E as formatBanner, H as ConfigError, R as VALID_BACKENDS, U as version, V as isValidBackend, f as outputMultiResult, j as loadConfig, p as outputSingleResult, t as runJestRoblox, y as parseGameOutput } from "./run-
|
|
1
|
+
import { A as mergeCliWithConfig, D as LuauScriptError, E as formatBanner, H as ConfigError, R as VALID_BACKENDS, U as version, V as isValidBackend, f as outputMultiResult, j as loadConfig, p as outputSingleResult, t as runJestRoblox, y as parseGameOutput } from "./run-Cl5gYSQr.mjs";
|
|
2
2
|
import { OpenCloudError } from "@bedrock-rbx/ocale";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { parseArgs as parseArgs$1 } from "node:util";
|
package/dist/index.d.mts
CHANGED
|
@@ -342,6 +342,28 @@ interface SourceMapper {
|
|
|
342
342
|
resolveTestFilePath(testFilePath: string): string | undefined;
|
|
343
343
|
}
|
|
344
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
|
|
345
367
|
//#region src/types/timing.d.ts
|
|
346
368
|
interface TimingResult {
|
|
347
369
|
coverageMs?: number;
|
|
@@ -389,6 +411,14 @@ interface RunProjectsOptions {
|
|
|
389
411
|
scriptOverride?: string;
|
|
390
412
|
startTime: number;
|
|
391
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;
|
|
392
422
|
version: string;
|
|
393
423
|
workStealing?: boolean;
|
|
394
424
|
}
|
|
@@ -674,6 +704,12 @@ type RunResult = MultiRunResult | SingleRunResult | WorkspaceRunResult;
|
|
|
674
704
|
interface RunOptions {
|
|
675
705
|
cli: CliOptions;
|
|
676
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;
|
|
677
713
|
}
|
|
678
714
|
//#endregion
|
|
679
715
|
//#region src/run.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { B as defineProject, C as formatFailure, F as JEST_ARGV_EXCLUDED_KEYS, I as ROOT_CLI_KEYS, L as SHARED_TEST_KEYS, M as resolveConfig, N as DEFAULT_CONFIG, O as extractJsonFromOutput, P as GLOBAL_TEST_KEYS, S as writeJsonFile, T as formatTestSummary, _ as runProjects, a as visitStatement, b as writeGameOutput, c as OpenCloudBackend, d as generateTestScript, g as formatExecuteOutput, h as formatJobSummary, i as visitExpression, j as loadConfig, k as parseJestOutput, l as createOpenCloudBackend, m as formatAnnotations, n as runTypecheck, o as StudioBackend, r as visitBlock, s as createStudioBackend, t as runJestRoblox, u as buildJestArgv, v as formatGameOutputNotice, w as formatResult, x as formatJson, y as parseGameOutput, z as defineConfig } from "./run-
|
|
1
|
+
import { B as defineProject, C as formatFailure, F as JEST_ARGV_EXCLUDED_KEYS, I as ROOT_CLI_KEYS, L as SHARED_TEST_KEYS, M as resolveConfig, N as DEFAULT_CONFIG, O as extractJsonFromOutput, P as GLOBAL_TEST_KEYS, S as writeJsonFile, T as formatTestSummary, _ as runProjects, a as visitStatement, b as writeGameOutput, c as OpenCloudBackend, d as generateTestScript, g as formatExecuteOutput, h as formatJobSummary, i as visitExpression, j as loadConfig, k as parseJestOutput, l as createOpenCloudBackend, m as formatAnnotations, n as runTypecheck, o as StudioBackend, r as visitBlock, s as createStudioBackend, t as runJestRoblox, u as buildJestArgv, v as formatGameOutputNotice, w as formatResult, x as formatJson, y as parseGameOutput, z as defineConfig } from "./run-Cl5gYSQr.mjs";
|
|
2
2
|
export { DEFAULT_CONFIG, GLOBAL_TEST_KEYS, JEST_ARGV_EXCLUDED_KEYS, OpenCloudBackend, ROOT_CLI_KEYS, SHARED_TEST_KEYS, StudioBackend, 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 };
|