File tree 2 files changed +2
-13
lines changed 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change 95
95
"lint" : " flow && eslint --cache ./" ,
96
96
"build" : " babel src/ -d lib/ --copy-files" ,
97
97
"watch" : " babel --watch src/ -d lib/ --copy-files" ,
98
+ "pretest" : " cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner start" ,
98
99
"test" : " cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 jasmine" ,
100
+ "posttest" : " cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner stop" ,
99
101
"coverage" : " cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 nyc jasmine" ,
100
102
"start" : " node ./bin/parse-server" ,
101
103
"prepare" : " npm run build" ,
Original file line number Diff line number Diff line change @@ -40,20 +40,12 @@ const postgresURI =
40
40
let databaseAdapter ;
41
41
// need to bind for mocking mocha
42
42
43
- let startDB = ( ) => { } ;
44
- let stopDB = ( ) => { } ;
45
-
46
43
if ( process . env . PARSE_SERVER_TEST_DB === 'postgres' ) {
47
44
databaseAdapter = new PostgresStorageAdapter ( {
48
45
uri : process . env . PARSE_SERVER_TEST_DATABASE_URI || postgresURI ,
49
46
collectionPrefix : 'test_' ,
50
47
} ) ;
51
48
} else {
52
- startDB = require ( 'mongodb-runner/mocha/before' ) . bind ( {
53
- timeout : ( ) => { } ,
54
- slow : ( ) => { } ,
55
- } ) ;
56
- stopDB = require ( 'mongodb-runner/mocha/after' ) ;
57
49
databaseAdapter = new MongoStorageAdapter ( {
58
50
uri : mongoURI ,
59
51
collectionPrefix : 'test_' ,
@@ -177,11 +169,6 @@ const reconfigureServer = changedConfiguration => {
177
169
const Parse = require ( 'parse/node' ) ;
178
170
Parse . serverURL = 'http://localhost:' + port + '/1' ;
179
171
180
- // 10 minutes timeout
181
- beforeAll ( startDB , 10 * 60 * 1000 ) ;
182
-
183
- afterAll ( stopDB ) ;
184
-
185
172
beforeEach ( done => {
186
173
try {
187
174
Parse . User . enableUnsafeCurrentUser ( ) ;
You can’t perform that action at this time.
0 commit comments