testcafe 1.20.2-alpha.1 → 2.0.0-rc.3

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 (231) hide show
  1. package/lib/api/request-hooks/assert-type.js +2 -2
  2. package/lib/api/request-hooks/hook.js +2 -2
  3. package/lib/api/request-hooks/request-logger.js +2 -2
  4. package/lib/api/skip-js-errors/index.js +62 -0
  5. package/lib/api/structure/base-unit.js +2 -2
  6. package/lib/api/structure/fixture.js +13 -13
  7. package/lib/api/structure/test.js +18 -17
  8. package/lib/api/structure/testing-unit.js +26 -16
  9. package/lib/api/test-controller/assertion.js +5 -5
  10. package/lib/api/test-controller/execution-context.js +2 -2
  11. package/lib/api/test-controller/index.js +33 -30
  12. package/lib/api/test-controller/proxy.js +2 -2
  13. package/lib/api/test-page-url.js +4 -4
  14. package/lib/api/test-run-tracker.js +2 -2
  15. package/lib/api/wrap-test-function.js +3 -3
  16. package/lib/assertions/executor.js +4 -4
  17. package/lib/assertions/get-fn.js +3 -3
  18. package/lib/browser/connection/gateway.js +18 -18
  19. package/lib/browser/connection/get-hints.js +8 -8
  20. package/lib/browser/connection/index.js +11 -11
  21. package/lib/browser/connection/remotes-queue.js +4 -4
  22. package/lib/browser/provider/built-in/dedicated/base.js +6 -6
  23. package/lib/browser/provider/built-in/dedicated/chrome/cdp-client/index.js +10 -10
  24. package/lib/browser/provider/built-in/dedicated/chrome/config.js +17 -17
  25. package/lib/browser/provider/built-in/dedicated/chrome/create-temp-profile.js +4 -4
  26. package/lib/browser/provider/built-in/dedicated/chrome/index.js +6 -6
  27. package/lib/browser/provider/built-in/dedicated/chrome/local-chrome.js +6 -6
  28. package/lib/browser/provider/built-in/dedicated/chrome/runtime-info.js +4 -4
  29. package/lib/browser/provider/built-in/dedicated/edge/runtime-info.js +2 -2
  30. package/lib/browser/provider/built-in/dedicated/firefox/config.js +8 -8
  31. package/lib/browser/provider/built-in/dedicated/firefox/create-temp-profile.js +3 -3
  32. package/lib/browser/provider/built-in/dedicated/firefox/index.js +5 -5
  33. package/lib/browser/provider/built-in/dedicated/firefox/local-firefox.js +2 -2
  34. package/lib/browser/provider/built-in/dedicated/firefox/marionette-client/index.js +7 -7
  35. package/lib/browser/provider/built-in/dedicated/firefox/runtime-info.js +3 -3
  36. package/lib/browser/provider/built-in/path.js +2 -2
  37. package/lib/browser/provider/built-in/remote.js +3 -3
  38. package/lib/browser/provider/index.js +5 -5
  39. package/lib/browser/provider/plugin-host.js +5 -6
  40. package/lib/browser/provider/pool.js +4 -4
  41. package/lib/browser/provider/utils/argument-parsing.js +3 -3
  42. package/lib/browser/provider/utils/browser-starter.js +2 -2
  43. package/lib/cli/argument-parser/index.js +52 -41
  44. package/lib/cli/argument-parser/parse-utils.js +2 -2
  45. package/lib/cli/authentication-helper.js +3 -3
  46. package/lib/cli/cli.js +8 -8
  47. package/lib/cli/correct-browsers-and-sources.js +2 -2
  48. package/lib/cli/index.js +2 -2
  49. package/lib/cli/log.js +3 -3
  50. package/lib/cli/remotes-wizard.js +3 -3
  51. package/lib/client/automation/index.js +120 -34
  52. package/lib/client/automation/index.min.js +1 -1
  53. package/lib/client/browser/idle-page/index.js +321 -317
  54. package/lib/client/browser/service-worker.js +244 -290
  55. package/lib/client/core/deps/hammerhead.js +12 -4
  56. package/lib/client/core/index.js +145 -55
  57. package/lib/client/core/index.min.js +1 -1
  58. package/lib/client/core/utils/dom.js +33 -28
  59. package/lib/client/core/utils/position.js +18 -14
  60. package/lib/client/core/utils/style.js +8 -4
  61. package/lib/client/driver/command-executors/client-functions/selector-executor/filter.js +5 -5
  62. package/lib/client/driver/command-executors/client-functions/selector-executor/utils.js +3 -3
  63. package/lib/client/driver/deps/hammerhead.js +12 -4
  64. package/lib/client/driver/deps/testcafe-core.js +12 -4
  65. package/lib/client/driver/deps/testcafe-ui.js +12 -4
  66. package/lib/client/driver/index.js +654 -630
  67. package/lib/client/driver/index.min.js +1 -1
  68. package/lib/client/driver/status.js +2 -2
  69. package/lib/client/ui/index.js +10 -8
  70. package/lib/client/ui/index.min.js +1 -1
  71. package/lib/client-functions/builder-symbol.js +1 -2
  72. package/lib/client-functions/client-function-builder.js +12 -12
  73. package/lib/client-functions/replicator.js +2 -2
  74. package/lib/client-functions/selector-api-execution-mode.js +2 -2
  75. package/lib/client-functions/selectors/add-api.js +48 -48
  76. package/lib/client-functions/selectors/selector-builder.js +17 -17
  77. package/lib/compiler/compile-client-function.js +6 -6
  78. package/lib/compiler/index.js +9 -9
  79. package/lib/compiler/test-file/api-based.js +8 -8
  80. package/lib/compiler/test-file/base.js +6 -6
  81. package/lib/compiler/test-file/exportble-lib-path.js +2 -2
  82. package/lib/compiler/test-file/formats/coffeescript/compiler.js +2 -2
  83. package/lib/compiler/test-file/formats/coffeescript/get-test-list.js +2 -2
  84. package/lib/compiler/test-file/formats/es-next/compiler.js +4 -4
  85. package/lib/compiler/test-file/formats/es-next/get-test-list.js +4 -4
  86. package/lib/compiler/test-file/formats/raw.js +2 -2
  87. package/lib/compiler/test-file/formats/typescript/compiler.js +11 -11
  88. package/lib/compiler/test-file/formats/typescript/get-test-list.js +3 -3
  89. package/lib/compiler/test-file/test-file-parser-base.js +3 -3
  90. package/lib/configuration/configuration-base.js +15 -15
  91. package/lib/configuration/interfaces.js +1 -1
  92. package/lib/configuration/skip-js-errors-option-names.js +11 -0
  93. package/lib/configuration/testcafe-configuration.js +21 -16
  94. package/lib/configuration/types.js +1 -1
  95. package/lib/configuration/typescript-configuration.js +4 -4
  96. package/lib/custom-client-scripts/assert-type.js +2 -2
  97. package/lib/custom-client-scripts/client-script.js +6 -6
  98. package/lib/custom-client-scripts/get-code.js +2 -2
  99. package/lib/custom-client-scripts/routing.js +3 -3
  100. package/lib/custom-client-scripts/utils.js +3 -3
  101. package/lib/dashboard/connector.js +4 -4
  102. package/lib/dashboard/get-default-project-link.js +2 -2
  103. package/lib/dashboard/index.js +26 -26
  104. package/lib/errors/create-stack-filter.js +2 -2
  105. package/lib/errors/error-list.js +2 -2
  106. package/lib/errors/get-callsite.js +2 -2
  107. package/lib/errors/is-internal-stack-frame.js +5 -5
  108. package/lib/errors/process-test-fn-error.js +2 -2
  109. package/lib/errors/runtime/index.js +10 -10
  110. package/lib/errors/runtime/templates.js +5 -2
  111. package/lib/errors/runtime/type-assertions.js +6 -6
  112. package/lib/errors/stack-cleaning-hook.js +2 -2
  113. package/lib/errors/test-run/formattable-adapter.js +7 -7
  114. package/lib/errors/test-run/index.js +25 -5
  115. package/lib/errors/test-run/render-error-template/index.js +6 -6
  116. package/lib/errors/test-run/render-error-template/utils.js +2 -2
  117. package/lib/errors/test-run/templates.js +40 -31
  118. package/lib/errors/test-run/utils.js +7 -7
  119. package/lib/errors/types.js +5 -1
  120. package/lib/index.js +1 -1
  121. package/lib/live/file-watcher/index.js +2 -2
  122. package/lib/live/keyboard-observer.js +3 -3
  123. package/lib/live/test-run-controller.js +3 -3
  124. package/lib/live/test-run.js +3 -2
  125. package/lib/live/test-runner.js +2 -2
  126. package/lib/load-assets.js +2 -2
  127. package/lib/notifications/add-rendered-warning.js +4 -4
  128. package/lib/notifications/debug-logger.js +6 -6
  129. package/lib/notifications/deprecated.js +2 -2
  130. package/lib/notifications/information-message.js +4 -3
  131. package/lib/proxyless/resource-injector.js +4 -4
  132. package/lib/reporter/command/command-formatter.js +4 -4
  133. package/lib/reporter/index.js +10 -10
  134. package/lib/reporter/plugin-host.js +7 -7
  135. package/lib/role/index.js +8 -8
  136. package/lib/role/role.js +2 -2
  137. package/lib/runner/bootstrapper.js +20 -20
  138. package/lib/runner/browser-job.js +3 -3
  139. package/lib/runner/browser-set.js +12 -12
  140. package/lib/runner/fixture-hook-controller.js +5 -5
  141. package/lib/runner/index.js +43 -33
  142. package/lib/runner/task/index.js +10 -6
  143. package/lib/runner/test-run-hook-controller.js +5 -5
  144. package/lib/runner/tested-app.js +7 -7
  145. package/lib/screenshots/capturer.js +17 -17
  146. package/lib/screenshots/crop.js +8 -8
  147. package/lib/screenshots/index.js +6 -10
  148. package/lib/screenshots/utils.js +4 -4
  149. package/lib/services/compiler/host.js +8 -8
  150. package/lib/services/compiler/service.js +13 -13
  151. package/lib/services/compiler/test-run-proxy.js +8 -8
  152. package/lib/services/serialization/replicator/transforms/callsite-record-transform.js +2 -2
  153. package/lib/services/serialization/replicator/transforms/command-base-trasform/command-constructors.js +2 -1
  154. package/lib/services/serialization/replicator/transforms/command-base-trasform/index.js +3 -3
  155. package/lib/services/serialization/replicator/transforms/raw-command-callsite-record-transform.js +2 -2
  156. package/lib/services/serialization/test-structure.js +4 -4
  157. package/lib/services/utils/ipc/interfaces.js +1 -3
  158. package/lib/services/utils/ipc/io.js +3 -3
  159. package/lib/services/utils/ipc/message.js +2 -2
  160. package/lib/services/utils/ipc/proxy.js +4 -4
  161. package/lib/services/utils/ipc/transport.js +2 -2
  162. package/lib/shared/errors/index.js +9 -2
  163. package/lib/shared/errors/selector-error-ctor-callback.js +7 -3
  164. package/lib/test-run/bookmark.js +1 -1
  165. package/lib/test-run/browser-manipulation-queue.js +3 -3
  166. package/lib/test-run/commands/actions.js +66 -46
  167. package/lib/test-run/commands/assertion.js +3 -3
  168. package/lib/test-run/commands/base.js +2 -2
  169. package/lib/test-run/commands/browser-manipulation.js +8 -8
  170. package/lib/test-run/commands/observation.js +4 -4
  171. package/lib/test-run/commands/options.js +27 -12
  172. package/lib/test-run/commands/type.js +2 -1
  173. package/lib/test-run/commands/utils.js +3 -2
  174. package/lib/test-run/commands/validations/argument.js +19 -10
  175. package/lib/test-run/commands/validations/factories.js +10 -2
  176. package/lib/test-run/commands/validations/initializers.js +4 -4
  177. package/lib/test-run/debug-log.js +4 -4
  178. package/lib/test-run/execute-js-expression/index.js +4 -4
  179. package/lib/test-run/index.js +48 -41
  180. package/lib/test-run/request/create-request-options.js +9 -9
  181. package/lib/test-run/request/process-response-data.js +2 -2
  182. package/lib/test-run/request/send.js +5 -5
  183. package/lib/testcafe.js +8 -4
  184. package/lib/utils/check-file-path.js +2 -2
  185. package/lib/utils/check-url.js +2 -2
  186. package/lib/utils/correct-file-path.js +4 -4
  187. package/lib/utils/delegated-api.js +1 -1
  188. package/lib/utils/detect-ffmpeg.js +3 -3
  189. package/lib/utils/diff/colors.js +2 -2
  190. package/lib/utils/diff/index.js +11 -7
  191. package/lib/utils/diff/util.js +5 -5
  192. package/lib/utils/diff.js +4 -4
  193. package/lib/utils/escape-user-agent.js +2 -2
  194. package/lib/utils/execute-fn-with-timeout.js +2 -2
  195. package/lib/utils/get-browser.js +2 -2
  196. package/lib/utils/get-filter-fn.js +4 -4
  197. package/lib/utils/get-options/base.js +2 -2
  198. package/lib/utils/get-options/compiler.js +2 -2
  199. package/lib/utils/get-options/dashboard.js +2 -2
  200. package/lib/utils/get-options/get-assertion-timeout.js +1 -1
  201. package/lib/utils/get-options/index.js +4 -2
  202. package/lib/utils/get-options/meta.js +2 -2
  203. package/lib/utils/get-options/quarantine.js +8 -6
  204. package/lib/utils/get-options/screenshot.js +2 -2
  205. package/lib/utils/get-options/skip-js-errors.js +35 -0
  206. package/lib/utils/get-options/ssl.js +6 -6
  207. package/lib/utils/get-options/video.js +2 -2
  208. package/lib/utils/is-password-input.js +1 -1
  209. package/lib/utils/log-entry.js +2 -2
  210. package/lib/utils/make-reg-exp.js +19 -6
  211. package/lib/utils/moment-loader.js +2 -2
  212. package/lib/utils/parse-file-list.js +7 -7
  213. package/lib/utils/path-pattern.js +4 -4
  214. package/lib/utils/prepare-reporters.js +2 -2
  215. package/lib/utils/prerender-callsite.js +6 -6
  216. package/lib/utils/process.js +7 -7
  217. package/lib/utils/promisified-functions.js +14 -14
  218. package/lib/utils/raw-command-callsite-record.js +2 -2
  219. package/lib/utils/resolve-path-relatively-cwd.js +2 -2
  220. package/lib/utils/string.js +3 -3
  221. package/lib/utils/temp-directory/cleanup-process/index.js +6 -6
  222. package/lib/utils/temp-directory/cleanup-process/worker.js +4 -4
  223. package/lib/utils/temp-directory/index.js +6 -6
  224. package/lib/utils/temp-directory/lockfile.js +2 -2
  225. package/lib/video-recorder/process.js +6 -6
  226. package/lib/video-recorder/recorder.js +9 -9
  227. package/lib/video-recorder/test-run-video-recorder.js +2 -2
  228. package/package.json +8 -7
  229. package/ts-defs/index.d.ts +46 -7
  230. package/ts-defs/selectors.d.ts +39 -0
  231. package/ts-defs/testcafe-scripts.d.ts +39 -0
