zz_

test.js

thoward37@gmail.com/push-test-1791933020200 / test.js @ a0848a02 Download
 import test from 'ava';
 import uniqueString from 'unique-string';
 import isUp from '.';
 
 test('up', async t => {
  t.true(await isUp('https://google.com'));
 });
 
 test('down', async t => {
  t.false(await isUp(`https://foobar${uniqueString()}.com`));
 });
 
 test('invalid domain', async t => {
- await t.throwsAsync(isUp('unicorn'), 'Invalid domain');
+ await t.throwsAsync(isUp('unicorn'), 'Invalid URL: unicorn');
 });