1import { strictEqual, deepEqual } from 'assert'; 2 3import m, { π } from './exports-cases.js'; 4import * as ns from './exports-cases.js'; 5 6deepEqual(Object.keys(ns), ['?invalid', 'default', 'invalid identifier', 'isObject', 'package', 'z', 'π', '\u{d83c}\u{df10}']); 7strictEqual(π, 'yes'); 8strictEqual(typeof m.isObject, 'undefined'); 9strictEqual(m.π, 'yes'); 10strictEqual(m.z, 'yes'); 11strictEqual(m.package, 10); 12strictEqual(m['invalid identifier'], 'yes'); 13strictEqual(m['?invalid'], 'yes'); 14 15import m2, { __esModule as __esModule2, name as name2 } from './exports-cases2.js'; 16import * as ns2 from './exports-cases2.js'; 17 18strictEqual(__esModule2, true); 19strictEqual(name2, 'name'); 20strictEqual(typeof m2, 'object'); 21strictEqual(m2.default, 'the default'); 22strictEqual(ns2.__esModule, true); 23strictEqual(ns2.name, 'name'); 24deepEqual(Object.keys(ns2), ['__esModule', 'case2', 'default', 'name', 'pi']); 25 26import m3, { __esModule as __esModule3, name as name3 } from './exports-cases3.js'; 27import * as ns3 from './exports-cases3.js'; 28 29strictEqual(__esModule3, true); 30strictEqual(name3, 'name'); 31deepEqual(Object.keys(m3), ['name', 'default', 'pi', 'case2']); 32strictEqual(ns3.__esModule, true); 33strictEqual(ns3.name, 'name'); 34strictEqual(ns3.case2, 'case2'); 35 36console.log('ok'); 37