testable-utils
Advanced tools
Comparing version 0.5.10 to 0.5.11
@@ -8,2 +8,4 @@ import {EventEmitter} from "events"; | ||
function init(): void; | ||
function execute(func: Function) | ||
@@ -10,0 +12,0 @@ |
@@ -76,3 +76,2 @@ const fs = require('fs'); | ||
options.units = 'ms'; | ||
const _this = this; | ||
return new Promise(function(resolve, reject) { | ||
@@ -121,20 +120,25 @@ var done = function() { | ||
if (registerCommands) { | ||
const browsers = [ browser ]; | ||
if (process.env.TESTABLE_BROWSERS) { | ||
_.forEach(process.env.TESTABLE_BROWSERS.split(","), function(name) { | ||
if (name !== 'browser' && global[name]) | ||
browsers.push(global[name]); | ||
const registerWdioCommands = function() { | ||
if (registerCommands) { | ||
const browsers = [ browser ]; | ||
if (process.env.TESTABLE_BROWSERS) { | ||
_.forEach(process.env.TESTABLE_BROWSERS.split(","), function(name) { | ||
if (name !== 'browser' && global[name]) | ||
browsers.push(global[name]); | ||
}); | ||
} | ||
_.forEach(browsers, function(brwsr) { | ||
wdio.registerLogCommands(brwsr, log); | ||
wdio.registerCsvCommands(brwsr, csv); | ||
wdio.registerResultsCommands(brwsr, results, doNotWait); | ||
wdio.registerInfoCommands(brwsr, info, isLocal); | ||
wdio.registerStopwatchCommands(brwsr, stopwatch); | ||
wdio.registerEventsCommands(brwsr, events, doNotWait, waitForFinish); | ||
}); | ||
} | ||
_.forEach(browsers, function(brwsr) { | ||
wdio.registerLogCommands(brwsr, log); | ||
wdio.registerCsvCommands(brwsr, csv); | ||
wdio.registerResultsCommands(brwsr, results, doNotWait); | ||
wdio.registerInfoCommands(brwsr, info, isLocal); | ||
wdio.registerStopwatchCommands(brwsr, stopwatch); | ||
wdio.registerEventsCommands(brwsr, events, doNotWait, waitForFinish); | ||
}); | ||
} | ||
if (!isLocal && process.env.WDIO_INIT_TESTABLEUTILS !== 'true') | ||
registerWdioCommands(); | ||
const testSteps = new TestSteps(); | ||
@@ -152,2 +156,3 @@ | ||
module.exports.waitForFinish = waitForFinish; | ||
module.exports.init = registerWdioCommands; | ||
@@ -154,0 +159,0 @@ module.exports.describe = testSteps.describe.bind(testSteps); |
{ | ||
"name": "testable-utils", | ||
"version": "0.5.10", | ||
"version": "0.5.11", | ||
"description": "Utilities for Testable scripts", | ||
@@ -5,0 +5,0 @@ "author": "Avi Stramer", |
@@ -40,2 +40,12 @@ # Testable Script Utilities | ||
If you are using Webdriver.io with our custom commands you will need to add the following in your `wdio.conf.js` file to ensure they get registered: | ||
``` | ||
... | ||
before: function (capabilities, specs, browser) { | ||
require('testable-utils').init(); | ||
}, | ||
... | ||
``` | ||
## APIs | ||
@@ -42,0 +52,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
58481
1118
561
24
1