mirror of
https://github.com/tc39/test262.git
synced 2025-12-06 05:19:45 +01:00
- 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
19 lines
605 B
Plaintext
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);
|