@@ -108,7 +108,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
108
108
  44: 188,
109
109
  45: browserUtils.isFirefox ? 173 : 189,
110
110
  46: 190,
111
- 47: 191,
111
+ 47: 191, // /
112
112
  },
113
113
  symbolKeysCharCodes: {
114
114
  109: 45,
@@ -226,12 +226,12 @@ window['%hammerhead%'].utils.removeInjectedScript();
226
226
  return RequestBarrier;
227
227
  }());
228
228
 
229
- /*! *****************************************************************************
229
+ /******************************************************************************
230
230
  Copyright (c) Microsoft Corporation.
231
-
231
+
232
232
  Permission to use, copy, modify, and/or distribute this software for any
233
233
  purpose with or without fee is hereby granted.
234
-
234
+
235
235
  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
236
236
  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
237
237
  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
@@ -241,24 +241,26 @@ window['%hammerhead%'].utils.removeInjectedScript();
241
241
  PERFORMANCE OF THIS SOFTWARE.
242
242
  ***************************************************************************** */
243
243
  /* global Reflect, Promise */
244
-
245
- var extendStatics = function(d, b) {
244
+ var extendStatics = function (d, b) {
246
245
  extendStatics = Object.setPrototypeOf ||
247
246
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
248
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
247
+ function (d, b) { for (var p in b)
248
+ if (Object.prototype.hasOwnProperty.call(b, p))
249
+ d[p] = b[p]; };
249
250
  return extendStatics(d, b);
250
251
  };
251
-
252
252
  function __extends(d, b) {
253
+ if (typeof b !== "function" && b !== null)
254
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
253
255
  extendStatics(d, b);
254
256
  function __() { this.constructor = d; }
255
257
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
256
258
  }
257
-
258
259
  function __rest(s, e) {
259
260
  var t = {};
260
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
261
- t[p] = s[p];
261
+ for (var p in s)
262
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
263
+ t[p] = s[p];
262
264
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
263
265
  for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
264
266
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
@@ -266,51 +268,104 @@ window['%hammerhead%'].utils.removeInjectedScript();
266
268
  }
267
269
  return t;
268
270
  }
269
-
270
271
  function __awaiter(thisArg, _arguments, P, generator) {
271
272
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
272
273
  return new (P || (P = Promise$5))(function (resolve, reject) {
273
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
274
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
274
+ function fulfilled(value) { try {
275
+ step(generator.next(value));
276
+ }
277
+ catch (e) {
278
+ reject(e);
279
+ } }
280
+ function rejected(value) { try {
281
+ step(generator["throw"](value));
282
+ }
283
+ catch (e) {
284
+ reject(e);
285
+ } }
275
286
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
276
287
  step((generator = generator.apply(thisArg, _arguments || [])).next());
277
288
  });
278
289
  }
279
-
280
290
  function __generator(thisArg, body) {
281
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
282
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
291
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
292
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
293
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
283
294
  function verb(n) { return function (v) { return step([n, v]); }; }
284
295
  function step(op) {
285
- if (f) throw new TypeError("Generator is already executing.");
286
- while (_) try {
287
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
288
- if (y = 0, t) op = [op[0] & 2, t.value];
289
- switch (op[0]) {
290
- case 0: case 1: t = op; break;
291
- case 4: _.label++; return { value: op[1], done: false };
292
- case 5: _.label++; y = op[1]; op = [0]; continue;
293
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
294
- default:
295
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
296
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
297
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
298
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
299
- if (t[2]) _.ops.pop();
300
- _.trys.pop(); continue;
296
+ if (f)
297
+ throw new TypeError("Generator is already executing.");
298
+ while (_)
299
+ try {
300
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
301
+ return t;
302
+ if (y = 0, t)
303
+ op = [op[0] & 2, t.value];
304
+ switch (op[0]) {
305
+ case 0:
306
+ case 1:
307
+ t = op;
308
+ break;
309
+ case 4:
310
+ _.label++;
311
+ return { value: op[1], done: false };
312
+ case 5:
313
+ _.label++;
314
+ y = op[1];
315
+ op = [0];
316
+ continue;
317
+ case 7:
318
+ op = _.ops.pop();
319
+ _.trys.pop();
320
+ continue;
321
+ default:
322
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
323
+ _ = 0;
324
+ continue;
325
+ }
326
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
327
+ _.label = op[1];
328
+ break;
329
+ }
330
+ if (op[0] === 6 && _.label < t[1]) {
331
+ _.label = t[1];
332
+ t = op;
333
+ break;
334
+ }
335
+ if (t && _.label < t[2]) {
336
+ _.label = t[2];
337
+ _.ops.push(op);
338
+ break;
339
+ }
340
+ if (t[2])
341
+ _.ops.pop();
342
+ _.trys.pop();
343
+ continue;
344
+ }
345
+ op = body.call(thisArg, _);
346
+ }
347
+ catch (e) {
348
+ op = [6, e];
349
+ y = 0;
301
350
  }
302
- op = body.call(thisArg, _);
303
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
304
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
305
- }
306
- }
307
-
308
- function __spreadArrays() {
309
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
310
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
311
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
312
- r[k] = a[j];
313
- return r;
351
+ finally {
352
+ f = t = 0;
353
+ }
354
+ if (op[0] & 5)
355
+ throw op[1];
356
+ return { value: op[0] ? op[1] : void 0, done: true };
357
+ }
358
+ }
359
+ function __spreadArray(to, from, pack) {
360
+ if (pack || arguments.length === 2)
361
+ for (var i = 0, l = from.length, ar; i < l; i++) {
362
+ if (ar || !(i in from)) {
363
+ if (!ar)
364
+ ar = Array.prototype.slice.call(from, 0, i);
365
+ ar[i] = from[i];
366
+ }
367
+ }
368
+ return to.concat(ar || Array.prototype.slice.call(from));
314
369
  }
