Skip to content

Commit

Permalink
remove extra parse instance
Browse files Browse the repository at this point in the history
  • Loading branch information
dplewis committed Jan 9, 2021
1 parent 27992ad commit 21422f4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 98 deletions.
33 changes: 8 additions & 25 deletions spec/ParseAPI.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,14 @@ const headers = {
};

describe_only_db('mongo')('miscellaneous', () => {
it('test rest_create_app', function (done) {
let appId;
Parse._request('POST', 'rest_create_app')
.then(res => {
expect(typeof res.application_id).toEqual('string');
expect(res.master_key).toEqual('master');
appId = res.application_id;
Parse.initialize(appId, 'unused');
const obj = new Parse.Object('TestObject');
obj.set('foo', 'bar');
return obj.save();
})
.then(() => {
const config = Config.get(appId);
return config.database.adapter.find('TestObject', { fields: {} }, {}, {});
})
.then(results => {
expect(results.length).toEqual(1);
expect(results[0]['foo']).toEqual('bar');
done();
})
.catch(error => {
fail(JSON.stringify(error));
done();
});
it('db contains document after successful save', async () => {
const obj = new Parse.Object('TestObject');
obj.set('foo', 'bar');
await obj.save();
const config = Config.get(defaultConfiguration.appId);
const results = await config.database.adapter.find('TestObject', { fields: {} }, {}, {});
expect(results.length).toEqual(1);
expect(results[0]['foo']).toEqual('bar');
});
});

Expand Down
1 change: 0 additions & 1 deletion spec/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ const reconfigureServer = changedConfiguration => {
});
cache.clear();
parseServer = ParseServer.start(newConfiguration);
parseServer.app.use(require('./testing-routes').router);
parseServer.expressApp.use('/1', err => {
console.error(err);
fail('should not call next');
Expand Down
72 changes: 0 additions & 72 deletions spec/testing-routes.js

This file was deleted.

0 comments on commit 21422f4

Please sign in to comment.