Update parse SDK to 2.0.0 (#4925)

* WIP: Integrate JS SDK v2

- Removes backbone style callbacks
- Use Promise instead of Parse.Promise

* Fixes ParseObject and ParseRelation

* Updates Parse.Query with promises

* Alls tests should pass

* Ensure a fresh user is used for each test

* Use REST implementation to avoid side effects for username/email duplicates

* Uses js sdk v2
This commit is contained in:
Florent Vilmart
2018-08-05 13:58:07 -04:00
committed by GitHub
parent a61ef7ee2f
commit ff25ae254d
30 changed files with 3217 additions and 4783 deletions

View File

@@ -21,7 +21,7 @@ function createProduct() {
describe("test validate_receipt endpoint", () => {
beforeEach(done => {
createProduct().then(done).fail(function(){
createProduct().then(done).catch(function(){
done();
});
})
@@ -182,7 +182,7 @@ describe("test validate_receipt endpoint", () => {
expect(productAgain.get('downloadName')).toEqual(productAgain.get('download').name());
expect(productAgain.get("title")).toEqual("a new title");
done();
}).fail(function(err){
}).catch(function(err){
fail(JSON.stringify(err));
done();
});
@@ -199,7 +199,7 @@ describe("test validate_receipt endpoint", () => {
}).then(function(){
fail("Should not succeed");
done();
}).fail(function(err){
}).catch(function(err){
expect(err.code).toEqual(Parse.Error.INCORRECT_TYPE);
expect(err.message).toEqual("title is required.");
done();