@ultimat3/testing 27.2.3 → 27.4.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/package.json +16 -16
- package/src/cdp-launch-profile.ts +6 -6
- package/src/cdp-launch.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/testing",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.4.0",
|
|
4
4
|
"description": "Test harness: cloned template DBs per worker, frozen clock, sealed network, 6 test types",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
"test": "bun test"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@ultimat3/action": "27.
|
|
40
|
-
"@ultimat3/cache": "27.
|
|
41
|
-
"@ultimat3/core": "27.
|
|
42
|
-
"@ultimat3/db": "27.
|
|
43
|
-
"@ultimat3/entity": "27.
|
|
44
|
-
"@ultimat3/http": "27.
|
|
45
|
-
"@ultimat3/i18n": "27.
|
|
46
|
-
"@ultimat3/jobs": "27.
|
|
47
|
-
"@ultimat3/mail": "27.
|
|
48
|
-
"@ultimat3/policy": "27.
|
|
49
|
-
"@ultimat3/pwa": "27.
|
|
50
|
-
"@ultimat3/query": "27.
|
|
51
|
-
"@ultimat3/realtime": "27.
|
|
52
|
-
"@ultimat3/render": "27.
|
|
53
|
-
"@ultimat3/time": "27.
|
|
39
|
+
"@ultimat3/action": "27.4.0",
|
|
40
|
+
"@ultimat3/cache": "27.4.0",
|
|
41
|
+
"@ultimat3/core": "27.4.0",
|
|
42
|
+
"@ultimat3/db": "27.4.0",
|
|
43
|
+
"@ultimat3/entity": "27.4.0",
|
|
44
|
+
"@ultimat3/http": "27.4.0",
|
|
45
|
+
"@ultimat3/i18n": "27.4.0",
|
|
46
|
+
"@ultimat3/jobs": "27.4.0",
|
|
47
|
+
"@ultimat3/mail": "27.4.0",
|
|
48
|
+
"@ultimat3/policy": "27.4.0",
|
|
49
|
+
"@ultimat3/pwa": "27.4.0",
|
|
50
|
+
"@ultimat3/query": "27.4.0",
|
|
51
|
+
"@ultimat3/realtime": "27.4.0",
|
|
52
|
+
"@ultimat3/render": "27.4.0",
|
|
53
|
+
"@ultimat3/time": "27.4.0"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -41,10 +41,10 @@ export interface ThrowawayProfile {
|
|
|
41
41
|
singletonDir(): string | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* Remove the profile — and `singleton`, when it holds Chrome's singleton files and nothing else —
|
|
44
|
-
* and answer once neither has come back for `PROFILE_SETTLE_MS
|
|
45
|
-
* a directory that will not go is litter, never the close's verdict.
|
|
44
|
+
* and answer once neither has come back for `settleMs` (`PROFILE_SETTLE_MS`), or at `deadlineMs`.
|
|
45
|
+
* Never throws: a directory that will not go is litter, never the close's verdict.
|
|
46
46
|
*/
|
|
47
|
-
remove(singleton: string | undefined, deadlineMs: number): Promise<void>;
|
|
47
|
+
remove(singleton: string | undefined, deadlineMs: number, settleMs?: number): Promise<void>;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
const quietly = (work: () => void): void => {
|
|
@@ -86,7 +86,7 @@ export function throwawayProfile(root: string = tmpdir()): ThrowawayProfile {
|
|
|
86
86
|
return undefined;
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
|
-
async remove(singleton, deadlineMs) {
|
|
89
|
+
async remove(singleton, deadlineMs, settleMs = PROFILE_SETTLE_MS) {
|
|
90
90
|
const until = performance.now() + deadlineMs;
|
|
91
91
|
const owned = singleton !== undefined && isSingletonDir(singleton) ? singleton : undefined;
|
|
92
92
|
const present = (): boolean => existsSync(path) || (owned !== undefined && existsSync(owned));
|
|
@@ -94,11 +94,11 @@ export function throwawayProfile(root: string = tmpdir()): ThrowawayProfile {
|
|
|
94
94
|
quietly(() => rmSync(path, { recursive: true, force: true }));
|
|
95
95
|
if (owned !== undefined) removeSingleton(owned);
|
|
96
96
|
if (present()) {
|
|
97
|
-
await Bun.sleep(
|
|
97
|
+
await Bun.sleep(settleMs / 5);
|
|
98
98
|
continue;
|
|
99
99
|
}
|
|
100
100
|
// Gone NOW is not gone: the look after the settle is what a late writer fails.
|
|
101
|
-
await Bun.sleep(
|
|
101
|
+
await Bun.sleep(settleMs);
|
|
102
102
|
if (!present()) return;
|
|
103
103
|
} while (performance.now() < until);
|
|
104
104
|
},
|
package/src/cdp-launch.ts
CHANGED
|
@@ -87,6 +87,11 @@ export const chromeLaunchFlags = (
|
|
|
87
87
|
'--no-first-run',
|
|
88
88
|
'--no-default-browser-check',
|
|
89
89
|
'--disable-extensions',
|
|
90
|
+
// `--disable-extensions` leaves Google Chrome's COMPONENT extensions running, each with a page of
|
|
91
|
+
// its own: the hangouts one (nkeimhogjdpnpccoofpliimaahmaaome) loads `thunk.js` while the browser
|
|
92
|
+
// starts, and `x shot`'s browser-wide interception paused it and logged it as an off-list request
|
|
93
|
+
// of the page under test (CI, 2026-10-09). A test browser runs no page it was not handed.
|
|
94
|
+
'--disable-component-extensions-with-background-pages',
|
|
90
95
|
'about:blank',
|
|
91
96
|
];
|
|
92
97
|
|