ohctechv3/.svn/pristine/c2/c2d240a863810b8676a012b4dd47e6ffc630a320.svn-base
2024-10-28 15:03:36 +05:30

26 lines
876 B
Plaintext

import getPrototypeOf from 'reflect.getprototypeof';
import * as Module from 'reflect.getprototypeof';
import test from 'tape';
import runTests from './tests.js';
test('as a function', (t) => {
runTests(getPrototypeOf, t);
t.end();
});
test('named exports', async (t) => {
t.deepEqual(
Object.keys(Module).sort(),
['default', 'shim', 'getPolyfill', 'implementation'].sort(),
'has expected named exports',
);
const { shim, getPolyfill, implementation } = Module;
t.equal((await import('reflect.getprototypeof/shim')).default, shim, 'shim named export matches deep export');
t.equal((await import('reflect.getprototypeof/implementation')).default, implementation, 'implementation named export matches deep export');
t.equal((await import('reflect.getprototypeof/polyfill')).default, getPolyfill, 'getPolyfill named export matches deep export');
t.end();
});