test262/src/async-functions/returns-async-arrow-returns-arguments-from-parent-function.case
2020-10-05 10:53:43 -04:00

31 lines
708 B
Plaintext

// Copyright (C) 2020 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-async-arrow-function-definitions
desc: >
Async function returns an async function.
templates:
- evaluation/async-class-*.template
- evaluation/async-declaration.template
- evaluation/async-expression-*.template
- evaluation/async-obj-method.template
flags: [async]
---*/
//- setup
let count = 0;
//- params
x
//- body
let a = arguments;
return async () => a === arguments;
//- teardown
asyncFn().then(retFn => {
count++;
return retFn();
}).then(result => {
assert.sameValue(result, true);
assert.sameValue(count, 1);
}).then($DONE, $DONE);