Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Commit

Permalink
fix: don't throw on close without tunnel
Browse files Browse the repository at this point in the history
if there is no tunnel, just resolve, there's no real reason to fail
  • Loading branch information
w33ble committed Apr 6, 2018
1 parent e4858ed commit fbde392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default function createRunner(sauceUser, sauceKey) {

close() {
if (state.isRunning) return Promise.reject(new Error('Tests are still running'));
if (!state.tunnel) return Promise.reject(new Error('No tunnel created'));
if (!state.tunnel) return Promise.resolve();

return new Promise(resolve =>
state.tunnel.close(() => {
Expand Down

0 comments on commit fbde392

Please sign in to comment.