test/request-errors.js   A
last analyzed

Complexity

Total Complexity 3
Complexity/F 1

Size

Lines of Code 14
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 3
c 1
b 0
f 0
nc 1
mnd 0
bc 3
fnc 3
dl 0
loc 14
rs 10
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A request-errors.js ➔ describe(ꞌrequest moduleꞌ) 0 9 1
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