@wdio/runner
Advanced tools
Comparing version 9.4.3 to 9.4.4
@@ -7,6 +7,12 @@ import { type Options } from '@wdio/types'; | ||
}; | ||
interface Event { | ||
type: string; | ||
title: string; | ||
fullTitle: string; | ||
specs: string[]; | ||
} | ||
declare global { | ||
interface Window { | ||
__wdioErrors__: WDIOErrorEvent[]; | ||
__wdioEvents__: any[]; | ||
__wdioEvents__: Event[]; | ||
__wdioFailures__: number; | ||
@@ -31,5 +37,5 @@ __coverage__?: unknown; | ||
run(): Promise<number>; | ||
static init(cid: string, config: any, specs: string[], _: unknown, reporter: BaseReporter): BrowserFramework; | ||
static init(cid: string, config: Options.Testrunner, specs: string[], _: unknown, reporter: BaseReporter): BrowserFramework; | ||
} | ||
export {}; | ||
//# sourceMappingURL=browser.d.ts.map |
@@ -112,5 +112,5 @@ // src/index.ts | ||
function transformExpectArgs(arg) { | ||
if (typeof arg === "object" && "$$typeof" in arg && Object.keys(SUPPORTED_ASYMMETRIC_MATCHER).includes(arg.$$typeof)) { | ||
if (typeof arg === "object" && arg && "$$typeof" in arg && typeof arg.$$typeof === "string" && Object.keys(SUPPORTED_ASYMMETRIC_MATCHER).includes(arg.$$typeof)) { | ||
const matcherKey = SUPPORTED_ASYMMETRIC_MATCHER[arg.$$typeof]; | ||
const matcher = arg.inverse ? expect.not[matcherKey] : expect[matcherKey]; | ||
const matcher = "inverse" in arg && arg.inverse ? expect.not[matcherKey] : expect[matcherKey]; | ||
if (!matcher) { | ||
@@ -140,2 +140,3 @@ throw new Error(`Matcher "${matcherKey}" is not supported by expect-webdriverio`); | ||
#retryOutdatedOptimizeDep = false; | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
#runnerOptions; | ||
@@ -157,3 +158,4 @@ // `any` here because we don't want to create a dependency to @wdio/browser-runner | ||
return failures; | ||
} catch (err) { | ||
} catch (_err) { | ||
const err = _err; | ||
if (err.message.includes("net::ERR_CONNECTION_REFUSE")) { | ||
@@ -494,3 +496,3 @@ err.message = `Failed to load test page to run tests, make sure your browser can access "${browser.options.baseUrl}"`; | ||
const isTestError = e === "test:fail"; | ||
const isHookError = e === "hook:end" && payload.error && mochaAllHooks.some((hook) => payload.title.startsWith(hook)); | ||
const isHookError = e === "hook:end" && payload.error && mochaAllHooks.some((hook) => payload.title?.startsWith(hook)); | ||
if (isTestError || isHookError) { | ||
@@ -507,2 +509,3 @@ this.#emitData({ | ||
} catch (err) { | ||
const error = err instanceof Error ? err : new Error(`An unknown error occurred: ${err}`); | ||
this.#emitData({ | ||
@@ -514,3 +517,3 @@ origin: "reporter", | ||
// Destructing of message and stack is required else nothing is outputted | ||
error: { message: err?.message, stack: err?.stack }, | ||
error: { message: error.message, stack: error.stack }, | ||
fullTitle: `reporter ${reporter.constructor.name}` | ||
@@ -517,0 +520,0 @@ } |
@@ -22,4 +22,17 @@ import type { Options, Capabilities } from '@wdio/types'; | ||
*/ | ||
emit(e: string, payload: any): void; | ||
onMessage(listener: (ev: any) => void): void; | ||
emit(e: string, payload: { | ||
cid?: string; | ||
specs?: string[]; | ||
uid?: string; | ||
file?: string; | ||
title?: string; | ||
error?: Error; | ||
sessionId?: string; | ||
config?: unknown; | ||
isMultiremote?: boolean; | ||
instanceOptions?: Options.Testrunner; | ||
capabilities?: unknown; | ||
retry?: number; | ||
}): void; | ||
onMessage(listener: (ev: unknown) => void): void; | ||
getLogFile(name: string): string | undefined; | ||
@@ -26,0 +39,0 @@ /** |
@@ -48,4 +48,4 @@ import type { Options, Capabilities } from '@wdio/types'; | ||
*/ | ||
export declare function transformExpectArgs(arg: any): any; | ||
export declare function transformExpectArgs(arg: unknown): unknown; | ||
export {}; | ||
//# sourceMappingURL=utils.d.ts.map |
{ | ||
"name": "@wdio/runner", | ||
"version": "9.4.3", | ||
"version": "9.4.4", | ||
"description": "A WebdriverIO service that runs tests in arbitrary environments", | ||
@@ -35,11 +35,11 @@ "author": "Christian Bromann <mail@bromann.dev>", | ||
"@types/node": "^20.11.28", | ||
"@wdio/config": "9.4.3", | ||
"@wdio/globals": "9.4.3", | ||
"@wdio/logger": "9.1.3", | ||
"@wdio/types": "9.4.3", | ||
"@wdio/utils": "9.4.3", | ||
"@wdio/config": "9.4.4", | ||
"@wdio/globals": "9.4.4", | ||
"@wdio/logger": "9.4.4", | ||
"@wdio/types": "9.4.4", | ||
"@wdio/utils": "9.4.4", | ||
"deepmerge-ts": "^7.0.3", | ||
"expect-webdriverio": "^5.0.1", | ||
"webdriver": "9.4.3", | ||
"webdriverio": "9.4.3" | ||
"webdriver": "9.4.4", | ||
"webdriverio": "9.4.4" | ||
}, | ||
@@ -49,3 +49,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "8ee63eaefd86cf06eea832bb8d4c1920e9cc4e55" | ||
"gitHead": "d327d86e07d16eaa0ecdf0656c1868ba73261393" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53543
1178
+ Added@wdio/config@9.4.4(transitive)
+ Added@wdio/globals@9.4.4(transitive)
+ Added@wdio/logger@9.4.4(transitive)
+ Added@wdio/protocols@9.4.4(transitive)
+ Added@wdio/repl@9.4.4(transitive)
+ Added@wdio/types@9.4.4(transitive)
+ Added@wdio/utils@9.4.4(transitive)
+ Addedwebdriver@9.4.4(transitive)
+ Addedwebdriverio@9.4.4(transitive)
- Removed@wdio/config@9.4.3(transitive)
- Removed@wdio/globals@9.4.3(transitive)
- Removed@wdio/logger@9.1.3(transitive)
- Removed@wdio/protocols@9.2.2(transitive)
- Removed@wdio/repl@9.0.8(transitive)
- Removed@wdio/types@9.4.3(transitive)
- Removed@wdio/utils@9.4.3(transitive)
- Removedwebdriver@9.4.3(transitive)
- Removedwebdriverio@9.4.3(transitive)
Updated@wdio/config@9.4.4
Updated@wdio/globals@9.4.4
Updated@wdio/logger@9.4.4
Updated@wdio/types@9.4.4
Updated@wdio/utils@9.4.4
Updatedwebdriver@9.4.4
Updatedwebdriverio@9.4.4