mirror of
https://github.com/tc39/test262.git
synced 2025-07-29 17:04:31 +02:00
Refactor simple cases of (IIFE/async function).then(\$DONE, \$DONE); to use asyncTest
This commit is contained in:
parent
1d116b48a9
commit
4d9d5c570d
@ -12,6 +12,7 @@ info: |
|
|||||||
|
|
||||||
flags: [async, noStrict]
|
flags: [async, noStrict]
|
||||||
features: [async-functions]
|
features: [async-functions]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// increment callCount in case "body"
|
// increment callCount in case "body"
|
||||||
@ -20,8 +21,8 @@ let ref = async function BindingIdentifier() {
|
|||||||
/*{ body }*/
|
/*{ body }*/
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
assert.sameValue(await ref(), ref);
|
assert.sameValue(await ref(), ref);
|
||||||
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ info: |
|
|||||||
|
|
||||||
features: [async-functions]
|
features: [async-functions]
|
||||||
flags: [async, onlyStrict]
|
flags: [async, onlyStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// increment callCount in case "body"
|
// increment callCount in case "body"
|
||||||
@ -20,7 +21,7 @@ let ref = async function BindingIdentifier() {
|
|||||||
/*{ body }*/
|
/*{ body }*/
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
let catchCount = 0;
|
let catchCount = 0;
|
||||||
try {
|
try {
|
||||||
await ref()
|
await ref()
|
||||||
@ -30,5 +31,5 @@ let ref = async function BindingIdentifier() {
|
|||||||
}
|
}
|
||||||
assert.sameValue(catchCount, 1);
|
assert.sameValue(catchCount, 1);
|
||||||
assert.sameValue(callCount, 1);
|
assert.sameValue(callCount, 1);
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ info: |
|
|||||||
|
|
||||||
features: [async-iteration]
|
features: [async-iteration]
|
||||||
flags: [async, noStrict]
|
flags: [async, noStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// increment callCount in case "body"
|
// increment callCount in case "body"
|
||||||
@ -18,8 +19,8 @@ let ref = async function * BindingIdentifier() {
|
|||||||
/*{ body }*/
|
/*{ body }*/
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
assert.sameValue((await (await ref()).next()).value, ref);
|
assert.sameValue((await (await ref()).next()).value, ref);
|
||||||
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ info: |
|
|||||||
|
|
||||||
features: [async-iteration]
|
features: [async-iteration]
|
||||||
flags: [async, onlyStrict]
|
flags: [async, onlyStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// increment callCount in case "body"
|
// increment callCount in case "body"
|
||||||
@ -18,7 +19,7 @@ let ref = async function * BindingIdentifier() {
|
|||||||
/*{ body }*/
|
/*{ body }*/
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
let catchCount = 0;
|
let catchCount = 0;
|
||||||
try {
|
try {
|
||||||
(await (await ref()).next()).value
|
(await (await ref()).next()).value
|
||||||
@ -28,5 +29,5 @@ let ref = async function * BindingIdentifier() {
|
|||||||
}
|
}
|
||||||
assert.sameValue(catchCount, 1);
|
assert.sameValue(catchCount, 1);
|
||||||
assert.sameValue(callCount, 1);
|
assert.sameValue(callCount, 1);
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ info: |
|
|||||||
[...]
|
[...]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [async-iteration]
|
features: [async-iteration]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var nextArgumentsLength;
|
var nextArgumentsLength;
|
||||||
@ -29,8 +30,8 @@ var syncIterator = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
(async function () {
|
asyncTest(async function () {
|
||||||
for await (let _ of syncIterator);
|
for await (let _ of syncIterator);
|
||||||
|
|
||||||
assert.sameValue(nextArgumentsLength, 0);
|
assert.sameValue(nextArgumentsLength, 0);
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
@ -16,6 +16,7 @@ info: |
|
|||||||
[...]
|
[...]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [async-iteration]
|
features: [async-iteration]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var returnArgumentsLength;
|
var returnArgumentsLength;
|
||||||
@ -32,10 +33,10 @@ var syncIterator = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
(async function () {
|
asyncTest(async function () {
|
||||||
for await (let _ of syncIterator) {
|
for await (let _ of syncIterator) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert.sameValue(returnArgumentsLength, 0);
|
assert.sameValue(returnArgumentsLength, 0);
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
@ -24,6 +24,7 @@ info: |
|
|||||||
3. If func is either undefined or null, return undefined.
|
3. If func is either undefined or null, return undefined.
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [async-iteration]
|
features: [async-iteration]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var iterationCount = 0;
|
var iterationCount = 0;
|
||||||
@ -42,7 +43,7 @@ var syncIterator = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
(async function() {
|
asyncTest(async function() {
|
||||||
for await (let _ of syncIterator) {
|
for await (let _ of syncIterator) {
|
||||||
iterationCount += 1;
|
iterationCount += 1;
|
||||||
break;
|
break;
|
||||||
@ -50,4 +51,4 @@ var syncIterator = {
|
|||||||
|
|
||||||
assert.sameValue(iterationCount, 1);
|
assert.sameValue(iterationCount, 1);
|
||||||
assert.sameValue(returnGets, 1);
|
assert.sameValue(returnGets, 1);
|
||||||
}()).then($DONE, $DONE);
|
});
|
||||||
|
@ -27,6 +27,7 @@ info: >
|
|||||||
|
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [async-iteration]
|
features: [async-iteration]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var yieldorder = 0;
|
var yieldorder = 0;
|
||||||
@ -58,7 +59,7 @@ async function awaitnexts() {
|
|||||||
assert.sameValue((await item1).value, 1)
|
assert.sameValue((await item1).value, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
awaitnexts().then($DONE, $DONE);
|
asyncTest(awaitnexts);
|
||||||
|
|
||||||
// At this point:
|
// At this point:
|
||||||
// yieldorder == 0
|
// yieldorder == 0
|
||||||
|
@ -6,7 +6,7 @@ esid: sec-atomics.waitasync
|
|||||||
description: >
|
description: >
|
||||||
Test Atomics.waitAsync on arrays that allow atomic operations
|
Test Atomics.waitAsync on arrays that allow atomic operations
|
||||||
flags: [async]
|
flags: [async]
|
||||||
includes: [atomicsHelper.js]
|
includes: [atomicsHelper.js, asyncHelpers.js]
|
||||||
features: [Atomics.waitAsync, Atomics, BigInt]
|
features: [Atomics.waitAsync, Atomics, BigInt]
|
||||||
---*/
|
---*/
|
||||||
assert.sameValue(typeof Atomics.waitAsync, 'function', 'The value of `typeof Atomics.waitAsync` is "function"');
|
assert.sameValue(typeof Atomics.waitAsync, 'function', 'The value of `typeof Atomics.waitAsync` is "function"');
|
||||||
@ -44,7 +44,7 @@ $262.agent.start(`
|
|||||||
`);
|
`);
|
||||||
|
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
const outcomes = [];
|
const outcomes = [];
|
||||||
|
|
||||||
for (let i = 0; i < 3; i++) {
|
for (let i = 0; i < 3; i++) {
|
||||||
@ -67,4 +67,4 @@ $262.agent.start(`
|
|||||||
'C not-equal,not-equal,not-equal,not-equal,not-equal',
|
'C not-equal,not-equal,not-equal,not-equal,not-equal',
|
||||||
'The value of outcomes[2] is "C not-equal,not-equal,not-equal,not-equal,not-equal"'
|
'The value of outcomes[2] is "C not-equal,not-equal,not-equal,not-equal,not-equal"'
|
||||||
);
|
);
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
@ -6,7 +6,7 @@ esid: sec-atomics.waitasync
|
|||||||
description: >
|
description: >
|
||||||
Test Atomics.waitAsync on arrays that allow atomic operations
|
Test Atomics.waitAsync on arrays that allow atomic operations
|
||||||
flags: [async]
|
flags: [async]
|
||||||
includes: [atomicsHelper.js]
|
includes: [atomicsHelper.js, asyncHelpers.js]
|
||||||
features: [Atomics.waitAsync, Atomics]
|
features: [Atomics.waitAsync, Atomics]
|
||||||
---*/
|
---*/
|
||||||
assert.sameValue(typeof Atomics.waitAsync, 'function', 'The value of `typeof Atomics.waitAsync` is "function"');
|
assert.sameValue(typeof Atomics.waitAsync, 'function', 'The value of `typeof Atomics.waitAsync` is "function"');
|
||||||
@ -43,7 +43,7 @@ $262.agent.start(`
|
|||||||
`);
|
`);
|
||||||
|
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
const outcomes = [];
|
const outcomes = [];
|
||||||
|
|
||||||
for (let i = 0; i < 3; i++) {
|
for (let i = 0; i < 3; i++) {
|
||||||
@ -66,4 +66,4 @@ $262.agent.start(`
|
|||||||
'C not-equal,not-equal,not-equal,not-equal,not-equal',
|
'C not-equal,not-equal,not-equal,not-equal,not-equal',
|
||||||
'The value of outcomes[2] is "C not-equal,not-equal,not-equal,not-equal,not-equal"'
|
'The value of outcomes[2] is "C not-equal,not-equal,not-equal,not-equal,not-equal"'
|
||||||
);
|
);
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
@ -8,6 +8,7 @@ description: >
|
|||||||
Await can await any thenable. If the thenable's then is not callable,
|
Await can await any thenable. If the thenable's then is not callable,
|
||||||
await evaluates to the thenable
|
await evaluates to the thenable
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function foo() {
|
async function foo() {
|
||||||
@ -16,5 +17,5 @@ async function foo() {
|
|||||||
assert.sameValue(res, thenable);
|
assert.sameValue(res, thenable);
|
||||||
}
|
}
|
||||||
|
|
||||||
foo().then($DONE, $DONE);
|
asyncTest(foo);
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ esid: pending
|
|||||||
description: >
|
description: >
|
||||||
Await can await any thenable.
|
Await can await any thenable.
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var error = {};
|
var error = {};
|
||||||
@ -27,5 +28,5 @@ async function foo() {
|
|||||||
assert(caught);
|
assert(caught);
|
||||||
}
|
}
|
||||||
|
|
||||||
foo().then($DONE, $DONE);
|
asyncTest(foo);
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ esid: pending
|
|||||||
description: >
|
description: >
|
||||||
Await can await any thenable.
|
Await can await any thenable.
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var thenable = {
|
var thenable = {
|
||||||
@ -18,4 +19,4 @@ async function foo() {
|
|||||||
assert.sameValue(await thenable, 42);
|
assert.sameValue(await thenable, 42);
|
||||||
}
|
}
|
||||||
|
|
||||||
foo().then($DONE, $DONE);
|
asyncTest(foo);
|
||||||
|
@ -7,6 +7,7 @@ esid: pending
|
|||||||
description: >
|
description: >
|
||||||
Await throws errors from rejected promises
|
Await throws errors from rejected promises
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function foo() {
|
async function foo() {
|
||||||
@ -22,4 +23,4 @@ async function foo() {
|
|||||||
assert(caught);
|
assert(caught);
|
||||||
}
|
}
|
||||||
|
|
||||||
foo().then($DONE, $DONE);
|
asyncTest(foo);
|
||||||
|
@ -7,6 +7,7 @@ esid: pending
|
|||||||
description: >
|
description: >
|
||||||
Await's operand is a UnaryExpression
|
Await's operand is a UnaryExpression
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function foo() {
|
async function foo() {
|
||||||
@ -14,4 +15,4 @@ async function foo() {
|
|||||||
let y = await Promise.resolve(2) * x
|
let y = await Promise.resolve(2) * x
|
||||||
assert.sameValue(y, 4);
|
assert.sameValue(y, 4);
|
||||||
}
|
}
|
||||||
foo().then($DONE, $DONE);
|
asyncTest(foo);
|
||||||
|
@ -7,6 +7,7 @@ esid: pending
|
|||||||
description: >
|
description: >
|
||||||
Await's operand is a UnaryExpression
|
Await's operand is a UnaryExpression
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function foo() {
|
async function foo() {
|
||||||
@ -15,4 +16,4 @@ async function foo() {
|
|||||||
assert.sameValue(y, 1);
|
assert.sameValue(y, 1);
|
||||||
assert.sameValue(x, 2);
|
assert.sameValue(x, 2);
|
||||||
}
|
}
|
||||||
foo().then($DONE, $DONE);
|
asyncTest(foo);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
let x = './module-code';
|
let x = './module-code';
|
||||||
@ -37,4 +38,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = './module-code_FIXTURE.js';
|
const a = './module-code_FIXTURE.js';
|
||||||
@ -35,4 +36,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
Function.prototype.toString = () => './module-code_FIXTURE.js';
|
Function.prototype.toString = () => './module-code_FIXTURE.js';
|
||||||
@ -28,4 +29,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns.default, 42);
|
assert.sameValue(ns.default, 42);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = './module-code_FIXTURE.js';
|
const a = './module-code_FIXTURE.js';
|
||||||
@ -34,4 +35,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const await = './module-code_FIXTURE.js';
|
const await = './module-code_FIXTURE.js';
|
||||||
@ -30,4 +31,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns1.default, 42);
|
assert.sameValue(ns1.default, 42);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -25,6 +25,7 @@ info: |
|
|||||||
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]
|
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = () => () => './module-code_FIXTURE.js';
|
const a = () => () => './module-code_FIXTURE.js';
|
||||||
@ -42,4 +43,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -25,6 +25,7 @@ info: |
|
|||||||
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]
|
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = () => ['./module-code_FIXTURE.js', './module-code-other_FIXTURE.js'];
|
const a = () => ['./module-code_FIXTURE.js', './module-code-other_FIXTURE.js'];
|
||||||
@ -41,4 +42,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -25,6 +25,7 @@ info: |
|
|||||||
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]
|
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = () => ({
|
const a = () => ({
|
||||||
@ -44,4 +45,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -25,6 +25,7 @@ info: |
|
|||||||
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]
|
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = () => './module-code_FIXTURE.js';
|
const a = () => './module-code_FIXTURE.js';
|
||||||
@ -42,4 +43,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -20,6 +20,7 @@ info: |
|
|||||||
(Expression[+In, ?Yield, ?Await])
|
(Expression[+In, ?Yield, ?Await])
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function fn() {
|
async function fn() {
|
||||||
@ -34,4 +35,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = './module-code_FIXTURE.js';
|
const a = './module-code_FIXTURE.js';
|
||||||
@ -34,4 +35,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
let x = './module-code';
|
let x = './module-code';
|
||||||
@ -37,4 +38,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -18,6 +18,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async, noStrict]
|
flags: [async, noStrict]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const y = {
|
const y = {
|
||||||
@ -33,4 +34,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
let x = 'foo';
|
let x = 'foo';
|
||||||
@ -38,4 +39,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = './module-code_FIXTURE.js';
|
const a = './module-code_FIXTURE.js';
|
||||||
@ -35,4 +36,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = './module-code_FIXTURE.js';
|
const a = './module-code_FIXTURE.js';
|
||||||
@ -34,4 +35,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const obj = {
|
const obj = {
|
||||||
@ -38,4 +39,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import, new.target]
|
features: [dynamic-import, new.target]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function ctor() {
|
function ctor() {
|
||||||
@ -32,4 +33,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns.default, 42);
|
assert.sameValue(ns.default, 42);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = './module-code_FIXTURE.js';
|
const a = './module-code_FIXTURE.js';
|
||||||
@ -35,4 +36,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function tag(arg) {
|
function tag(arg) {
|
||||||
@ -31,4 +32,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns.default, 1612);
|
assert.sameValue(ns.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = './module-code_FIXTURE.js';
|
const a = './module-code_FIXTURE.js';
|
||||||
@ -34,4 +35,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = './module-code_FIXTURE.js';
|
const a = './module-code_FIXTURE.js';
|
||||||
@ -44,4 +45,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = './module-code_FIXTURE.js';
|
const a = './module-code_FIXTURE.js';
|
||||||
@ -44,4 +45,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns2.default, 1612);
|
assert.sameValue(ns2.default, 1612);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -17,6 +17,7 @@ info: |
|
|||||||
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
|
||||||
flags: [async, noStrict]
|
flags: [async, noStrict]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const yield = './module-code_FIXTURE.js';
|
const yield = './module-code_FIXTURE.js';
|
||||||
@ -28,4 +29,4 @@ async function fn() {
|
|||||||
assert.sameValue(ns1.default, 42);
|
assert.sameValue(ns1.default, 42);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE).catch($DONE);
|
asyncTest(fn);
|
||||||
|
@ -16,6 +16,7 @@ info: |
|
|||||||
f. Otherwise, perform ! Call(promiseCapability.[[Resolve]], undefined, « namespace.[[Value]] »).
|
f. Otherwise, perform ! Call(promiseCapability.[[Resolve]], undefined, « namespace.[[Value]] »).
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function fn() {
|
async function fn() {
|
||||||
@ -29,4 +30,4 @@ async function fn() {
|
|||||||
assert.sameValue(String(value), '42', 'namespace fallsback to valueOf as its prototype is null');
|
assert.sameValue(String(value), '42', 'namespace fallsback to valueOf as its prototype is null');
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE);
|
asyncTest(fn);
|
||||||
|
@ -16,6 +16,7 @@ info: |
|
|||||||
f. Otherwise, perform ! Call(promiseCapability.[[Resolve]], undefined, « namespace.[[Value]] »).
|
f. Otherwise, perform ! Call(promiseCapability.[[Resolve]], undefined, « namespace.[[Value]] »).
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import, async-iteration]
|
features: [dynamic-import, async-iteration]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function * agen1() {
|
async function * agen1() {
|
||||||
@ -66,4 +67,4 @@ async function fn() {
|
|||||||
assert.sameValue(error, 'foo', 'f');
|
assert.sameValue(error, 'foo', 'f');
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE);
|
asyncTest(fn);
|
||||||
|
@ -16,6 +16,7 @@ info: |
|
|||||||
f. Otherwise, perform ! Call(promiseCapability.[[Resolve]], undefined, « namespace.[[Value]] »).
|
f. Otherwise, perform ! Call(promiseCapability.[[Resolve]], undefined, « namespace.[[Value]] »).
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import, async-iteration]
|
features: [dynamic-import, async-iteration]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function * agen() {
|
async function * agen() {
|
||||||
@ -48,4 +49,4 @@ async function fn() {
|
|||||||
assert.sameValue(error, 'foo');
|
assert.sameValue(error, 'foo');
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE);
|
asyncTest(fn);
|
||||||
|
@ -29,4 +29,5 @@ async function fn() {
|
|||||||
assert.sameValue(imported.y, 1, 'updated value, indirect binding');
|
assert.sameValue(imported.y, 1, 'updated value, indirect binding');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not use asyncTest: when self imported, $DONE is not defined, asyncTest will throw
|
||||||
fn().then($DONE, $DONE);
|
fn().then($DONE, $DONE);
|
||||||
|
@ -16,6 +16,7 @@ info: |
|
|||||||
f. Otherwise, perform ! Call(promiseCapability.[[Resolve]], undefined, « namespace.[[Value]] »).
|
f. Otherwise, perform ! Call(promiseCapability.[[Resolve]], undefined, « namespace.[[Value]] »).
|
||||||
flags: [async]
|
flags: [async]
|
||||||
features: [dynamic-import]
|
features: [dynamic-import]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function fn() {
|
async function fn() {
|
||||||
@ -28,4 +29,4 @@ async function fn() {
|
|||||||
assert.sameValue(other.default, 42);
|
assert.sameValue(other.default, 42);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn().then($DONE, $DONE);
|
asyncTest(fn);
|
||||||
|
@ -15,6 +15,7 @@ info: |
|
|||||||
NewTarget
|
NewTarget
|
||||||
features: [new.target, async-functions]
|
features: [new.target, async-functions]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
(function() { assert.sameValue(delete (new.target), true); })();
|
(function() { assert.sameValue(delete (new.target), true); })();
|
||||||
@ -26,6 +27,6 @@ new function() { assert.sameValue(~new.target, -1); };
|
|||||||
(function() { assert.sameValue(!new.target, true); })();
|
(function() { assert.sameValue(!new.target, true); })();
|
||||||
new function() { assert.sameValue(delete void typeof +-~!(new.target), true); };
|
new function() { assert.sameValue(delete void typeof +-~!(new.target), true); };
|
||||||
|
|
||||||
(async function() {
|
asyncTest(async function() {
|
||||||
assert.sameValue(await new.target, undefined);
|
assert.sameValue(await new.target, undefined);
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
@ -9,6 +9,7 @@ info: |
|
|||||||
for await (LeftHandSideExpression of AssignmentExpression) Statement
|
for await (LeftHandSideExpression of AssignmentExpression) Statement
|
||||||
features: [optional-chaining]
|
features: [optional-chaining]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
const obj = {
|
const obj = {
|
||||||
iterable: {
|
iterable: {
|
||||||
@ -32,4 +33,4 @@ async function checkAssertions() {
|
|||||||
}
|
}
|
||||||
assert.sameValue(3, count);
|
assert.sameValue(3, count);
|
||||||
}
|
}
|
||||||
checkAssertions().then($DONE, $DONE);
|
asyncTest(checkAssertions);
|
||||||
|
@ -10,6 +10,7 @@ info: |
|
|||||||
MemberExpression [PrimaryExpression identifier] OptionalChain
|
MemberExpression [PrimaryExpression identifier] OptionalChain
|
||||||
features: [optional-chaining]
|
features: [optional-chaining]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const a = undefined;
|
const a = undefined;
|
||||||
@ -29,4 +30,4 @@ async function checkAssertions() {
|
|||||||
c.e = Promise.resolve(39);
|
c.e = Promise.resolve(39);
|
||||||
assert.sameValue(await c?.e, 39, 'await unwraps the promise given after the evaluation of the OCE');
|
assert.sameValue(await c?.e, 39, 'await unwraps the promise given after the evaluation of the OCE');
|
||||||
}
|
}
|
||||||
checkAssertions().then($DONE, $DONE);
|
asyncTest(checkAssertions);
|
||||||
|
@ -10,10 +10,11 @@ info: |
|
|||||||
MemberExpression [PrimaryExpression literal] OptionalChain
|
MemberExpression [PrimaryExpression literal] OptionalChain
|
||||||
features: [optional-chaining]
|
features: [optional-chaining]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function checkAssertions() {
|
async function checkAssertions() {
|
||||||
assert.sameValue(await "hello"?.[0], 'h');
|
assert.sameValue(await "hello"?.[0], 'h');
|
||||||
assert.sameValue(await null?.a, undefined);
|
assert.sameValue(await null?.a, undefined);
|
||||||
}
|
}
|
||||||
checkAssertions().then($DONE, $DONE);
|
asyncTest(checkAssertions);
|
||||||
|
@ -11,6 +11,7 @@ info: |
|
|||||||
OptionalChain OptionalChain ?.[Expression]
|
OptionalChain OptionalChain ?.[Expression]
|
||||||
features: [optional-chaining]
|
features: [optional-chaining]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function checkAssertions() {
|
async function checkAssertions() {
|
||||||
@ -25,4 +26,4 @@ async function checkAssertions() {
|
|||||||
await Promise.reject(new Error('unreachable'))
|
await Promise.reject(new Error('unreachable'))
|
||||||
], undefined);
|
], undefined);
|
||||||
}
|
}
|
||||||
checkAssertions().then($DONE, $DONE);
|
asyncTest(checkAssertions);
|
||||||
|
@ -11,6 +11,7 @@ info: |
|
|||||||
OptionalChain ?.[Expression]
|
OptionalChain ?.[Expression]
|
||||||
features: [optional-chaining]
|
features: [optional-chaining]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function checkAssertions() {
|
async function checkAssertions() {
|
||||||
@ -21,4 +22,4 @@ async function checkAssertions() {
|
|||||||
await Promise.reject(new Error('unreachable'))
|
await Promise.reject(new Error('unreachable'))
|
||||||
], undefined);
|
], undefined);
|
||||||
}
|
}
|
||||||
checkAssertions().then($DONE, $DONE);
|
asyncTest(checkAssertions);
|
||||||
|
@ -7,6 +7,7 @@ esid: pending
|
|||||||
description: >
|
description: >
|
||||||
The this value is set to the global object when not passed in sloppy mode.
|
The this value is set to the global object when not passed in sloppy mode.
|
||||||
flags: [noStrict, async]
|
flags: [noStrict, async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var glob = this;
|
var glob = this;
|
||||||
@ -14,4 +15,4 @@ async function foo() {
|
|||||||
assert.sameValue(this, glob);
|
assert.sameValue(this, glob);
|
||||||
}
|
}
|
||||||
|
|
||||||
foo().then($DONE, $DONE);
|
asyncTest(foo);
|
||||||
|
@ -21,6 +21,7 @@ info: |
|
|||||||
3. If func is either undefined or null, return undefined.
|
3. If func is either undefined or null, return undefined.
|
||||||
features: [Symbol.asyncIterator, async-iteration]
|
features: [Symbol.asyncIterator, async-iteration]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var iterationCount = 0;
|
var iterationCount = 0;
|
||||||
@ -39,7 +40,7 @@ iterable[Symbol.asyncIterator] = function() {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
(async function() {
|
asyncTest(async function() {
|
||||||
for await (var _ of iterable) {
|
for await (var _ of iterable) {
|
||||||
iterationCount += 1;
|
iterationCount += 1;
|
||||||
break;
|
break;
|
||||||
@ -47,4 +48,4 @@ iterable[Symbol.asyncIterator] = function() {
|
|||||||
|
|
||||||
assert.sameValue(iterationCount, 1);
|
assert.sameValue(iterationCount, 1);
|
||||||
assert.sameValue(returnGets, 1);
|
assert.sameValue(returnGets, 1);
|
||||||
}()).then($DONE, $DONE);
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user