New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

testable-utils

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testable-utils - npm Package Compare versions

Comparing version 0.5.11 to 0.5.12

92

index.d.ts

@@ -10,7 +10,7 @@ import {EventEmitter} from "events";

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>;

@@ -46,8 +46,8 @@ function describe(suiteName: string, fn: Function): Promise<void>;

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;
};

@@ -57,39 +57,39 @@

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;
}

@@ -121,3 +121,3 @@

data: { resource: string, url: string },
data: { resource: string, url: string };
}

@@ -150,5 +150,3 @@ interface ResultOptions {

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

@@ -163,5 +161,5 @@ declare global {

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;

@@ -179,3 +177,3 @@ testableTiming: (result: any, options: testableUtils.ResultOptions) => Promise<void>;

testableScreenshot: (name: string) => any;
testableScreenshot: (name: string) => Promise<any>;
testableStopwatch: (code: Function, metricName?: string, resource?: string) => any;

@@ -188,5 +186,1 @@ testableWaitForEvent: (eventName: string, timeout?: number, defaultVal?: any) => any;

}
declare module "webdriverio/sync" {
export = WebdriverIO
}

@@ -133,5 +133,5 @@ const _ = require('lodash');

});
browser.addCommand('testableScreenshot', function(name) {
browser.addCommand('testableScreenshot', async function(name) {
const path = pathModule.join(process.env.OUTPUT_DIR || '.', name + '.png');
browser.saveScreenshot(path);
await browser.saveScreenshot(path);
return path;

@@ -138,0 +138,0 @@ });

{
"name": "testable-utils",
"version": "0.5.11",
"version": "0.5.12",
"description": "Utilities for Testable scripts",

@@ -5,0 +5,0 @@ "author": "Avi Stramer",

@@ -375,8 +375,8 @@ # Testable Script Utilities

describe('Load Url Requested in Event', function() {
it('should load url', function() {
it('should load url', async () => {
browser.testableLogInfo('Waiting on load-url event');
// no timeout (0), use Google url for local/smoke testing
const url = browser.testableWaitForEvent('load-url', 0, 'https://google.com');
browser.url(url);
browser.testableScreenshot('Requested Url');
await browser.url(url);
await browser.testableScreenshot('Requested Url');
});

@@ -439,3 +439,3 @@ });

One command that has no `testable-utils` equivalent is `browser.testableScreenshot(name)`. This command takes a screenshot and puts it in the output directory to be collected as part of the test results. It also includes a prefix to make it easier to identify: `[region]-[chunk]-[user]-[iteration]-[name].png`. Tests are broken up into chunks, and within each chunk users and iterations are numbered starting at 0. So for example `us-east-1-123-0-0-MyHomePage.png` would be chunk id 123, first user, first iteration, image name `MyHomePage`.
One command that has no `testable-utils` equivalent is `await browser.testableScreenshot(name)`. This command takes a screenshot and puts it in the output directory to be collected as part of the test results. It also includes a prefix to make it easier to identify: `[region]-[chunk]-[user]-[iteration]-[name].png`. Tests are broken up into chunks, and within each chunk users and iterations are numbered starting at 0. So for example `us-east-1-123-0-0-MyHomePage.png` would be chunk id 123, first user, first iteration, image name `MyHomePage`.

@@ -442,0 +442,0 @@ ### Command Mappings

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc