Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hboylan committed Nov 7, 2017
1 parent 400559f commit 4683e45
Show file tree
Hide file tree
Showing 4 changed files with 294 additions and 351 deletions.
4 changes: 2 additions & 2 deletions generators/app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"eslint-plugin-promise": "^3.0.0",
"eslint-plugin-standard": "^3.0.1",
"jest-cli": "^20.0.4",
"mockgoose": "^6.0.8",
"mockgoose": "^7.3.3",
"nock": "^9.0.2",
"nodemon": "^1.10.2",
"opn-cli": "^3.1.0",
Expand Down Expand Up @@ -61,7 +61,7 @@
<%_ if (generateAuthApi) { _%>
"jsonwebtoken": "^8.1.0",
<%_ } _%>
"mongoose": "^4.12.4",
"mongoose": "^4.13.0",
"mongoose-create-unique": "^0.4.4",
"mongoose-keywords": "^0.3.2",
"morgan": "^1.7.0",
Expand Down
6 changes: 4 additions & 2 deletions generators/app/templates/test/setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EventEmitter } from 'events'
import mockgoose from 'mockgoose'
import { Mockgoose } from 'mockgoose'
import mongoose from '../<%= srcDir %>/services/mongoose'
import { mongo } from '../<%= srcDir %>/config'

Expand All @@ -22,8 +22,10 @@ global.TypeError = TypeError
global.parseInt = parseInt
global.parseFloat = parseFloat

const mockgoose = new Mockgoose(mongoose)

beforeAll(async () => {
await mockgoose(mongoose)
await mockgoose.prepareStorage()
mongoose.connect(mongo.uri)
})

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
"gulp-plumber": "^1.0.0",
"jest-cli": "^18.1.0",
"jsonwebtoken": "^7.1.9",
"mockgoose": "^6.0.8",
"mongoose": "^4.4.19",
"mockgoose": "^7.3.3",
"mongoose": "^4.13.0",
"mongoose-create-unique": "^0.4.1",
"mongoose-keywords": "^0.3.1",
"morgan": "^1.7.0",
Expand Down
Loading

0 comments on commit 4683e45

Please sign in to comment.