duplicated-imports-2.html (740B)
1 <!DOCTYPE html> 2 <title>Importing a module multiple times with the different specifier</title> 3 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script> 7 window.log = []; 8 </script> 9 <script type="module"> 10 import { foo } from './export-something.js'; 11 import { set_foo } from '../module/export-something.js'; 12 import default1 from './export-default.js'; 13 import default2 from '../module/export-default.js'; 14 15 test(() => { 16 assert_array_equals(log, ['export-something', 'export-default']); 17 assert_equals(foo, 42); 18 set_foo(43); 19 assert_equals(foo, 43); 20 assert_equals(default1, "fox"); 21 assert_equals(default2, "fox"); 22 }, 'Duplicated imports with the different specifier'); 23 </script>