315
370
 
316
371
  // @ts-ignore
@@ -564,7 +619,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
564
619
  args[_i - 1] = arguments[_i];
565
620
  }
566
621
  if (hammerhead.nativeMethods.arrayFrom)
567
- return hammerhead.nativeMethods.arrayFrom.apply(hammerhead.nativeMethods, __spreadArrays([arg], args));
622
+ return hammerhead.nativeMethods.arrayFrom.apply(hammerhead.nativeMethods, __spreadArray([arg], args, false));
568
623
  // NOTE: this logic is for IE
569
624
  var arr = [];
570
625
  var length = arg.length;
@@ -884,7 +939,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
884
939
  res.push('<');
885
940
  res.push(getTagName(el));
886
941
  for (var attr in attributes) {
887
- if (attributes.hasOwnProperty(attr)) {
942
+ if (attributes.hasOwnProperty(attr)) { //eslint-disable-line no-prototype-builtins
888
943
  var val = el[attributes[attr]];
889
944
  if (val)
890
945
  res.push(' ' + attr + '="' + val + '"');
@@ -1252,7 +1307,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
1252
1307
  // NOTE: we use a flag to confirm file download because if unload
1253
1308
  // is raised the browser can respond with an empty string
1254
1309
  if (!fileDownloadingHandled)
1255
- return new Promise$2(function () { });
1310
+ return new Promise$2(function () { }); // eslint-disable-line @typescript-eslint/no-empty-function
1256
1311
  });
1257
1312
  }
