@uniflowed/test 0.0.0-alpha.30 → 0.0.0-alpha.32

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.
Files changed (2) hide show
  1. package/browser-worker.js +16 -3
  2. package/package.json +2 -2
package/browser-worker.js CHANGED
@@ -70,15 +70,16 @@ type Request = {|
70
70
  * How long a browser is given to open the page before the run is refused.
71
71
  *
72
72
  * Generous against a cold Chromium with a cold profile, which is about seven
73
- * seconds on a laptop and worse in a container, and deliberately *shorter than
74
- * `uf_test`'s browser file budget* (`BROWSER_FILE_TIMEOUT`, thirty seconds).
73
+ * seconds on a laptop and much worse in a busy container, and deliberately
74
+ * *shorter than `uf_test`'s browser file budget* (`BROWSER_FILE_TIMEOUT`, two
75
+ * minutes).
75
76
  * That order is the whole point: `uf` is already holding a stopwatch on the
76
77
  * first file while this is happening, and whichever of the two fires first is
77
78
  * what the report says. A browser that will not start should be reported as a
78
79
  * browser that will not start, with its own output attached — not as a file
79
80
  * that timed out, which is a sentence about tests that were never reached.
80
81
  */
81
- const START_TIMEOUT_MS = 25_000;
82
+ const START_TIMEOUT_MS = 90_000;
82
83
 
83
84
  /**
84
85
  * The switches a headless run needs, and what each is for.
@@ -118,6 +119,18 @@ function browserArguments(profile: string, url: string): Array<string> {
118
119
  `--user-data-dir=${profile}`,
119
120
  "--no-first-run",
120
121
  "--no-default-browser-check",
122
+ // Keep startup deterministic in CI. These cut services Chrome may start
123
+ // before the first page request: extensions, sync, updater probes, and
124
+ // background network clients such as GCM. None of them changes layout or
125
+ // module execution, which is what browser mode measures.
126
+ "--disable-background-networking",
127
+ "--disable-client-side-phishing-detection",
128
+ "--disable-component-update",
129
+ "--disable-default-apps",
130
+ "--disable-domain-reliability",
131
+ "--disable-extensions",
132
+ "--disable-sync",
133
+ "--metrics-recording-only",
121
134
  // Nothing here paints, and a GPU process is one more thing to fail in a
122
135
  // container.
123
136
  "--disable-gpu",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniflowed/test",
3
- "version": "0.0.0-alpha.30",
3
+ "version": "0.0.0-alpha.32",
4
4
  "description": "The test API and worker for `uf test`: describe/it, a full matcher set, and the process uf fans test files out to.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -26,7 +26,7 @@
26
26
  "!*.test.js"
27
27
  ],
28
28
  "dependencies": {
29
- "@uniflowed/host": "0.0.0-alpha.30"
29
+ "@uniflowed/host": "0.0.0-alpha.32"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "axe-core": ">=4"