Skip to content

Commit

Permalink
Merge pull request #15 from testable/fix_module_augmentation_error
Browse files Browse the repository at this point in the history
Fixed  error TS2666: Exports and export assignments are not permitted…
  • Loading branch information
avistramer authored Oct 26, 2021
2 parents e57027f + d22ebc2 commit 2ed0c48
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 49 deletions.
90 changes: 42 additions & 48 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ declare namespace testableUtils {

function init(): void;

function execute(func: Function)
function execute(func: Function);

function stopwatch(code: Function, metricName?: string, resource?: string)
function stopwatch(code: Function, metricName?: string, resource?: string);

function waitForFinish(): Promise<void>
function waitForFinish(): Promise<void>;

function describe(suiteName: string, fn: Function): Promise<void>;

Expand Down Expand Up @@ -42,53 +42,53 @@ declare namespace testableUtils {
indexed: Array<any>;
}
interface DataTable{
get(i: number): Promise<DataRow>
random(): Promise<DataRow>
next(options?: object): Promise<Array<DataRow>>
get(i: number): Promise<DataRow>;
random(): Promise<DataRow>;
next(options?: object): Promise<Array<DataRow>>;
}
var dataTable: {
open(name: string): DataTable
open(name: string): DataTable;
};


interface Chunk {
id: number,
executionType: string,
agent: string,
createdAt: Date,
updatedAt: Date,
startedAt: Date,
concurrentClients: number
id: number;
executionType: string;
agent: string;
createdAt: Date;
updatedAt: Date;
startedAt: Date;
concurrentClients: number;
}
interface Execution {
id: number,
createdAt: Date,
updatedAt: Date,
startedAt: Date,
concurrentClients: number
id: number;
createdAt: Date;
updatedAt: Date;
startedAt: Date;
concurrentClients: number;
}
interface Region {
id: number,
createdAt: Date,
updatedAt: Date,
name: string,
public: boolean,
latitude: number,
longitude: number,
description: string,
active: boolean
id: number;
createdAt: Date;
updatedAt: Date;
name: string;
public: boolean;
latitude: number;
longitude: number;
description: string;
active: boolean;
}
var info: {
expectedFinishTimestamp: number,
iteration: number,
client: number,
globalClientIndex: number,
regionalClientIndex: number,
chunk: Chunk,
agent: string,
execution: Execution,
region: Region,
outputDir: string
expectedFinishTimestamp: number;
iteration: number;
client: number;
globalClientIndex: number;
regionalClientIndex: number;
chunk: Chunk;
agent: string;
execution: Execution;
region: Region;
outputDir: string;
}


Expand All @@ -115,7 +115,7 @@ declare namespace testableUtils {
markAsSuccess(): void;
markAsFailure(): void;

data: { resource: string, url: string },
data: { resource: string, url: string };
}
interface ResultOptions {
namespace?: string;
Expand Down Expand Up @@ -143,9 +143,7 @@ declare namespace testableUtils {

}

declare module "testable-utils" {
export = testableUtils
}
export = testableUtils

declare global {
namespace WebdriverIO {
Expand All @@ -155,9 +153,9 @@ declare global {
testableLogFatal: (message?: any) => any;
testableLogInfo: (message?: any) => any;
testableLogTrace: (message?: any) => any;
testableCsvGet: (name: string, index: number) => Promise<testableUtils.DataRow>
testableCsvGet: (name: string, index: number) => Promise<testableUtils.DataRow>;
testableCsvRandom: (name: string) => Promise<testableUtils.DataRow>;
testableCsvNext: (name: string, options?: any) => Promise<Array<testableUtils.DataRow>>
testableCsvNext: (name: string, options?: any) => Promise<Array<testableUtils.DataRow>>;
testableResult: (resource?: string, url?: string) => any;
testableTiming: (result: any, options: testableUtils.ResultOptions) => Promise<void>;
testableCounter: (result: any, options: testableUtils.ResultOptions) => Promise<void>;
Expand All @@ -178,7 +176,3 @@ declare global {
}
}
}

declare module "webdriverio/sync" {
export = WebdriverIO
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "testable-utils",
"version": "0.5.11",
"version": "0.5.12",
"description": "Utilities for Testable scripts",
"author": "Avi Stramer",
"keywords": [
Expand Down

0 comments on commit 2ed0c48

Please sign in to comment.