1258
1313
  // API
@@ -3195,6 +3250,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
3195
3250
  requestRuntimeError: 'E1073',
3196
3251
  requestCannotResolveTestRun: 'E1074',
3197
3252
  relativeBaseUrl: 'E1075',
3253
+ invalidSkipJsErrorsOption: 'E1076',
3198
3254
  };
3199
3255
 
3200
3256
  var BrowserConnectionErrorHint;
@@ -3205,6 +3261,39 @@ window['%hammerhead%'].utils.removeInjectedScript();
3205
3261
  })(BrowserConnectionErrorHint || (BrowserConnectionErrorHint = {}));
3206
3262
  var BrowserConnectionErrorHint$1 = BrowserConnectionErrorHint;
3207
3263
 
3264
+ var DEFAULT_CONCATENATED_VALUES = {
3265
+ SEPARATOR: ', ',
3266
+ QUOTE_CHAR: '"',
3267
+ };
3268
+ function getDisplayedItemText(item, quote) {
3269
+ return "".concat(quote).concat(item).concat(quote);
3270
+ }
3271
+ function getConcatenatedValuesString(array, separator, quoteChar) {
3272
+ if (separator === void 0) { separator = DEFAULT_CONCATENATED_VALUES.SEPARATOR; }
3273
+ if (quoteChar === void 0) { quoteChar = DEFAULT_CONCATENATED_VALUES.QUOTE_CHAR; }
3274
+ var clonedArray = __spreadArray([], array, true);
3275
+ if (separator === '\n')
3276
+ return clonedArray.map(function (item) { return getDisplayedItemText(item, quoteChar); }).join(separator);
3277
+ else if (clonedArray.length === 1)
3278
+ return getDisplayedItemText(clonedArray[0], quoteChar);
3279
+ else if (clonedArray.length === 2) {
3280
+ var item1 = array[0];
3281
+ var item2 = array[1];
3282
+ return "".concat(getDisplayedItemText(item1, quoteChar), " and ").concat(getDisplayedItemText(item2, quoteChar));
3283
+ }
3284
+ var lastItem = clonedArray.pop();
3285
+ var otherItemString = clonedArray.map(function (item) { return getDisplayedItemText(item, quoteChar); }).join(separator);
3286
+ return "".concat(otherItemString, ", and ").concat(getDisplayedItemText(lastItem, quoteChar));
3287
+ }
3288
+
3289
+ var SKIP_JS_ERRORS_OPTION_NAMES;
3290
+ (function (SKIP_JS_ERRORS_OPTION_NAMES) {
3291
+ SKIP_JS_ERRORS_OPTION_NAMES["message"] = "message";
3292
+ SKIP_JS_ERRORS_OPTION_NAMES["stack"] = "stack";
3293
+ SKIP_JS_ERRORS_OPTION_NAMES["pageUrl"] = "pageUrl";
3294
+ })(SKIP_JS_ERRORS_OPTION_NAMES || (SKIP_JS_ERRORS_OPTION_NAMES = {}));
3295
+ var SKIP_JS_ERRORS_OPTION_NAMES$1 = SKIP_JS_ERRORS_OPTION_NAMES;
3296
+
3208
3297
  // -------------------------------------------------------------
