Total Complexity | 3 |
Complexity/F | 1 |
Lines of Code | 14 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | const unfurl = require('../index.js') |
||
2 | var chai = require('chai') |
||
3 | var expect = chai.expect |
||
4 | chai.use(require('chai-as-promised')) |
||
5 | |||
6 | describe('request module', function () { |
||
7 | it('should reject if URI is not valid', function () { |
||
8 | return expect(unfurl('123')).to.be.rejectedWith('Invalid URI') |
||
9 | }) |
||
10 | |||
11 | it('should reject if ENOTFOUND', function () { |
||
12 | return expect(unfurl('http://foo.bar')).to.be.rejectedWith('ENOTFOUND') |
||
13 | }) |
||
14 | }) |
||
15 |