Skip to content

Instantly share code, notes, and snippets.

@allomov
Created November 24, 2017 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allomov/3d8aaa44f3a415df1a882ad79abb62d7 to your computer and use it in GitHub Desktop.
Save allomov/3d8aaa44f3a415df1a882ad79abb62d7 to your computer and use it in GitHub Desktop.
const request = require('request');
module.exports = {
describe_if_reachable: function(targetUrl, name, testDescription) {
request(targetUrl, {}, function(err, res, body) {
if (err) {
describe.skip(name, testDescription);
} else {
describe(name, testDescription);
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment