|
|
@ -27,7 +27,7 @@ test.before('setup', async t => { |
|
|
|
test('url is required', async t => { |
|
|
|
try { |
|
|
|
await got(); |
|
|
|
t.fail('Exception is not thrown'); |
|
|
|
t.fail('Exception was not thrown'); |
|
|
|
} catch (err) { |
|
|
|
t.regexTest(/Parameter `url` must be a string or object, not undefined/, err.message); |
|
|
|
} |
|
|
@ -55,7 +55,7 @@ test('overrides querystring from opts', async t => { |
|
|
|
test('should throw with auth in url', async t => { |
|
|
|
try { |
|
|
|
await got(`https://test:45d3ps453@account.myservice.com/api/token`); |
|
|
|
t.fail('Exception is not thrown'); |
|
|
|
t.fail('Exception was not thrown'); |
|
|
|
} catch (err) { |
|
|
|
t.regexTest(/Basic authentication must be done with auth option/, err.message); |
|
|
|
} |
|
|
|