Total Complexity | 4 |
Complexity/F | 1.33 |
Lines of Code | 26 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | 'use strict' |
||
2 | |||
3 | import mongoose from 'mongoose' |
||
4 | import chai from 'chai' |
||
5 | import chaiHttp from 'chai-http' |
||
6 | import dirtyChai from 'dirty-chai' |
||
7 | import { before, after } from 'mocha' |
||
8 | |||
9 | chai.use(chaiHttp) |
||
10 | chai.use(dirtyChai) |
||
11 | |||
12 | // prepares a clean bank |
||
13 | before(() => { |
||
14 | const options = { |
||
15 | useNewUrlParser: true |
||
16 | } |
||
17 | mongoose.connect('mongodb://localhost/devise', options, (err) => { |
||
18 | if (err) { |
||
19 | throw err |
||
20 | } |
||
21 | }) |
||
22 | }) |
||
23 | |||
24 | after(() => { |
||
25 | mongoose.connection.dropDatabase() |
||
26 | }) |
||
27 |