-
Notifications
You must be signed in to change notification settings - Fork 119
/
api.test.ts.snap
166 lines (159 loc) · 3.66 KB
/
api.test.ts.snap
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
exports['api explore should accept buffer with inline map 1'] = {
"bundles": [
{
"bundleName": "Buffer",
"totalBytes": 2988,
"unmappedBytes": 2309,
"files": {
"node_modules/browser-pack/_prelude.js": 478,
"dist/bar.js": 104,
"dist/foo.js": 97,
"<unmapped>": 2309
}
}
],
"errors": [
{
"bundleName": "Buffer",
"isWarning": true,
"code": "UnmappedBytes",
"message": "Unable to map 2309/2988 bytes (77.28%)"
}
]
}
exports['api explore should accept buffers with js and map 1'] = {
"bundles": [
{
"bundleName": "Buffer",
"totalBytes": 715,
"unmappedBytes": 36,
"files": {
"node_modules/browser-pack/_prelude.js": 478,
"dist/bar.js": 104,
"dist/foo.js": 97,
"<unmapped>": 36
}
}
],
"errors": [
{
"bundleName": "Buffer",
"isWarning": true,
"code": "UnmappedBytes",
"message": "Unable to map 36/715 bytes (5.03%)"
}
]
}
exports['api explore should generate data respecting onlyMapped and replace options 1'] = {
"bundles": [
{
"bundleName": "data/foo.min.js",
"totalBytes": 715,
"unmappedBytes": 36,
"files": {
"node_modules/browser-pack/_prelude.js": 478,
"hello/bar.js": 104,
"hello/foo.js": 97
}
}
],
"errors": []
}
exports['api explore should generate data when provided with file with referenced map 1'] = {
"bundles": [
{
"bundleName": "data/foo.min.js",
"totalBytes": 715,
"unmappedBytes": 36,
"files": {
"node_modules/browser-pack/_prelude.js": 478,
"dist/bar.js": 104,
"dist/foo.js": 97,
"<unmapped>": 36
}
}
],
"errors": [
{
"bundleName": "data/foo.min.js",
"isWarning": true,
"code": "UnmappedBytes",
"message": "Unable to map 36/715 bytes (5.03%)"
}
]
}
exports['api explore should generate data when provided with file with separated map file 1'] = {
"bundles": [
{
"bundleName": "data/no-map.js",
"totalBytes": 680,
"unmappedBytes": 1,
"files": {
"node_modules/browser-pack/_prelude.js": 478,
"dist/bar.js": 104,
"dist/foo.js": 97,
"<unmapped>": 1
}
}
],
"errors": [
{
"bundleName": "data/no-map.js",
"isWarning": true,
"code": "UnmappedBytes",
"message": "Unable to map 1/680 bytes (0.15%)"
}
]
}
exports['api explore should generate data when provided with js file with inline map 1'] = {
"bundles": [
{
"bundleName": "data/inline-map.js",
"totalBytes": 2988,
"unmappedBytes": 2309,
"files": {
"node_modules/browser-pack/_prelude.js": 478,
"dist/bar.js": 104,
"dist/foo.js": 97,
"<unmapped>": 2309
}
}
],
"errors": [
{
"bundleName": "data/inline-map.js",
"isWarning": true,
"code": "UnmappedBytes",
"message": "Unable to map 2309/2988 bytes (77.28%)"
}
]
}
exports['api explore when output format specified should generate JSON 1'] = `
{
"results": [
{
"bundleName": "data/foo.min.js",
"totalBytes": 715,
"unmappedBytes": 36,
"files": {
"node_modules/browser-pack/_prelude.js": 478,
"dist/bar.js": 104,
"dist/foo.js": 97,
"<unmapped>": 36
}
}
]
}
`
exports['api explore when output format specified should generate TSV 1'] = `
Source\tSize\r
node_modules/browser-pack/_prelude.js\t478\r
dist/bar.js\t104\r
dist/foo.js\t97\r
<unmapped>\t36\r
\r
<unmapped>\t2309\r
node_modules/browser-pack/_prelude.js\t478\r
dist/bar.js\t104\r
dist/foo.js\t97
`