/
babel-runtime-corejs3.js
69 lines (68 loc) 路 1.77 KB
/
babel-runtime-corejs3.js
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
67
68
69
import assert from "assert";
export default {
title: "@babel/runtime-corejs3",
testcases: [
[
"it should throw on unknown helpers",
() =>
assert.rejects(
async () =>
import("@babel/runtime-corejs3/helpers/esm/unknown-helper"),
{
name: "Error",
code: "ERR_PACKAGE_PATH_NOT_EXPORTED",
}
),
],
[
"it should not throw on helpers importing internal helpers",
() =>
assert.doesNotReject(
async () =>
import("@babel/runtime-corejs3/helpers/esm/wrapNativeSuper"),
Error
),
],
/*[
"it supports importing with explicit extension",
() =>
assert.doesNotReject(
async () => import("@babel/runtime/helpers/esm/wrapNativeSuper.js"),
Error
),
],*/
[
"it should not throw on importing core-js helpers",
() =>
assert.doesNotReject(
async () => import("@babel/runtime-corejs3/core-js/array/is-array"),
Error
),
],
/*[
"it should not throw on importing core-js helpers with explicit extension",
() =>
assert.doesNotReject(
async () =>
import("@babel/runtime-corejs3/core-js/array/is-array.js"),
Error
),
],*/
[
"it should not throw on importing regenerator helpers",
() =>
assert.doesNotReject(
async () => import("@babel/runtime-corejs3/regenerator"),
Error
),
],
[
"it should not throw on importing regenerator helpers with explicit extension",
() =>
assert.doesNotReject(
async () => import("@babel/runtime-corejs3/regenerator/index.js"),
Error
),
],
],
};