diff --git a/index.d.ts b/index.d.ts index ea3fdb3..503e063 100644 --- a/index.d.ts +++ b/index.d.ts @@ -133,36 +133,38 @@ declare module "testable-utils" { export = testableUtils } -declare namespace WebdriverIO { - interface Browser { - testableLogDebug: (message?: any) => any; - testableLogError: (message?: any) => any; - testableLogFatal: (message?: any) => any; - testableLogInfo: (message?: any) => any; - testableLogTrace: (message?: any) => any; - testableCsvGet: (name: string, index: number) => Promise - testableCsvRandom: (name: string) => Promise; - testableCsvNext: (name: string, options?: any) => Promise> - testableResult: (resource?: string, url?: string) => any; - testableTiming: (result: any, options: testableUtils.ResultOptions) => Promise; - testableCounter: (result: any, options: testableUtils.ResultOptions) => Promise; - testableHistogram: (result: any, options: testableUtils.ResultOptions) => Promise; - testableMetered: (result: any, options: testableUtils.ResultOptions) => Promise; - testableGetMetric: () => any; - testableWaitForCondition: (options: testableUtils.Condition) => Promise; - testableWaitForValue: (options: testableUtils.ValueCondition) => Promise; - testableIncrementAndWaitForValue: (name: string, value?: number) => Promise; - testableBarrier: (name: string, value?: any) => any; - testableInfo: () => any; - - testableScreenshot: (name: string) => any; - testableStopwatch: (code: Function, metricName?: string, resource?: string) => any; - testableWaitForEvent: (eventName: string, timeout?: number, defaultVal?: any) => any; - - testableWaitForFinish: () => Promise; +declare global { + namespace WebdriverIO { + interface Browser { + testableLogDebug: (message?: any) => any; + testableLogError: (message?: any) => any; + testableLogFatal: (message?: any) => any; + testableLogInfo: (message?: any) => any; + testableLogTrace: (message?: any) => any; + testableCsvGet: (name: string, index: number) => Promise + testableCsvRandom: (name: string) => Promise; + testableCsvNext: (name: string, options?: any) => Promise> + testableResult: (resource?: string, url?: string) => any; + testableTiming: (result: any, options: testableUtils.ResultOptions) => Promise; + testableCounter: (result: any, options: testableUtils.ResultOptions) => Promise; + testableHistogram: (result: any, options: testableUtils.ResultOptions) => Promise; + testableMetered: (result: any, options: testableUtils.ResultOptions) => Promise; + testableGetMetric: () => any; + testableWaitForCondition: (options: testableUtils.Condition) => Promise; + testableWaitForValue: (options: testableUtils.ValueCondition) => Promise; + testableIncrementAndWaitForValue: (name: string, value?: number) => Promise; + testableBarrier: (name: string, value?: any) => any; + testableInfo: () => any; + + testableScreenshot: (name: string) => any; + testableStopwatch: (code: Function, metricName?: string, resource?: string) => any; + testableWaitForEvent: (eventName: string, timeout?: number, defaultVal?: any) => any; + + testableWaitForFinish: () => Promise; + } } } -declare module "@wdio/sync" { +declare module "webdriverio/sync" { export = WebdriverIO } diff --git a/package.json b/package.json index 2b1d978..8a13944 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "testable-utils", - "version": "0.5.8", + "version": "0.5.9", "description": "Utilities for Testable scripts", "author": "Avi Stramer", "keywords": [