mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 1095267 - Assert the promise's timeToSettle is a number only if its state isn't 'pending'. r=fitzgen
--HG-- extra : rebase_source : 226bc42d409c63c0ff8a0e8f7c560a6fca699ef6
This commit is contained in:
parent
f3414f6c10
commit
d66a91a2b0
@ -47,8 +47,10 @@ function* testListPromises(client, form, makePromise) {
|
||||
equal(p.class, "Promise", "Expect class to be Promise");
|
||||
equal(typeof p.promiseState.creationTimestamp, "number",
|
||||
"Expect creation timestamp to be a number");
|
||||
equal(typeof p.promiseState.timeToSettle, "number",
|
||||
"Expect time to settle to be a number");
|
||||
if (p.promiseState.state !== "pending") {
|
||||
equal(typeof p.promiseState.timeToSettle, "number",
|
||||
"Expect time to settle to be a number");
|
||||
}
|
||||
|
||||
if (p.promiseState.state === "fulfilled" &&
|
||||
p.promiseState.value === resolution) {
|
||||
|
Loading…
Reference in New Issue
Block a user