Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
Add missing options
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyBelym committed Dec 6, 2017
1 parent d7f0127 commit 325f942
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
28 changes: 24 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,21 @@ var DEFAULT_OPTS = {
filter: null,
screenshotsPath: null,
takeScreenshotsOnFail: false,
reporter: [],
reporter: [],
skipJsErrors: false,
quarantineMode: false,
selectorTimeout: 10000
assertionTimeout: 3000,
pageLoadTimeout: 3000,
selectorTimeout: 10000,
proxy: '',
hostname: '',
ports: [],
speed: 1,
concurrency: 0,
app: '',
appInitDelay: 1000,
debugMode: false,
debugOnFail: false
};

module.exports = function gulpTestCafe (opts) {
Expand All @@ -42,7 +53,7 @@ module.exports = function gulpTestCafe (opts) {
var stream = this;
var testcafe = null;

createTestCafe()
createTestCafe(opts.hostname, opts.ports[0], opts.ports[1])
.then(function (tc) {
testcafe = tc;

Expand All @@ -59,12 +70,21 @@ module.exports = function gulpTestCafe (opts) {
runner.reporter(reporter);
else {
runner.reporter(
reporter.name || DEFAULT_REPORTER,
reporter.name || DEFAULT_REPORTER,
reporter.file ? fs.createWriteStream(reporter.file) : reporter.outStream
);
}
});

if (opts.concurrency)
runner.concurrency(opts.concurrency);

if (opts.app)
runner.startApp(opts.app, opts.appInitDelay);

if (opts.proxy)
runner.useProxy(opts.proxy);

return runner.run(opts);

})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gulp-testcafe",
"version": "0.9.1",
"version": "0.9.2",
"description": "Run TestCafe tests using Gulp.",
"main": "index.js",
"directories": {
Expand Down

0 comments on commit 325f942

Please sign in to comment.