-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Expand file tree
/
Copy pathtest-esm-loader-stringify-text.mjs
More file actions
66 lines (65 loc) · 1.39 KB
/
test-esm-loader-stringify-text.mjs
File metadata and controls
66 lines (65 loc) · 1.39 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Flags: --experimental-loader ./test/fixtures/es-module-loaders/string-sources.mjs
import { mustCall } from '../common/index.mjs';
import assert from 'assert';
assert.rejects(
import('test:Array'),
{ code: 'ERR_INVALID_RETURN_PROPERTY_VALUE' },
).then(mustCall());
import('test:ArrayBuffer').then(
mustCall(),
);
import('test:BigInt64Array').then(
mustCall(),
);
import('test:BigUint64Array').then(
mustCall(),
);
import('test:Float32Array').then(
mustCall(),
);
import('test:Float64Array').then(
mustCall(),
);
import('test:Int8Array').then(
mustCall(),
);
import('test:Int16Array').then(
mustCall(),
);
import('test:Int32Array').then(
mustCall(),
);
assert.rejects(
import('test:null'),
{ code: 'ERR_INVALID_RETURN_PROPERTY_VALUE' },
).then(mustCall());
assert.rejects(
import('test:Object'),
{ code: 'ERR_INVALID_RETURN_PROPERTY_VALUE' },
).then(mustCall());
import('test:SharedArrayBuffer').then(
mustCall(),
);
import('test:string').then(
mustCall(),
);
assert.rejects(
import('test:String'),
{ code: 'ERR_INVALID_RETURN_PROPERTY_VALUE' },
).then(mustCall());
import('test:Uint8ClampedArray').then(
mustCall(),
);
import('test:Uint16Array').then(
mustCall(),
);
import('test:Uint32Array').then(
mustCall(),
);
import('test:Uint8Array').then(
mustCall(),
);
assert.rejects(
import('test:undefined'),
{ code: 'ERR_INVALID_RETURN_PROPERTY_VALUE' },
).then(mustCall());