Skip to content

Commit cc728c5

Browse files
committed
flaky test abort immediately
1 parent 86b512c commit cc728c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

integration/test/ParseDistTest.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ for (const fileName of ['parse.js', 'parse.min.js']) {
8181
request.continue();
8282
});
8383
page.on('requestfailed', request => {
84+
console.log(request);
85+
console.log(request.failure());
86+
console.log(request.url());
8487
if (request.failure().errorText === 'net::ERR_ABORTED' && !request.url().includes('favicon.ico')) {
8588
abortedCount += 1;
8689
promise.resolve();
@@ -94,14 +97,13 @@ for (const fileName of ['parse.js', 'parse.min.js']) {
9497
const base64 = await logo.getData();
9598

9699
const file = new Parse.File('parse-base64.txt', { base64 });
97-
file.save().then(() => {});
98-
99100
const intervalId = setInterval(() => {
100101
if (file._requestTask && typeof file._requestTask.abort === 'function') {
101102
file.cancel();
102103
clearInterval(intervalId);
103104
}
104105
}, 1);
106+
file.save().then(() => {});
105107
});
106108
await promise;
107109
expect(requestsCount).toBe(3);

0 commit comments

Comments
 (0)