1 | const mongoose = require('mongoose');
|
2 | const mockgoose = require('../mockgoose');
|
3 | const expect = require('chai').expect;
|
4 |
|
5 | mockgoose( mongoose )
|
6 |
|
7 |
|
8 | before(function(done) {
|
9 | mongoose.connect('mongodb://example.com/TestingDB', function(err) {
|
10 | done(err)
|
11 | })
|
12 | });
|
13 |
|
14 |
|
15 | after(function(done) {
|
16 | console.log('Closing')
|
17 | mongoose.connection.close(function() {
|
18 | console.log('Closed')
|
19 | done()
|
20 | })
|
21 | })
|
22 |
|
23 |
|
24 | describe('Foobar', function () {
|
25 | describe('.createFoo', function () {
|
26 | it( 'Creating foo with no data', function( done ) {
|
27 | expect( null ).to.not.equal( null );
|
28 | done();
|
29 | })
|
30 | });
|
31 | });
|