Test Failed
Push — master ( 853a48...344ee9 )
by Emil
02:45
created

v1/db/database.js   A

Complexity

Total Complexity 2
Complexity/F 2

Size

Lines of Code 9
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 0
eloc 5
nc 1
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 2
mnd 1
bc 2
fnc 1
bpm 2
cpm 2
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A module.exports.constructor 0 7 2
1
var sqlite3 = require('sqlite3').verbose();
2
3
module.exports = (function () {
4
    if (process.env.NODE_ENV === 'test') {
5
        return new sqlite3.Database('./v1/db/test.sqlite');
6
    }
7
8
    return new sqlite3.Database('./v1/db/orders.sqlite');
9
}());
10