-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.mjs
32 lines (26 loc) · 1.04 KB
/
test.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { test } from 'node:test';
import assert from 'node:assert';
test('Import WeakerMap from index.mjs', async () => {
const { WeakerMap } = await import("./index.mjs");
assert.ok(WeakerMap.name === 'WeakerMap');
});
test('Import WeakerMap from specific file', async () => {
const { WeakerMap } = await import("./WeakerMap.mjs");
assert.ok(WeakerMap.name === 'WeakerMap');
});
test('Import WeakerSet from index.mjs', async () => {
const { WeakerSet } = await import("./WeakerSet.mjs");
assert.ok(WeakerSet.name === 'WeakerSet');
});
test('Import WeakerSet from specific file', async () => {
const { WeakerSet } = await import("./WeakerSet.mjs");
assert.ok(WeakerSet.name === 'WeakerSet');
});
test('Import WeakerMap from node_modules', async () => {
const { WeakerMap } = await import("weakermap/WeakerMap.mjs");
assert.ok(WeakerMap.name === 'WeakerMap');
});
test('Import WeakerSet from node_modules, specific file', async () => {
const { WeakerSet } = await import("weakerset/WeakerSet.mjs");
assert.ok(WeakerSet.name === 'WeakerSet');
});