test262/src/dynamic-import/eval-script-code-host-resolves-module-code.case
Leo Balter b0ec060e62 Add more cases for Dynamic Imports usage
- 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
2018-10-11 11:09:47 -04:00

19 lines
605 B
Plaintext

// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: import() from a ascript code can load a file with module code
template: default
---*/
//- setup
// This is still valid in script code, and should not be valid for module code
// https://tc39.github.io/ecma262/#sec-scripts-static-semantics-lexicallydeclarednames
var smoosh; function smoosh() {}
//- import
import('./module-code_FIXTURE.js')
//- body
assert.sameValue(imported.default, 42);
assert.sameValue(imported.x, 'Test262');
assert.sameValue(imported.z, 42);