Skip to content

Commit 326a0f4

Browse files
committed
batch.spec.js
1 parent 0893e8e commit 326a0f4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

spec/ParseServerRESTController.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ describe('ParseServerRESTController', () => {
186186
}
187187
});
188188

189-
it('should handle a batch request with transaction = true', done => {
189+
it('should handle a batch request with transaction = true', async done => {
190+
await reconfigureServer();
190191
const myObject = new Parse.Object('MyObject'); // This is important because transaction only works on pre-existing collections
191192
myObject
192193
.save()

spec/batch.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ describe('batch', () => {
175175
) {
176176
describe('transactions', () => {
177177
beforeEach(async () => {
178+
await TestUtils.destroyAllDataPermanently(true);
178179
if (
179180
semver.satisfies(process.env.MONGODB_VERSION, '>=4.0.4') &&
180181
process.env.MONGODB_TOPOLOGY === 'replicaset' &&
@@ -185,13 +186,13 @@ describe('batch', () => {
185186
databaseURI:
186187
'mongodb://localhost:27017/parseServerMongoAdapterTestDatabase?replicaSet=replicaset',
187188
});
188-
await TestUtils.destroyAllDataPermanently(true);
189189
} else {
190190
await reconfigureServer();
191191
}
192192
});
193193

194194
it('should handle a batch request with transaction = true', async done => {
195+
await reconfigureServer();
195196
const myObject = new Parse.Object('MyObject'); // This is important because transaction only works on pre-existing collections
196197
myObject
197198
.save()

0 commit comments

Comments
 (0)