3209
3298
  // WARNING: this file is used by both the client and the server.
3210
3299
  // Do not use any browser or node-specific API!
@@ -3229,10 +3318,10 @@ window['%hammerhead%'].utils.removeInjectedScript();
3229
3318
  'Check patterns for errors:\n\n' +
3230
3319
  '{sourceList}\n\n' +
3231
3320
  'or launch TestCafe from a different directory.\n' +
3232
- ("For more information on how to specify test locations, see " + DOCUMENTATION_LINKS.TEST_SOURCE_PARAMETER + "."),
3321
+ "For more information on how to specify test locations, see ".concat(DOCUMENTATION_LINKS.TEST_SOURCE_PARAMETER, "."),
3233
3322
  _a[RUNTIME_ERRORS.noTestsToRun] = "Source files do not contain valid 'fixture' and 'test' declarations.",
3234
3323
  _a[RUNTIME_ERRORS.noTestsToRunDueFiltering] = 'No tests match your filter.\n' +
3235
- ("See " + DOCUMENTATION_LINKS.FILTER_SETTINGS + "."),
3324
+ "See ".concat(DOCUMENTATION_LINKS.FILTER_SETTINGS, "."),
3236
3325
  _a[RUNTIME_ERRORS.cannotFindReporterForAlias] = 'The "{name}" reporter does not exist. Check the reporter parameter for errors.',
