@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 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)}…` : got;
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
- // Primitive values
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camperaid/watest",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "Web Application Testsuite",
5
5
  "type": "module",
6
6
  "engines": {
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "../../../..": {
18
18
  "name": "@camperaid/watest",
19
- "version": "2.6.0",
19
+ "version": "2.6.2",
20
20
  "dev": true,
21
21
  "license": "MPL",
22
22
  "dependencies": {
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "../../../..": {
18
18
  "name": "@camperaid/watest",
19
- "version": "2.6.0",
19
+ "version": "2.6.2",
20
20
  "dev": true,
21
21
  "license": "MPL",
22
22
  "dependencies": {
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "../../../..": {
18
18
  "name": "@camperaid/watest",
19
- "version": "2.6.0",
19
+ "version": "2.6.2",
20
20
  "dev": true,
21
21
  "license": "MPL",
22
22
  "dependencies": {
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "../../../..": {
18
18
  "name": "@camperaid/watest",
19
- "version": "2.6.0",
19
+ "version": "2.6.2",
20
20
  "dev": true,
21
21
  "license": "MPL",
22
22
  "dependencies": {
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "../../../..": {
18
18
  "name": "@camperaid/watest",
19
- "version": "2.6.0",
19
+ "version": "2.6.2",
20
20
  "dev": true,
21
21
  "license": "MPL",
22
22
  "dependencies": {
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "../../../..": {
18
18
  "name": "@camperaid/watest",
19
- "version": "2.6.0",
19
+ "version": "2.6.1",
20
20
  "dev": true,
21
21
  "license": "MPL",
22
22
  "dependencies": {
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "../../../..": {
18
18
  "name": "@camperaid/watest",
19
- "version": "2.6.0",
19
+ "version": "2.6.1",
20
20
  "dev": true,
21
21
  "license": "MPL",
22
22
  "dependencies": {
@@ -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');