mirror of
https://github.com/tc39/test262.git
synced 2025-07-20 12:34:41 +02:00
Merge pull request #1831 from leobalter/1829-dyn-import-fixes
[dynamic import] Fix async test to verify completion
This commit is contained in:
commit
00cfe1628c
@ -24,4 +24,8 @@ features: [dynamic-import]
|
||||
flags: [async]
|
||||
---*/
|
||||
|
||||
if (true) import(/*{ params }*/);
|
||||
if (true) import(/*{ params }*/).then(imported => {
|
||||
|
||||
/*{ body }*/
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
|
@ -34,4 +34,9 @@ info: |
|
||||
|
||||
---*/
|
||||
|
||||
if (true) import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js');
|
||||
if (true) import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.default(), 1);
|
||||
assert.sameValue(imported.default, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
|
@ -35,4 +35,16 @@ info: |
|
||||
|
||||
---*/
|
||||
|
||||
if (true) import('./eval-gtbndng-indirect-update_FIXTURE.js');
|
||||
if (true) import('./eval-gtbndng-indirect-update_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an exported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
|
@ -22,4 +22,8 @@ info: |
|
||||
|
||||
---*/
|
||||
|
||||
if (true) import('./dynamic-import-module_FIXTURE.js');
|
||||
if (true) import('./dynamic-import-module_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user