3237
3326
  _a[RUNTIME_ERRORS.multipleSameStreamReporters] = 'Reporters cannot share output streams. The following reporters interfere with one another: "{reporters}".',
3238
3327
  _a[RUNTIME_ERRORS.optionValueIsNotValidRegExp] = 'The "{optionName}" option does not contain a valid regular expression.',
@@ -3303,7 +3392,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
3303
3392
  'You can launch the browser in headless mode. ' +
3304
3393
  'If you use a portable browser executable, ' +
3305
3394
  "specify the browser alias before the path instead of the 'path' prefix. " +
3306
- ("For more information, see " + DOCUMENTATION_LINKS.HEADLESS_MODE),
3395
+ "For more information, see ".concat(DOCUMENTATION_LINKS.HEADLESS_MODE),
3307
3396
  _a[RUNTIME_ERRORS.uncaughtErrorInReporter] = 'The "{methodName}" method of the "{reporterName}" reporter produced an uncaught error. Error details:\n{originalError}',
3308
3397
  _a[RUNTIME_ERRORS.roleInitializedWithRelativeUrl] = 'You cannot specify relative login page URLs in the Role constructor. Use an absolute URL.',
3309
3398
  _a[RUNTIME_ERRORS.typeScriptCompilerLoadingError] = 'Cannot load the TypeScript compiler.\n{originErrorMessage}.',
