OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // MODULE |
| 6 |
| 7 export function foo() { return 42 } |
| 8 assertEquals(42, foo()); |
| 9 foo = 1; |
| 10 assertEquals(1, foo); |
| 11 |
| 12 let gaga = 43; |
| 13 export {gaga as gugu}; |
| 14 assertEquals(43, gaga); |
| 15 |
| 16 export default (function bar() { return 43 }) |
| 17 assertThrows(() => bar(), ReferenceError); |
| 18 assertThrows("default", SyntaxError); |
| 19 assertThrows("*default*", SyntaxError); |
| 20 |
| 21 |
| 22 var shit = 44; |
| 23 var shiit = 45; |
| 24 export {shit}; |
| 25 export {shit as shiit}; |
| 26 export {shit as shiiit}; |
| 27 assertEquals(44, shit); |
| 28 assertEquals(45, shiit); |
| 29 shit = 46; |
| 30 assertEquals(46, shit); |
| 31 assertEquals(45, shiit); |
OLD | NEW |