-
-
Notifications
You must be signed in to change notification settings - Fork 596
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: SDK builds incorrectly since release 3.5.0 causing various bugs (#…
- Loading branch information
Showing
5 changed files
with
260 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const puppeteer = require('puppeteer'); | ||
let page = null; | ||
for (const fileName of ['parse.js', 'parse.min.js']) { | ||
beforeAll(async () => { | ||
const browser = await puppeteer.launch(); | ||
page = await browser.newPage(); | ||
await page.goto(`http://localhost:1337/${fileName}`); | ||
}); | ||
describe(`Parse Dist Test ${fileName}`, () => { | ||
it('can save an object', async () => { | ||
const response = await page.evaluate(async () => { | ||
const object = await new Parse.Object('TestObject').save(); | ||
return object.id; | ||
}); | ||
expect(response).toBeDefined(); | ||
const obj = await new Parse.Query('TestObject').first(); | ||
expect(obj).toBeDefined(); | ||
expect(obj.id).toEqual(response); | ||
}); | ||
it('can query an object', async () => { | ||
const obj = await new Parse.Object('TestObject').save(); | ||
const response = await page.evaluate(async () => { | ||
const object = await new Parse.Query('TestObject').first(); | ||
return object.id; | ||
}); | ||
expect(response).toBeDefined(); | ||
expect(obj).toBeDefined(); | ||
expect(obj.id).toEqual(response); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.