@@ -3320,7 +3409,8 @@ window['%hammerhead%'].utils.removeInjectedScript();
3320
3409
  _a[RUNTIME_ERRORS.dashboardTokenInJSON] = 'Insecure token declaration: cannot declare a Dashboard token in a JSON configuration file. Use a JavaScript configuration file, or declare a Dashboard token with one of the following: the CLI, the Test Runner API, the TESTCAFE_DASHBOARD_TOKEN environment variable.',
3321
3410
  _a[RUNTIME_ERRORS.relativeBaseUrl] = 'The value of the baseUrl argument cannot be relative: "{baseUrl}"',
3322
3411
  _a[RUNTIME_ERRORS.requestUrlInvalidValueError] = 'Requested url isn\'t valid ({actualValue}).',
3323
- _a[RUNTIME_ERRORS.requestRuntimeError] = 'Requested was interrupted with error:\n{message}',
3412
+ _a[RUNTIME_ERRORS.requestRuntimeError] = 'The request was interrupted by an error:\n{message}',
3413
+ _a[RUNTIME_ERRORS.invalidSkipJsErrorsOption] = "The \"{optionName}\" option does not exist. Use the following options to configure skipJsErrors: ".concat(getConcatenatedValuesString(Object.keys(SKIP_JS_ERRORS_OPTION_NAMES$1))),
3324
3414
  _a);
3325
3415
 
3326
3416
  var timeLimitedPromiseTimeoutExpiredTemplate = TEMPLATES[RUNTIME_ERRORS.timeLimitedPromiseTimeoutExpired];
@@ -3569,7 +3659,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
3569
3659
  if (!(i < MAX_STATUS_RETRY)) return [3 /*break*/, 5];
3570
3660
  return [4 /*yield*/, tryGetStatus.apply(void 0, args)];
3571
3661
  case 2:
3572
- (_a = _b.sent(), (error = _a.error, _a), result = __rest(_a, ["error"]));
3662
+ (_a = _b.sent(), error = _a.error, result = __rest(_a, ["error"]));
3573
3663
  if (!error)
3574
3664
  return [2 /*return*/, result];
3575
3665
  return [4 /*yield*/, delay$1(STATUS_RETRY_DELAY)];
@@ -3618,13 +3708,13 @@ window['%hammerhead%'].utils.removeInjectedScript();
3618
3708
  function setActiveWindowId(activeWindowIdUrl, createXHR, windowId) {
3619
3709
  return sendXHR(activeWindowIdUrl, createXHR, {
3620
3710
  method: 'POST',
3621
- data: JSON.stringify({ windowId: windowId }),
3711
+ data: JSON.stringify({ windowId: windowId }), //eslint-disable-line no-restricted-globals
3622
3712
  });
3623
3713
  }
3624
3714
  function closeWindow(closeWindowUrl, createXHR, windowId) {
3625
3715
  return sendXHR(closeWindowUrl, createXHR, {
3626
3716
  method: 'POST',
3627
- data: JSON.stringify({ windowId: windowId }),
3717
+ data: JSON.stringify({ windowId: windowId }), //eslint-disable-line no-restricted-globals
3628
3718
  });
3629
3719
  }
3630
3720