@camperaid/watest 2.6.1 → 2.6.2
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/core/base.js +16 -2
- package/package.json +1 -1
- package/tests/e2e/samples/folder/package-lock.json +1 -1
- package/tests/e2e/samples/loader/package-lock.json +1 -1
- package/tests/e2e/samples/loader-mixed/package-lock.json +1 -1
- package/tests/e2e/samples/loader-multiple/package-lock.json +1 -1
- package/tests/e2e/samples/single/package-lock.json +1 -1
- package/tests/e2e/samples/wd-mixed/package-lock.json +1 -1
- package/tests/e2e/samples/wd-single/package-lock.json +1 -1
- package/webdriver/driver-base.js +5 -0
package/core/base.js
CHANGED
|
@@ -213,7 +213,7 @@ function is_primitive(
|
|
|
213
213
|
|
|
214
214
|
// Overlimit got: keep it small to not pollute output.
|
|
215
215
|
let printable_got =
|
|
216
|
-
String(got).length > limit ? `${String(got).substring(0, limit)}
|
|
216
|
+
String(got).length > limit ? `${String(got).substring(0, limit)}...` : got;
|
|
217
217
|
if (typeof got == 'string') {
|
|
218
218
|
printable_got = `'${printable_got}'`;
|
|
219
219
|
}
|
|
@@ -310,8 +310,22 @@ function is_object_impl(
|
|
|
310
310
|
) {
|
|
311
311
|
const contextmsg = `${msg}${(fieldpath && ` '${fieldpath}' field`) || ''}`;
|
|
312
312
|
|
|
313
|
-
//
|
|
313
|
+
// When got is null / a primitive but expected is a plain object or array,
|
|
314
|
+
// report a clear type mismatch rather than falling into is_primitive where
|
|
315
|
+
// the value would stringify as [object Object].
|
|
316
|
+
// Functions and RegExps are excluded: is_primitive handles them as
|
|
317
|
+
// predicates / pattern matchers against the primitive got value.
|
|
314
318
|
if (!(got instanceof Object)) {
|
|
319
|
+
if (
|
|
320
|
+
expected instanceof Object &&
|
|
321
|
+
typeof expected !== 'function' &&
|
|
322
|
+
!(expected instanceof RegExp)
|
|
323
|
+
) {
|
|
324
|
+
fail_(
|
|
325
|
+
`${contextmsg} value mismatch, got: ${stringify(got)}, expected: ${stringify(expected)}`,
|
|
326
|
+
);
|
|
327
|
+
return false;
|
|
328
|
+
}
|
|
315
329
|
return is_primitive(got, expected, contextmsg, {
|
|
316
330
|
enrich_failure_msg: true,
|
|
317
331
|
fail_,
|
package/package.json
CHANGED
package/webdriver/driver-base.js
CHANGED
|
@@ -44,6 +44,11 @@ function getChromeOptions() {
|
|
|
44
44
|
chromeOptions.addArguments('no-sandbox');
|
|
45
45
|
chromeOptions.addArguments('disable-dev-shm-usage');
|
|
46
46
|
|
|
47
|
+
// Use pipe-based DevTools instead of a port file. Prevents
|
|
48
|
+
// "DevToolsActivePort file doesn't exist" when Chrome exits early or on some
|
|
49
|
+
// macOS setups (Chrome 111+).
|
|
50
|
+
chromeOptions.addArguments('remote-debugging-pipe');
|
|
51
|
+
|
|
47
52
|
// Disable disk cache so stale resources from previous deploys are never
|
|
48
53
|
// served from cache. Each test session fetches everything from the network.
|
|
49
54
|
chromeOptions.addArguments('disk-cache-size=0');
|