* AsyncFunction: Add tests ensuring the new 1-tick await behaviour
This commit adds 3 tests ensuring the optimized behaviour of await
(see https://github.com/tc39/ecma262/pull/1250) in the following cases:
- async functions
- yielding from async generator functions
- for-await-of loops
* AsyncFunction: Add tests ensuring the monkey-patched promises behaviour
This commit adds 2 more tests ensuring the optimized behaviour of await
(see tc39/ecma262#1250) in the following cases:
- awaiting on a native promise with monkey-patched "then"
- awaiting on a non-native promise (a "thenable" object)
* AsyncFunction: Add tests ensuring the non-native promises behaviour
This commit adds 1 more tests ensuring the optimized behaviour of await
(see tc39/ecma262#1250) in the following cases:
- awaiting on a non-promise, non-thenable object
It also renames the previous test for non-promise (a "thenable" object)
to distinguish from the new case.
The commit adds checks for proper await/promises interleaving in the
aforementioned cases and includes a small code clean-up.
* AsyncFunction: Refactor tests ensuring the new 1-tick await behaviour
Gather all the tests to their appropriate folder and update copyright header.
The tests for the parsing of compound assignment expressions were
expressed using eval. This made the tests more complex than necessary
and also prevented the tests from providing value to ECMAScript parsers.
Remove the use of eval and instead express the expectations with
literal source text.
- Add cases for mixing module and script code
- Rename test case from return promise to thenable
- Fix script code case with valid loaded fixture
- Add a test to assert a promise return
- Add case for specifier toString rejection
- Add case for specifier toString
- Test Assignment expression abrupt completion
- Test Promise return