Skip to content

Commit

Permalink
tests: fix opn stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
shakyShane committed Nov 20, 2016
1 parent f3b921b commit 8dd9f01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions test/specs/e2e/e2e.options.open.browsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ describe("E2E browser option with app args", function () {
var stub = sinon.spy(utils, "open");
var opnPath = require.resolve("opn");
require(opnPath);
var opnStub = require("sinon").stub(require.cache[opnPath], "exports");
var opnStub = require("sinon").stub(require.cache[opnPath], "exports")
.returns({catch: function(){}});

browserSync(config, function (err, bs) {
bs.cleanup();
Expand Down Expand Up @@ -126,7 +127,8 @@ describe("E2E browser option with app args", function () {
var stub = sinon.spy(utils, "open");
var opnPath = require.resolve("opn");
require(opnPath);
var opnStub = require("sinon").stub(require.cache[opnPath], "exports");
var opnStub = require("sinon").stub(require.cache[opnPath], "exports")
.returns({catch: function(){}});

browserSync(config, function (err, bs) {
bs.cleanup();
Expand Down
6 changes: 4 additions & 2 deletions test/specs/e2e/e2e.options.open.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ describe("E2E OPEN options with external", function () {
stub = sinon.spy(utils, "open");
opnPath = require.resolve("opn");
require(opnPath);
opnStub = require("sinon").stub(require.cache[opnPath], "exports");
opnStub = require("sinon").stub(require.cache[opnPath], "exports")
.returns({catch: function(){}});
bs = browserSync(config, done).instance;
});

Expand Down Expand Up @@ -81,7 +82,8 @@ describe("E2E OPEN options with UI + snippet", function () {
stub = sinon.spy(utils, "open");
opnPath = require.resolve("opn");
require(opnPath);
opnStub = require("sinon").stub(require.cache[opnPath], "exports");
opnStub = require("sinon").stub(require.cache[opnPath], "exports")
.returns({catch: function(){}});
bs = browserSync(config, done).instance;
});

Expand Down

0 comments on commit 8dd9f01

Please sign in to comment.