@ultimat3/testing 30.8.0 → 31.0.0
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/CLAUDE.md +49 -62
- package/README.md +179 -39
- package/package.json +23 -17
- package/src/ai-conformance-answer.ts +67 -0
- package/src/ai-gateway-conformance.ts +105 -0
- package/src/ai-provider-conformance.ts +69 -0
- package/src/ai-provider-transport-conformance.ts +170 -0
- package/src/audit-sink-conformance.ts +204 -0
- package/src/auth-adapter-conformance-credentials.ts +124 -0
- package/src/auth-adapter-conformance-mfa.ts +70 -0
- package/src/auth-adapter-conformance-passkeys.ts +133 -0
- package/src/auth-adapter-conformance-sessions.ts +115 -0
- package/src/auth-adapter-conformance-support.ts +71 -0
- package/src/auth-adapter-conformance-users.ts +128 -0
- package/src/auth-adapter-conformance.ts +34 -0
- package/src/auth-limiter-factory-conformance.ts +224 -0
- package/src/auth-server-store-conformance-records.ts +69 -0
- package/src/auth-server-store-conformance.ts +208 -0
- package/src/cache-tier-conformance-checks.ts +142 -0
- package/src/cache-tier-conformance.ts +24 -0
- package/src/cassette-format.ts +8 -13
- package/src/cassette-record.ts +1 -1
- package/src/cdp-browser.ts +10 -11
- package/src/cdp-e2e-page.ts +2 -2
- package/src/cdp-e2e-session.ts +2 -2
- package/src/cdp-network-probe.ts +1 -1
- package/src/cdp-offline-script.ts +2 -2
- package/src/clock-conformance.ts +126 -0
- package/src/conformance.ts +239 -0
- package/src/e2e-browser-handle.ts +1 -2
- package/src/e2e-error-codes.ts +17 -16
- package/src/e2e-run.ts +4 -3
- package/src/embedder-conformance.ts +101 -0
- package/src/entity-conformance-aggregates.ts +210 -0
- package/src/entity-conformance-batches.ts +216 -0
- package/src/entity-conformance-bulk.ts +379 -0
- package/src/entity-conformance-checks.ts +27 -0
- package/src/entity-conformance-entities.ts +52 -0
- package/src/entity-conformance-locks.ts +286 -0
- package/src/entity-conformance-matrix.ts +397 -0
- package/src/entity-conformance-reads.ts +241 -0
- package/src/entity-conformance-support.ts +56 -0
- package/src/entity-conformance-tenancy.ts +296 -0
- package/src/entity-conformance-values.ts +305 -0
- package/src/entity-conformance-versions.ts +60 -0
- package/src/entity-conformance-writes.ts +348 -0
- package/src/entity-driver-conformance.ts +103 -0
- package/src/error-groups-store-conformance.ts +198 -0
- package/src/error-reporter-conformance.ts +119 -0
- package/src/errors.ts +41 -11
- package/src/event-bus-conformance.ts +161 -0
- package/src/exercise-drift-hint.ts +4 -1
- package/src/exercise-judge.ts +5 -3
- package/src/exercise-override-input.ts +22 -9
- package/src/exercise-override-line.ts +98 -0
- package/src/exercise-report.ts +30 -51
- package/src/exercise-sweeps.ts +3 -1
- package/src/exercise.ts +38 -19
- package/src/factories.ts +192 -179
- package/src/factory-api.ts +131 -0
- package/src/factory-associations.ts +67 -0
- package/src/factory-errors.ts +38 -0
- package/src/factory-lint.ts +92 -0
- package/src/factory-persist.ts +74 -16
- package/src/factory-pipeline.ts +191 -0
- package/src/factory-registry.ts +2 -1
- package/src/factory-types.ts +131 -0
- package/src/failure-store-conformance.ts +137 -0
- package/src/fixture-jobs.ts +50 -15
- package/src/fixture-mail.ts +7 -7
- package/src/fixture-seed.ts +111 -0
- package/src/fixture-statements.ts +68 -52
- package/src/framework-fixtures.ts +1 -1
- package/src/idempotency-store-conformance.ts +186 -0
- package/src/idempotency-store-replay-conformance.ts +140 -0
- package/src/idempotency-store-tx-conformance.ts +132 -0
- package/src/idempotency-store-world-conformance.ts +82 -0
- package/src/identity-provider-conformance.ts +144 -0
- package/src/image-transform-conformance.ts +89 -0
- package/src/index.ts +68 -157
- package/src/isr-store-conformance.ts +113 -0
- package/src/job-sim-effects.ts +19 -31
- package/src/job-sim-world.ts +6 -15
- package/src/lease-store-conformance.ts +195 -0
- package/src/mail-driver-conformance.ts +108 -0
- package/src/matcher-doubles.ts +104 -0
- package/src/matcher-stub.ts +78 -0
- package/src/matcher-surface.ts +21 -0
- package/src/matchers.ts +19 -1
- package/src/mcp-confirmation-store-conformance.ts +262 -0
- package/src/meter-store-conformance.ts +135 -0
- package/src/notify-digest-conformance.ts +133 -0
- package/src/notify-inbox-conformance.ts +130 -0
- package/src/notify-ledger-conformance.ts +134 -0
- package/src/notify-preference-conformance.ts +49 -0
- package/src/notify-stores-conformance.ts +73 -0
- package/src/outbox-store-conformance-claims.ts +112 -0
- package/src/outbox-store-conformance-subject.ts +65 -0
- package/src/outbox-store-conformance.ts +71 -0
- package/src/per-test-reset.ts +55 -20
- package/src/plan-oracle.ts +10 -3
- package/src/plan-sweep.ts +37 -12
- package/src/preload.ts +4 -2
- package/src/purge-conformance.ts +79 -0
- package/src/push-device-conformance.ts +124 -0
- package/src/push-subscription-conformance.ts +123 -0
- package/src/quiet-logs.ts +4 -4
- package/src/rate-limit-store-conformance.ts +178 -0
- package/src/registry-leak-error.ts +8 -1
- package/src/scale-sweep-run.ts +3 -1
- package/src/scrape-driver-conformance-frame-checks.ts +97 -0
- package/src/scrape-driver-conformance-page-checks.ts +114 -0
- package/src/scrape-driver-conformance-site.ts +84 -0
- package/src/scrape-driver-conformance.ts +34 -0
- package/src/sealed-dns-resolver.ts +56 -0
- package/src/sealed-dns.ts +63 -64
- package/src/sealed-network.ts +13 -12
- package/src/sealed-node-sockets.ts +63 -0
- package/src/sealed-sockets.ts +13 -8
- package/src/sealed-udp.ts +118 -0
- package/src/search-index-conformance-list.ts +76 -0
- package/src/search-index-conformance-support.ts +69 -0
- package/src/search-index-conformance-versions.ts +66 -0
- package/src/search-index-conformance.ts +126 -0
- package/src/secret-source-conformance.ts +91 -0
- package/src/seed-factories.ts +57 -0
- package/src/seed-writer.ts +8 -19
- package/src/semantic-cache-factory-conformance.ts +86 -0
- package/src/sms-transport-conformance.ts +102 -0
- package/src/step-store-conformance.ts +171 -0
- package/src/storage-conformance-read-checks.ts +132 -0
- package/src/storage-conformance-shape.ts +121 -0
- package/src/storage-conformance-stream-checks.ts +226 -0
- package/src/storage-conformance.ts +34 -0
- package/src/stub-action.ts +24 -0
- package/src/stub-errors.ts +86 -0
- package/src/stub-job.ts +30 -0
- package/src/stub-query.ts +25 -0
- package/src/stub-script.ts +76 -0
- package/src/stub-stack.ts +29 -0
- package/src/stub.ts +73 -0
- package/src/swap-adapter.ts +135 -0
- package/src/test-scope.ts +96 -0
- package/src/test-types.ts +1 -1
- package/src/totp-replay-guard-conformance.ts +76 -0
- package/src/transport-conformance.ts +179 -0
- package/src/upload-scanner-conformance.ts +112 -0
- package/src/vector-store-conformance-checks.ts +174 -0
- package/src/vector-store-conformance.ts +21 -0
- package/src/cdp-connection.ts +0 -291
- package/src/cdp-errors.ts +0 -179
- package/src/cdp-launch-attempt.ts +0 -224
- package/src/cdp-launch-candidates.ts +0 -62
- package/src/cdp-launch-profile.ts +0 -106
- package/src/cdp-launch-reap.ts +0 -68
- package/src/cdp-launch-wire.ts +0 -171
- package/src/cdp-launch.ts +0 -175
- package/src/cdp-pipe.ts +0 -77
- package/src/cdp-wire-watch.ts +0 -113
package/src/cassette-format.ts
CHANGED
|
@@ -116,21 +116,16 @@ export const decodeBody = (entry: CassetteEntry): Uint8Array<ArrayBuffer> =>
|
|
|
116
116
|
? Uint8Array.from(Buffer.from(entry.body, 'base64'))
|
|
117
117
|
: new TextEncoder().encode(entry.body);
|
|
118
118
|
|
|
119
|
-
/**
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Sorted keys at every depth and a trailing newline: a re-recording diffs by what changed.
|
|
121
|
+
* `@ultimat3/action`'s DOCUMENT form, never a local sorter: the file is committed and re-parsed.
|
|
122
|
+
* Loaded at the call: this module is on the barrel, and `action` is dynamic-only there.
|
|
123
|
+
*/
|
|
124
|
+
export async function serializeCassette(file: CassetteFile): Promise<string> {
|
|
125
|
+
const { stableStringify } = await import('@ultimat3/action');
|
|
126
|
+
return `${stableStringify(file, 2)}\n`;
|
|
122
127
|
}
|
|
123
128
|
|
|
124
|
-
const sorted = (value: unknown): unknown => {
|
|
125
|
-
if (Array.isArray(value)) return value.map(sorted);
|
|
126
|
-
if (typeof value !== 'object' || value === null) return value;
|
|
127
|
-
return Object.fromEntries(
|
|
128
|
-
Object.keys(value)
|
|
129
|
-
.sort()
|
|
130
|
-
.map((key) => [key, sorted((value as Record<string, unknown>)[key])]),
|
|
131
|
-
);
|
|
132
|
-
};
|
|
133
|
-
|
|
134
129
|
/** The file read back, its shape checked: a hand-edited cassette that broke is named, not replayed. */
|
|
135
130
|
export function parseCassette(text: string, file: string): CassetteFile {
|
|
136
131
|
let parsed: unknown;
|
package/src/cassette-record.ts
CHANGED
|
@@ -87,7 +87,7 @@ export function startRecording(input: RecordInput): Recording {
|
|
|
87
87
|
if (globalThis.fetch === tap) globalThis.fetch = sealed;
|
|
88
88
|
// A body that failed to read rejects here, so a half run is never a recording.
|
|
89
89
|
const entries = (await Promise.all(slots)).map((entry) => redacted(entry, input.redact));
|
|
90
|
-
const text = serializeCassette({ version: CASSETTE_VERSION, entries });
|
|
90
|
+
const text = await serializeCassette({ version: CASSETTE_VERSION, entries });
|
|
91
91
|
// LAST, over the exact bytes about to be written — what `redact` returned included.
|
|
92
92
|
const sources = secretSources(input.env, input.secrets);
|
|
93
93
|
// A base64 body hides a value at any of three alignments, so its bytes are scanned too.
|
package/src/cdp-browser.ts
CHANGED
|
@@ -8,13 +8,17 @@
|
|
|
8
8
|
// already decided a browser is required.
|
|
9
9
|
|
|
10
10
|
import { finiteCount } from '@ultimat3/core';
|
|
11
|
+
import type { LaunchedBrowser } from '@ultimat3/scraping/cdp';
|
|
12
|
+
import {
|
|
13
|
+
CdpBrowserMissingError,
|
|
14
|
+
CHROME_CANDIDATES,
|
|
15
|
+
findChrome,
|
|
16
|
+
LAUNCH_BUDGET_MS,
|
|
17
|
+
launchChrome,
|
|
18
|
+
} from '@ultimat3/scraping/cdp';
|
|
11
19
|
import type { E2eTab } from './cdp-e2e-page';
|
|
12
20
|
import type { E2eSession } from './cdp-e2e-session';
|
|
13
21
|
import { cdpE2eSession } from './cdp-e2e-session';
|
|
14
|
-
import { CdpBrowserMissingError } from './cdp-errors';
|
|
15
|
-
import type { LaunchedBrowser } from './cdp-launch';
|
|
16
|
-
import { CHROME_CANDIDATES, findChrome, LAUNCH_BUDGET_MS, launchChrome } from './cdp-launch';
|
|
17
|
-
import { LAUNCHED_CLOSE_MS } from './cdp-launch-attempt';
|
|
18
22
|
|
|
19
23
|
/** How long a launch, a connect or a single CDP call may take. One number, three deadlines. */
|
|
20
24
|
export const DEFAULT_CDP_TIMEOUT_MS = 30_000;
|
|
@@ -41,13 +45,8 @@ export const E2E_TAB_OPEN_MS = TAB_OPEN_DEADLINES * DEFAULT_CDP_TIMEOUT_MS;
|
|
|
41
45
|
export const E2E_BROWSER_OPEN_MS =
|
|
42
46
|
LAUNCH_BUDGET_MS + SESSION_SETUP_DEADLINES * DEFAULT_CDP_TIMEOUT_MS + E2E_TAB_OPEN_MS;
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
* bounded (`LAUNCHED_CLOSE_MS`). THE deadline for a hook that closes a browser it already holds: a
|
|
47
|
-
* hook left at Bun's 5 s default is killed mid-close, and when it is the run's last the process
|
|
48
|
-
* exits with the profile half-removed — the `x-e2e-chrome-*` directories found leaked in `/tmp`.
|
|
49
|
-
*/
|
|
50
|
-
export const E2E_BROWSER_CLOSE_MS = LAUNCHED_CLOSE_MS;
|
|
48
|
+
// The longest `E2eBrowser.close()` takes is `LAUNCHED_CLOSE_MS` (`@ultimat3/scraping/cdp`), the
|
|
49
|
+
// launched browser's own close: THE deadline for a hook that closes a browser, one name since 31.0.0.
|
|
51
50
|
|
|
52
51
|
/**
|
|
53
52
|
* Sequential deadlines one `tab.goto()` spends: the load event raced against `Page.navigate`'s
|
package/src/cdp-e2e-page.ts
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
// through it: `ScrapePage` is a full scraping surface whose intended implementation is
|
|
8
8
|
// `puppeteer-core`, and an e2e driver needs none of it.
|
|
9
9
|
|
|
10
|
+
import type { CdpConnection } from '@ultimat3/scraping/cdp';
|
|
11
|
+
import { CdpCallFailedError, CdpTimeoutError } from '@ultimat3/scraping/cdp';
|
|
10
12
|
import type { AxTreeNode } from './ax-node';
|
|
11
13
|
import { axRecord, toAxTreeNodes } from './ax-node';
|
|
12
|
-
import type { CdpConnection } from './cdp-connection';
|
|
13
|
-
import { CdpCallFailedError, CdpTimeoutError } from './cdp-errors';
|
|
14
14
|
import type { AxTreeRequest, E2eBrowserPage } from './e2e-page';
|
|
15
15
|
|
|
16
16
|
/** What the page threw, when `Runtime.evaluate` answered with an exception rather than a value. */
|
package/src/cdp-e2e-session.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
// from their first byte; the offline switch, the init scripts, and the log of every WebSocket and
|
|
4
4
|
// request the browser made. A tab is `cdp-e2e-page.ts`'s; this file decides what every tab shares.
|
|
5
5
|
|
|
6
|
-
import type { CdpConnection } from '
|
|
6
|
+
import type { CdpConnection } from '@ultimat3/scraping/cdp';
|
|
7
|
+
import { CdpCallFailedError, CdpTimeoutError } from '@ultimat3/scraping/cdp';
|
|
7
8
|
import type { E2eTab } from './cdp-e2e-page';
|
|
8
9
|
import { cdpE2eTab } from './cdp-e2e-page';
|
|
9
|
-
import { CdpCallFailedError, CdpTimeoutError } from './cdp-errors';
|
|
10
10
|
import { isNetworkProbe, networkAgrees } from './cdp-network-probe';
|
|
11
11
|
import { offlineScripts } from './cdp-offline-script';
|
|
12
12
|
import type { AuditedTab } from './e2e-a11y-tabs';
|
package/src/cdp-network-probe.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// the condition (two pipes, no order between them), so a `fetch` on the next line went through under
|
|
4
4
|
// a cut the page already read as offline — `browser-harness.e2e.test.ts`, CI run 39223207154.
|
|
5
5
|
|
|
6
|
-
import type { CdpResult } from '
|
|
6
|
+
import type { CdpResult } from '@ultimat3/scraping/cdp';
|
|
7
7
|
|
|
8
8
|
type Send = (
|
|
9
9
|
method: string,
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
// restore; one it never told gets one from `RESTORE_ONLINE`, so a page reconnects exactly once.
|
|
13
13
|
|
|
14
14
|
import { stringField } from '@ultimat3/core';
|
|
15
|
-
import type { CdpResult } from '
|
|
16
|
-
import { CdpCallFailedError } from '
|
|
15
|
+
import type { CdpResult } from '@ultimat3/scraping/cdp';
|
|
16
|
+
import { CdpCallFailedError } from '@ultimat3/scraping/cdp';
|
|
17
17
|
|
|
18
18
|
type Send = (
|
|
19
19
|
method: string,
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// The `clock` port's contract as shared examples: `behavesLike(sleepClockConformance, () => clock)`.
|
|
2
|
+
// The abort half is the point: a watchdog aborts a wedged run with an `UltimateError` carrying a
|
|
3
|
+
// fix, and a clock that wraps that reason, or keeps waiting, loses both.
|
|
4
|
+
|
|
5
|
+
import { expect, test } from 'bun:test';
|
|
6
|
+
import type { SleepClock } from '@ultimat3/core';
|
|
7
|
+
import { isUltimateError } from '@ultimat3/core';
|
|
8
|
+
import type { SharedExamples } from './shared-examples';
|
|
9
|
+
import { sharedExamples } from './shared-examples';
|
|
10
|
+
|
|
11
|
+
export interface SleepClockCheck {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
run(clock: SleepClock): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Long enough that a clock which really waits it out fails the test's own timeout instead. */
|
|
17
|
+
const AN_HOUR = 3_600_000;
|
|
18
|
+
|
|
19
|
+
/** What a sleep settled as — its rejection reason kept by identity, never re-rendered. */
|
|
20
|
+
const settled = (pending: Promise<void>): Promise<{ readonly reason: unknown } | 'resolved'> =>
|
|
21
|
+
pending.then(
|
|
22
|
+
() => 'resolved' as const,
|
|
23
|
+
(reason: unknown) => ({ reason }),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
/** A signal that counts the `abort` listeners still attached to it — the leak a long run pays. */
|
|
27
|
+
function countingSignal(): { readonly signal: AbortSignal; attached(): number } {
|
|
28
|
+
const signal = new AbortController().signal;
|
|
29
|
+
const live = new Set<unknown>();
|
|
30
|
+
const add = signal.addEventListener.bind(signal);
|
|
31
|
+
const remove = signal.removeEventListener.bind(signal);
|
|
32
|
+
Object.defineProperty(signal, 'addEventListener', {
|
|
33
|
+
value: (type: string, listener: EventListenerOrEventListenerObject, options?: unknown) => {
|
|
34
|
+
if (type === 'abort') live.add(listener);
|
|
35
|
+
add(type, listener, options as AddEventListenerOptions);
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(signal, 'removeEventListener', {
|
|
39
|
+
value: (type: string, listener: EventListenerOrEventListenerObject, options?: unknown) => {
|
|
40
|
+
if (type === 'abort') live.delete(listener);
|
|
41
|
+
remove(type, listener, options as EventListenerOptions);
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
return { signal, attached: () => live.size };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const SLEEP_CLOCK_CHECKS: readonly SleepClockCheck[] = [
|
|
48
|
+
{
|
|
49
|
+
name: 'now() is a real instant and monotonic() never runs backwards, across a sleep too',
|
|
50
|
+
async run(clock) {
|
|
51
|
+
const at = clock.now();
|
|
52
|
+
expect(Number.isFinite(at.getTime())).toBe(true);
|
|
53
|
+
const before = clock.monotonic();
|
|
54
|
+
expect(Number.isFinite(before)).toBe(true);
|
|
55
|
+
await clock.sleep(1);
|
|
56
|
+
expect(clock.monotonic()).toBeGreaterThanOrEqual(before);
|
|
57
|
+
expect(clock.now().getTime()).toBeGreaterThanOrEqual(at.getTime());
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'a short sleep with no signal resolves, to nothing',
|
|
62
|
+
async run(clock) {
|
|
63
|
+
expect(await clock.sleep(1)).toBeUndefined();
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'a wait that is not a number is refused X_INVARIANT, as a rejection — never a spin',
|
|
68
|
+
async run(clock) {
|
|
69
|
+
for (const ms of [Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY]) {
|
|
70
|
+
const outcome = await settled(clock.sleep(ms));
|
|
71
|
+
const reason = outcome === 'resolved' ? undefined : outcome.reason;
|
|
72
|
+
expect(isUltimateError(reason) ? reason.code : String(reason)).toBe('X_INVARIANT');
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'an already-aborted signal rejects with its reason VERBATIM, and waits for nothing',
|
|
78
|
+
async run(clock) {
|
|
79
|
+
const controller = new AbortController();
|
|
80
|
+
const reason = { cancelledBy: 'the watchdog', stage: 'before the wait' };
|
|
81
|
+
controller.abort(reason);
|
|
82
|
+
const outcome = await settled(clock.sleep(AN_HOUR, controller.signal));
|
|
83
|
+
expect(outcome !== 'resolved' && outcome.reason === reason).toBe(true);
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'an abort while the sleep is pending rejects with that reason, by identity',
|
|
88
|
+
async run(clock) {
|
|
89
|
+
const controller = new AbortController();
|
|
90
|
+
const reason = new Error('the watchdog fired');
|
|
91
|
+
const pending = settled(clock.sleep(AN_HOUR, controller.signal));
|
|
92
|
+
controller.abort(reason);
|
|
93
|
+
const outcome = await pending;
|
|
94
|
+
expect(outcome !== 'resolved' && outcome.reason === reason).toBe(true);
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'aborting one sleep leaves a sibling on another signal to resolve',
|
|
99
|
+
async run(clock) {
|
|
100
|
+
const [doomed, sibling] = [new AbortController(), new AbortController()];
|
|
101
|
+
const cut = settled(clock.sleep(AN_HOUR, doomed.signal));
|
|
102
|
+
const kept = settled(clock.sleep(1, sibling.signal));
|
|
103
|
+
doomed.abort('gone');
|
|
104
|
+
expect([await cut, await kept]).toEqual([{ reason: 'gone' }, 'resolved']);
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'a sleep that completed leaves no abort listener on the signal it was handed',
|
|
109
|
+
async run(clock) {
|
|
110
|
+
const { signal, attached } = countingSignal();
|
|
111
|
+
for (let poll = 0; poll < 5; poll += 1) await clock.sleep(1, signal);
|
|
112
|
+
expect(attached()).toBe(0);
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
];
|
|
116
|
+
|
|
117
|
+
export const sleepClockConformance: SharedExamples<SleepClock> = sharedExamples(
|
|
118
|
+
'a sleep clock',
|
|
119
|
+
(subject) => {
|
|
120
|
+
for (const check of SLEEP_CLOCK_CHECKS) {
|
|
121
|
+
test(check.name, async () => {
|
|
122
|
+
await check.run(subject());
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
);
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
// `@ultimat3/testing/conformance` — every port's contract as shared examples, one suite per
|
|
2
|
+
// interface an app may implement: `behavesLike(<port>Conformance, () => yours)`. Its own entry point,
|
|
3
|
+
// off the `.` barrel: these suites statically import the packages whose ports they hold to.
|
|
4
|
+
// Grouped by the package that owns the interface; names match `ADAPTER_PORTS[].conformance`.
|
|
5
|
+
|
|
6
|
+
// @ultimat3/ai — Gateway (aiGateway), Embedder (embedder), SemanticCacheFactory (semanticCache),
|
|
7
|
+
// BudgetStore; Provider, VectorStore (no rows)
|
|
8
|
+
export type { GatewayCheck, GatewaySubject } from './ai-gateway-conformance';
|
|
9
|
+
export { GATEWAY_CHECKS, gatewayConformance } from './ai-gateway-conformance';
|
|
10
|
+
export type { ProviderCheck, ProviderSubject } from './ai-provider-conformance';
|
|
11
|
+
export { PROVIDER_CHECKS, providerConformance } from './ai-provider-conformance';
|
|
12
|
+
export type {
|
|
13
|
+
ProviderTransportCheck,
|
|
14
|
+
ProviderTransportSubject,
|
|
15
|
+
} from './ai-provider-transport-conformance';
|
|
16
|
+
export {
|
|
17
|
+
PROVIDER_TRANSPORT_CHECKS,
|
|
18
|
+
providerTransportConformance,
|
|
19
|
+
} from './ai-provider-transport-conformance';
|
|
20
|
+
// @ultimat3/core — AuditSink, FailureStore, SleepClock (clock), SecretSource
|
|
21
|
+
export type { AuditKept, AuditSinkCheck, AuditSinkSubject } from './audit-sink-conformance';
|
|
22
|
+
export { AUDIT_SINK_CHECKS, auditSinkConformance } from './audit-sink-conformance';
|
|
23
|
+
// @ultimat3/auth — AuthLimiterFactory, AuthServerStore, TotpReplayGuard; AuthAdapter (no row)
|
|
24
|
+
export type { AuthAdapterCheck, AuthAdapterSubject } from './auth-adapter-conformance';
|
|
25
|
+
export { AUTH_ADAPTER_CHECKS, authAdapterConformance } from './auth-adapter-conformance';
|
|
26
|
+
export type { AuthLimiterCheck, AuthLimiterSubject } from './auth-limiter-factory-conformance';
|
|
27
|
+
export {
|
|
28
|
+
AUTH_LIMITER_CHECKS,
|
|
29
|
+
authLimiterFactoryConformance,
|
|
30
|
+
} from './auth-limiter-factory-conformance';
|
|
31
|
+
export type { AuthServerStoreCheck } from './auth-server-store-conformance';
|
|
32
|
+
export {
|
|
33
|
+
AUTH_SERVER_STORE_CHECKS,
|
|
34
|
+
authServerStoreConformance,
|
|
35
|
+
} from './auth-server-store-conformance';
|
|
36
|
+
export type { BudgetStoreCheck, BudgetStoreLike } from './budget-store-conformance';
|
|
37
|
+
export { BUDGET_STORE_CHECKS, budgetStoreConformance } from './budget-store-conformance';
|
|
38
|
+
// @ultimat3/cache — CacheTier (cacheTiers), PurgeDriver (purge)
|
|
39
|
+
export type { CacheTierCheck } from './cache-tier-conformance';
|
|
40
|
+
export { CACHE_TIER_CHECKS, cacheTierConformance } from './cache-tier-conformance';
|
|
41
|
+
export type { SleepClockCheck } from './clock-conformance';
|
|
42
|
+
export { SLEEP_CLOCK_CHECKS, sleepClockConformance } from './clock-conformance';
|
|
43
|
+
export type { EmbedderCheck } from './embedder-conformance';
|
|
44
|
+
export { EMBEDDER_CHECKS, embedderConformance } from './embedder-conformance';
|
|
45
|
+
// @ultimat3/entity — the Driver behind `database()` (no row: chosen per `database()` call)
|
|
46
|
+
export { ENTITY_DRIVER_CHECKS } from './entity-conformance-checks';
|
|
47
|
+
export type {
|
|
48
|
+
EntityDriverCheck,
|
|
49
|
+
EntityDriverRun,
|
|
50
|
+
EntityDriverSubject,
|
|
51
|
+
} from './entity-driver-conformance';
|
|
52
|
+
export { entityDriverConformance } from './entity-driver-conformance';
|
|
53
|
+
// @ultimat3/admin — ErrorGroupsStore (no ADAPTER_PORTS row)
|
|
54
|
+
export type {
|
|
55
|
+
ErrorGroupLike,
|
|
56
|
+
ErrorGroupOccurrenceLike,
|
|
57
|
+
ErrorGroupStatusLike,
|
|
58
|
+
ErrorGroupsStoreCheck,
|
|
59
|
+
ErrorGroupsStoreLike,
|
|
60
|
+
} from './error-groups-store-conformance';
|
|
61
|
+
export {
|
|
62
|
+
ERROR_GROUPS_STORE_CHECKS,
|
|
63
|
+
errorGroupsStoreConformance,
|
|
64
|
+
} from './error-groups-store-conformance';
|
|
65
|
+
// @ultimat3/core — ErrorReporter (errorReporter)
|
|
66
|
+
export type { ErrorReporterCheck, ErrorReporterSubject } from './error-reporter-conformance';
|
|
67
|
+
export {
|
|
68
|
+
conformanceReport,
|
|
69
|
+
ERROR_REPORTER_CHECKS,
|
|
70
|
+
errorReporterConformance,
|
|
71
|
+
} from './error-reporter-conformance';
|
|
72
|
+
// @ultimat3/jobs — JobDriver (jobs), EventBus, OutboxStore; StepStore, LeaseStore (JobDriver's)
|
|
73
|
+
export type { EventBusCheck, EventBusSubject } from './event-bus-conformance';
|
|
74
|
+
export { EVENT_BUS_CHECKS, eventBusConformance } from './event-bus-conformance';
|
|
75
|
+
export type { FailureStoreCheck, FailureStoreSubject } from './failure-store-conformance';
|
|
76
|
+
export {
|
|
77
|
+
FAILURE_STORE_CHECKS,
|
|
78
|
+
failureBundle,
|
|
79
|
+
failureStoreConformance,
|
|
80
|
+
} from './failure-store-conformance';
|
|
81
|
+
// @ultimat3/action — IdempotencyStore, MeterStore
|
|
82
|
+
export type {
|
|
83
|
+
IdempotencyStoreCheck,
|
|
84
|
+
IdempotencyStoreSubject,
|
|
85
|
+
} from './idempotency-store-conformance';
|
|
86
|
+
export {
|
|
87
|
+
IDEMPOTENCY_STORE_CHECKS,
|
|
88
|
+
idempotencyKeyOf,
|
|
89
|
+
idempotencyStoreConformance,
|
|
90
|
+
} from './idempotency-store-conformance';
|
|
91
|
+
// @ultimat3/auth — IdentityProvider (no row: an app holds several at once, by id)
|
|
92
|
+
export type {
|
|
93
|
+
IdentityProviderCheck,
|
|
94
|
+
IdentityProviderHarness,
|
|
95
|
+
} from './identity-provider-conformance';
|
|
96
|
+
export {
|
|
97
|
+
IDENTITY_PROVIDER_CHECKS,
|
|
98
|
+
identityProviderConformance,
|
|
99
|
+
} from './identity-provider-conformance';
|
|
100
|
+
// @ultimat3/seo — ImageTransformDriver (images)
|
|
101
|
+
export type { ImageTransformCheck, ImageTransformSubject } from './image-transform-conformance';
|
|
102
|
+
export {
|
|
103
|
+
IMAGE_CONFORMANCE_SOURCE,
|
|
104
|
+
IMAGE_TRANSFORM_CHECKS,
|
|
105
|
+
imageTransformDriverConformance,
|
|
106
|
+
} from './image-transform-conformance';
|
|
107
|
+
// @ultimat3/render — IsrStore
|
|
108
|
+
export type { IsrStoreCheck } from './isr-store-conformance';
|
|
109
|
+
export { ISR_STORE_CHECKS, isrStoreConformance } from './isr-store-conformance';
|
|
110
|
+
export type { JobDriverCheck } from './job-driver-checks';
|
|
111
|
+
export { JOB_DRIVER_CHECKS } from './job-driver-checks';
|
|
112
|
+
export { jobDriverConformance } from './job-driver-conformance';
|
|
113
|
+
export type { LeaseStoreCheck, LeaseStoreSubject } from './lease-store-conformance';
|
|
114
|
+
export { LEASE_STORE_CHECKS, leaseStoreConformance } from './lease-store-conformance';
|
|
115
|
+
// @ultimat3/mail — MailDriver
|
|
116
|
+
export type { MailDriverCheck } from './mail-driver-conformance';
|
|
117
|
+
export {
|
|
118
|
+
conformanceMail,
|
|
119
|
+
MAIL_DRIVER_CHECKS,
|
|
120
|
+
mailDriverConformance,
|
|
121
|
+
} from './mail-driver-conformance';
|
|
122
|
+
// @ultimat3/mcp — McpConfirmationStore
|
|
123
|
+
export type { McpConfirmationStoreCheck } from './mcp-confirmation-store-conformance';
|
|
124
|
+
export {
|
|
125
|
+
MCP_CONFIRMATION_STORE_CHECKS,
|
|
126
|
+
mcpConfirmationStoreConformance,
|
|
127
|
+
} from './mcp-confirmation-store-conformance';
|
|
128
|
+
export type { MeterStoreCheck } from './meter-store-conformance';
|
|
129
|
+
export { METER_STORE_CHECKS, meterStoreConformance } from './meter-store-conformance';
|
|
130
|
+
// @ultimat3/notify — NotifyStores (notifyStores) and each store alone
|
|
131
|
+
export type { DigestStoreCheck } from './notify-digest-conformance';
|
|
132
|
+
export { DIGEST_STORE_CHECKS } from './notify-digest-conformance';
|
|
133
|
+
export type { InboxStoreCheck } from './notify-inbox-conformance';
|
|
134
|
+
export { INBOX_STORE_CHECKS } from './notify-inbox-conformance';
|
|
135
|
+
export type { DeliveryLedgerCheck } from './notify-ledger-conformance';
|
|
136
|
+
export { DELIVERY_LEDGER_CHECKS } from './notify-ledger-conformance';
|
|
137
|
+
export type { PreferenceStoreCheck } from './notify-preference-conformance';
|
|
138
|
+
export { PREFERENCE_STORE_CHECKS } from './notify-preference-conformance';
|
|
139
|
+
export type { NotifyStoresSubject } from './notify-stores-conformance';
|
|
140
|
+
export {
|
|
141
|
+
deliveryLedgerConformance,
|
|
142
|
+
digestStoreConformance,
|
|
143
|
+
inboxStoreConformance,
|
|
144
|
+
notifyStoresConformance,
|
|
145
|
+
preferenceStoreConformance,
|
|
146
|
+
} from './notify-stores-conformance';
|
|
147
|
+
export type { OutboxStoreCheck, OutboxStoreSubject } from './outbox-store-conformance';
|
|
148
|
+
export { OUTBOX_STORE_CHECKS, outboxStoreConformance } from './outbox-store-conformance';
|
|
149
|
+
export type { PurgeCheck, PurgeSubject } from './purge-conformance';
|
|
150
|
+
export { PURGE_CHECKS, purgeDriverConformance } from './purge-conformance';
|
|
151
|
+
export type { PushDeviceStoreCheck } from './push-device-conformance';
|
|
152
|
+
export { PUSH_DEVICE_STORE_CHECKS, pushDeviceStoreConformance } from './push-device-conformance';
|
|
153
|
+
// @ultimat3/pwa — PushSubscriptionStore
|
|
154
|
+
export type { PushSubscriptionStoreCheck } from './push-subscription-conformance';
|
|
155
|
+
export {
|
|
156
|
+
PUSH_SUBSCRIPTION_STORE_CHECKS,
|
|
157
|
+
pushSubscriptionStoreConformance,
|
|
158
|
+
} from './push-subscription-conformance';
|
|
159
|
+
// @ultimat3/http — RateLimitStore
|
|
160
|
+
export type { RateLimitStoreCheck } from './rate-limit-store-conformance';
|
|
161
|
+
export {
|
|
162
|
+
RATE_LIMIT_STORE_CHECKS,
|
|
163
|
+
rateLimitStoreConformance,
|
|
164
|
+
} from './rate-limit-store-conformance';
|
|
165
|
+
// @ultimat3/scraping — ScrapeDriver
|
|
166
|
+
export { SCRAPE_DRIVER_CHECKS, scrapeDriverConformance } from './scrape-driver-conformance';
|
|
167
|
+
export type { ScrapeDriverCheck } from './scrape-driver-conformance-page-checks';
|
|
168
|
+
export {
|
|
169
|
+
SCRAPE_CONFORMANCE_HOST,
|
|
170
|
+
SCRAPE_CONFORMANCE_HTTP,
|
|
171
|
+
SCRAPE_CONFORMANCE_PAGES,
|
|
172
|
+
SCRAPE_CONFORMANCE_URLS,
|
|
173
|
+
} from './scrape-driver-conformance-site';
|
|
174
|
+
// @ultimat3/entity — SearchIndex (searchIndex)
|
|
175
|
+
export {
|
|
176
|
+
SEARCH_INDEX_ALL_CHECKS,
|
|
177
|
+
SEARCH_INDEX_CHECKS,
|
|
178
|
+
searchIndexConformance,
|
|
179
|
+
} from './search-index-conformance';
|
|
180
|
+
export {
|
|
181
|
+
listAll as listSearchDocuments,
|
|
182
|
+
SEARCH_INDEX_LIST_CHECKS,
|
|
183
|
+
} from './search-index-conformance-list';
|
|
184
|
+
export type {
|
|
185
|
+
SearchDocOptions,
|
|
186
|
+
SearchIndexCheck,
|
|
187
|
+
SearchIndexSubject,
|
|
188
|
+
} from './search-index-conformance-support';
|
|
189
|
+
export {
|
|
190
|
+
SEARCH_TENANT_A,
|
|
191
|
+
SEARCH_TENANT_B,
|
|
192
|
+
searchDoc,
|
|
193
|
+
searchDocId,
|
|
194
|
+
} from './search-index-conformance-support';
|
|
195
|
+
export { SEARCH_INDEX_VERSION_CHECKS } from './search-index-conformance-versions';
|
|
196
|
+
export type { SecretSourceCheck, SecretSourceSubject } from './secret-source-conformance';
|
|
197
|
+
export { SECRET_SOURCE_CHECKS, secretSourceConformance } from './secret-source-conformance';
|
|
198
|
+
export type { SemanticCacheFactoryCheck } from './semantic-cache-factory-conformance';
|
|
199
|
+
export {
|
|
200
|
+
SEMANTIC_CACHE_FACTORY_CHECKS,
|
|
201
|
+
semanticCacheFactoryConformance,
|
|
202
|
+
} from './semantic-cache-factory-conformance';
|
|
203
|
+
// @ultimat3/notify — SmsTransport (smsTransport)
|
|
204
|
+
export type { SmsTransportCheck } from './sms-transport-conformance';
|
|
205
|
+
export {
|
|
206
|
+
conformanceSms,
|
|
207
|
+
SMS_TRANSPORT_CHECKS,
|
|
208
|
+
smsTransportConformance,
|
|
209
|
+
} from './sms-transport-conformance';
|
|
210
|
+
export type { StepStoreCheck, StepStoreSubject } from './step-store-conformance';
|
|
211
|
+
export { STEP_STORE_CHECKS, stepStoreConformance } from './step-store-conformance';
|
|
212
|
+
// @ultimat3/storage — StorageDriver
|
|
213
|
+
export type { StorageCheck, StorageDriverLike } from './storage-conformance';
|
|
214
|
+
export { STORAGE_DRIVER_CHECKS, storageDriverConformance } from './storage-conformance';
|
|
215
|
+
export type { TotpReplayGuardCheck } from './totp-replay-guard-conformance';
|
|
216
|
+
export {
|
|
217
|
+
TOTP_REPLAY_GUARD_CHECKS,
|
|
218
|
+
totpReplayGuardConformance,
|
|
219
|
+
} from './totp-replay-guard-conformance';
|
|
220
|
+
// @ultimat3/realtime — Transport
|
|
221
|
+
export type { TransportCheck } from './transport-conformance';
|
|
222
|
+
export { TRANSPORT_CHECKS, transportConformance } from './transport-conformance';
|
|
223
|
+
// @ultimat3/storage — UploadScanner (uploadScanner), structural
|
|
224
|
+
export type {
|
|
225
|
+
ScanVerdictLike,
|
|
226
|
+
UploadScannerCheck,
|
|
227
|
+
UploadScannerLike,
|
|
228
|
+
} from './upload-scanner-conformance';
|
|
229
|
+
export {
|
|
230
|
+
UPLOAD_SCANNER_CHECKS,
|
|
231
|
+
UPLOAD_SCANNER_EICAR,
|
|
232
|
+
uploadScannerConformance,
|
|
233
|
+
} from './upload-scanner-conformance';
|
|
234
|
+
export { vectorStoreConformance } from './vector-store-conformance';
|
|
235
|
+
export type { VectorStoreCheck } from './vector-store-conformance-checks';
|
|
236
|
+
export {
|
|
237
|
+
VECTOR_CONFORMANCE_DIMENSION,
|
|
238
|
+
VECTOR_STORE_CHECKS,
|
|
239
|
+
} from './vector-store-conformance-checks';
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
// `e2eApp()`. On `globalThis` under one `Symbol.for` key, because the preload and a test may each
|
|
3
3
|
// hold their own copy of this module — the page-client handle's reason, one runtime over.
|
|
4
4
|
|
|
5
|
+
import { CdpBrowserMissingError, CHROME_CANDIDATES } from '@ultimat3/scraping/cdp';
|
|
5
6
|
import type { E2eBrowser } from './cdp-browser';
|
|
6
|
-
import { CdpBrowserMissingError } from './cdp-errors';
|
|
7
|
-
import { CHROME_CANDIDATES } from './cdp-launch';
|
|
8
7
|
import type { E2eApp } from './e2e-app';
|
|
9
8
|
|
|
10
9
|
/** Set by the e2e step to the app root; the preload spawns that app and opens a browser. */
|
package/src/e2e-error-codes.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
// The registry for the browser-backed e2e driver's codes: the seven `X_E2E_*` a page refuses with
|
|
2
|
-
//
|
|
3
|
-
//
|
|
1
|
+
// The registry for the browser-backed e2e driver's codes: the seven `X_E2E_*` a page refuses with,
|
|
2
|
+
// registered here (not in `errors.ts`, which sits at its ceiling). The four `X_CDP_*` its raw-CDP
|
|
3
|
+
// browser refuses with are `@ultimat3/scraping/cdp`'s since 31.0.0 — listed here, registered there.
|
|
4
4
|
import { registerErrorCodes } from '@ultimat3/core';
|
|
5
|
+
import { CDP_ERROR_CODES, CDP_ERROR_TITLES } from '@ultimat3/scraping/cdp';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
const OWN_E2E_CODES = [
|
|
7
8
|
'X_E2E_EVALUATE_UNSUPPORTED',
|
|
8
9
|
'X_E2E_EVALUATE_CAPTURED',
|
|
9
10
|
'X_E2E_EVALUATE_THREW',
|
|
@@ -11,17 +12,16 @@ export const E2E_ERROR_CODES = [
|
|
|
11
12
|
'X_E2E_LOCATOR_AMBIGUOUS',
|
|
12
13
|
'X_E2E_SERVICE_WORKER_ABSENT',
|
|
13
14
|
'X_E2E_APP_FAILED',
|
|
14
|
-
// Four and not one, because the four repairs differ: install a browser, read the browser's own
|
|
15
|
-
// stderr, look at the page, raise a deadline.
|
|
16
|
-
'X_CDP_BROWSER_MISSING',
|
|
17
|
-
'X_CDP_LAUNCH_FAILED',
|
|
18
|
-
'X_CDP_CALL_FAILED',
|
|
19
|
-
'X_CDP_TIMEOUT',
|
|
20
15
|
] as const;
|
|
21
16
|
|
|
17
|
+
type OwnE2eCode = (typeof OWN_E2E_CODES)[number];
|
|
18
|
+
|
|
19
|
+
/** Every code an e2e run can refuse with: this package's seven, then the browser's four. */
|
|
20
|
+
export const E2E_ERROR_CODES = [...OWN_E2E_CODES, ...CDP_ERROR_CODES] as const;
|
|
21
|
+
|
|
22
22
|
export type E2eErrorCode = (typeof E2E_ERROR_CODES)[number];
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
const OWN_E2E_TITLES = Object.freeze<Record<OwnE2eCode, string>>({
|
|
25
25
|
X_E2E_EVALUATE_UNSUPPORTED: 'a page.evaluate() closure cannot be sent into the browser',
|
|
26
26
|
X_E2E_EVALUATE_CAPTURED: 'a page.evaluate() closure named a binding the page does not have',
|
|
27
27
|
X_E2E_EVALUATE_THREW: 'an expression an e2e page ran threw inside the browser',
|
|
@@ -29,14 +29,15 @@ export const E2E_ERROR_TITLES = Object.freeze<Record<E2eErrorCode, string>>({
|
|
|
29
29
|
X_E2E_LOCATOR_AMBIGUOUS: 'an e2e locator matched more than one element and was asked to click',
|
|
30
30
|
X_E2E_SERVICE_WORKER_ABSENT: 'no service worker took control of the page within the budget',
|
|
31
31
|
X_E2E_APP_FAILED: 'the app an e2e run spawned did not come up',
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export const E2E_ERROR_TITLES = Object.freeze<Record<E2eErrorCode, string>>({
|
|
35
|
+
...OWN_E2E_TITLES,
|
|
36
|
+
...CDP_ERROR_TITLES,
|
|
36
37
|
});
|
|
37
38
|
|
|
38
39
|
// Owned here and borrowed by nobody, so unconditional: a second package claiming one must fail as
|
|
39
40
|
// X_ERROR_CODE_DUPLICATE rather than quietly keep whichever title registered first.
|
|
40
41
|
registerErrorCodes(
|
|
41
|
-
Object.fromEntries(Object.entries(
|
|
42
|
+
Object.fromEntries(Object.entries(OWN_E2E_TITLES).map(([code, title]) => [code, { title }])),
|
|
42
43
|
);
|
package/src/e2e-run.ts
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
// hooks and the real app and browser; a test is this with doubles, which is how it is measured.
|
|
5
5
|
|
|
6
6
|
import { finiteCount } from '@ultimat3/core';
|
|
7
|
+
import { LAUNCHED_CLOSE_MS } from '@ultimat3/scraping/cdp';
|
|
7
8
|
import type { E2eBrowser } from './cdp-browser';
|
|
8
|
-
import {
|
|
9
|
+
import { E2E_BROWSER_OPEN_MS } from './cdp-browser';
|
|
9
10
|
import type { E2eApp } from './e2e-app';
|
|
10
11
|
import { E2E_APP_STOP_MS } from './e2e-app';
|
|
11
12
|
import { e2eBrowser, publishE2eRun, republishE2eBrowser } from './e2e-browser-handle';
|
|
@@ -91,7 +92,7 @@ export async function startE2eRun(deps: E2eRunDeps): Promise<void> {
|
|
|
91
92
|
browser = await deps.openBrowser();
|
|
92
93
|
republishE2eBrowser(browser);
|
|
93
94
|
},
|
|
94
|
-
probeMs +
|
|
95
|
+
probeMs + LAUNCHED_CLOSE_MS + E2E_BROWSER_OPEN_MS,
|
|
95
96
|
);
|
|
96
97
|
|
|
97
98
|
deps.afterAll(async () => {
|
|
@@ -99,5 +100,5 @@ export async function startE2eRun(deps: E2eRunDeps): Promise<void> {
|
|
|
99
100
|
uninstall();
|
|
100
101
|
await browser.close();
|
|
101
102
|
await app.stop();
|
|
102
|
-
},
|
|
103
|
+
}, LAUNCHED_CLOSE_MS + E2E_APP_STOP_MS);
|
|
103
104
|
}
|