mirror of
https://github.com/zotero/zotero.git
synced 2026-09-27 01:21:27 +00:00
Remove uses of Promise.isFulfilled() in connector server tests
This commit is contained in:
parent
c2b6a9cc12
commit
0bf4fc54c4
1 changed files with 7 additions and 2 deletions
|
|
@ -427,6 +427,8 @@ describe("Connector Server", function () {
|
|||
var promise = waitForItemEvent('add').then(function (_ids) {
|
||||
ids = _ids;
|
||||
});
|
||||
var promiseFulfilled = false;
|
||||
promise.then(() => promiseFulfilled = true);
|
||||
|
||||
var file = getTestDataDirectory();
|
||||
file.append('snapshot');
|
||||
|
|
@ -447,7 +449,7 @@ describe("Connector Server", function () {
|
|||
}
|
||||
);
|
||||
|
||||
assert.isTrue(promise.isFulfilled());
|
||||
assert.isTrue(promiseFulfilled);
|
||||
|
||||
// Check item
|
||||
assert.lengthOf(ids, 1);
|
||||
|
|
@ -1140,6 +1142,9 @@ describe("Connector Server", function () {
|
|||
ids2 = ids;
|
||||
});
|
||||
});
|
||||
var promiseFulfilled = false;
|
||||
promise.then(() => promiseFulfilled = true);
|
||||
|
||||
await httpRequest(
|
||||
'POST',
|
||||
connectorServerPath + "/connector/saveSnapshot",
|
||||
|
|
@ -1171,7 +1176,7 @@ describe("Connector Server", function () {
|
|||
}
|
||||
);
|
||||
|
||||
assert.isTrue(promise.isFulfilled());
|
||||
assert.isTrue(promiseFulfilled);
|
||||
|
||||
var item = Zotero.Items.get(ids1[0]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue