Skip to content
Snippets Groups Projects
Unverified Commit 00cfe162 authored by Leo Balter's avatar Leo Balter Committed by GitHub
Browse files

Merge pull request #1831 from leobalter/1829-dyn-import-fixes

[dynamic import] Fix async test to verify completion
parents 140d922d 18f12255
No related branches found
No related tags found
No related merge requests found
...@@ -24,4 +24,8 @@ features: [dynamic-import] ...@@ -24,4 +24,8 @@ features: [dynamic-import]
flags: [async] flags: [async]
---*/ ---*/
if (true) import(/*{ params }*/); if (true) import(/*{ params }*/).then(imported => {
/*{ body }*/
}).then($DONE, $DONE).catch($DONE);
...@@ -34,4 +34,9 @@ info: | ...@@ -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: | ...@@ -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: | ...@@ -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);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment