Passed
Pull Request — master (#2)
by André
02:38 queued 24s
created

spec/out.js   A

Complexity

Total Complexity 6
Complexity/F 1

Size

Lines of Code 40
Function Count 6

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 0
wmc 6
eloc 17
c 0
b 0
f 0
nc 1
mnd 0
bc 6
fnc 6
dl 0
loc 40
rs 10
bpm 1
cpm 1
noi 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A out.js ➔ ??? 0 23 1
1
'use strict'
2
3
const chai = require('chai')
4
const expect = chai.expect
5
6
const out = require('../src/out.js')
7
const fixtureInput = require('./fixtures/input.json')
8
9
/**
10
 * Test behavior
11
 *
12
 * 1. Test sourceConfiguration
13
 * - source: url, password
14
 * - params: payload, topic
15
 * 2. Test to send payloads
16
 * 3. Test callback to send status
17
 */
18
describe('out', () => {
19
20
	beforeEach((done) => {
21
		this.input = JSON.parse(JSON.stringify(fixtureInput))
22
		done()
23
	})
24
25
	afterEach((done) => {
26
		delete this.input
27
		done()
28
	})
29
30
	describe('out', () => {
31
		it('should not throw an error', (done) => {
32
			out(this.input, (error) => {
33
				expect(error).to.be.not.exist
0 ignored issues
show
introduced by
The result of the property access to expect(error).to.be.not.exist is not used.
Loading history...
34
				done()
35
			})
36
37
		})
38
39
	})
40
})
41