File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
src/__tests__/guthub_issues Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 9393 "build-flow" : " echo `$1` && find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo ./${COPY_TO_FOLDER:-lib}$filepath | sed 's/.\\ /src\\ //\\ //g'`.flow; done" ,
9494 "build-ts" : " find ./src -name '*.d.ts' -not -path '*/__*' | while read filepath; do cp $filepath `echo ./${COPY_TO_FOLDER:-lib}$filepath | sed 's/.\\ /src\\ //\\ //g'`; done" ,
9595 "watch" : " jest --watch" ,
96- "coverage" : " jest --coverage --maxWorkers 2 " ,
96+ "coverage" : " jest --coverage --maxWorkers 4 " ,
9797 "lint" : " npm run eslint && npm run tslint" ,
9898 "eslint" : " eslint --ext .js ./src" ,
9999 "tslint" : " tslint -p . \" src/**/*.d.ts\" " ,
Original file line number Diff line number Diff line change 11/* @flow */
22
33import mongoose from 'mongoose' ;
4+ import MongodbMemoryServer from 'mongodb-memory-server' ;
45import { schemaComposer , graphql } from 'graphql-compose' ;
56import { composeWithMongoose } from '../../index' ;
67
8+ let mongoServer ;
9+ beforeAll ( async ( ) => {
10+ mongoServer = new MongodbMemoryServer ( ) ;
11+ const mongoUri = await mongoServer . getConnectionString ( ) ;
12+ await mongoose . connect (
13+ mongoUri ,
14+ { useNewUrlParser : true }
15+ ) ;
16+ } ) ;
17+
18+ afterAll ( ( ) => {
19+ mongoose . disconnect ( ) ;
20+ mongoServer . stop ( ) ;
21+ } ) ;
22+
723// May require additional time for downloading MongoDB binaries
824jasmine . DEFAULT_TIMEOUT_INTERVAL = 60000 ;
925
You can’t perform that action at this time.
0 commit comments