@@ -38,124 +38,124 @@ test([1, 2, 3], `
3838┌─────────┬────────┐
3939│ (index) │ Values │
4040├─────────┼────────┤
41- │ 0 │ 1 │
42- │ 1 │ 2 │
43- │ 2 │ 3 │
41+ │ 0 │ 1 │
42+ │ 1 │ 2 │
43+ │ 2 │ 3 │
4444└─────────┴────────┘
4545` ) ;
4646
4747test ( [ Symbol ( ) , 5 , [ 10 ] ] , `
4848┌─────────┬────┬──────────┐
49- │ (index) │ 0 │ Values │
49+ │ (index) │ 0 │ Values │
5050├─────────┼────┼──────────┤
51- │ 0 │ │ Symbol() │
52- │ 1 │ │ 5 │
53- │ 2 │ 10 │ │
51+ │ 0 │ │ Symbol() │
52+ │ 1 │ │ 5 │
53+ │ 2 │ 10 │ │
5454└─────────┴────┴──────────┘
5555` ) ;
5656
5757test ( [ null , 5 ] , `
5858┌─────────┬────────┐
5959│ (index) │ Values │
6060├─────────┼────────┤
61- │ 0 │ null │
62- │ 1 │ 5 │
61+ │ 0 │ null │
62+ │ 1 │ 5 │
6363└─────────┴────────┘
6464` ) ;
6565
6666test ( [ undefined , 5 ] , `
6767┌─────────┬───────────┐
68- │ (index) │ Values │
68+ │ (index) │ Values │
6969├─────────┼───────────┤
70- │ 0 │ undefined │
71- │ 1 │ 5 │
70+ │ 0 │ undefined │
71+ │ 1 │ 5 │
7272└─────────┴───────────┘
7373` ) ;
7474
7575test ( { a : 1 , b : Symbol ( ) , c : [ 10 ] } , `
7676┌─────────┬────┬──────────┐
77- │ (index) │ 0 │ Values │
77+ │ (index) │ 0 │ Values │
7878├─────────┼────┼──────────┤
79- │ a │ │ 1 │
80- │ b │ │ Symbol() │
81- │ c │ 10 │ │
79+ │ a │ │ 1 │
80+ │ b │ │ Symbol() │
81+ │ c │ 10 │ │
8282└─────────┴────┴──────────┘
8383` ) ;
8484
8585test ( new Map ( [ [ 'a' , 1 ] , [ Symbol ( ) , [ 2 ] ] ] ) , `
8686┌───────────────────┬──────────┬────────┐
87- │ (iteration index) │ Key │ Values │
87+ │ (iteration index) │ Key │ Values │
8888├───────────────────┼──────────┼────────┤
89- │ 0 │ 'a' │ 1 │
90- │ 1 │ Symbol() │ [ 2 ] │
89+ │ 0 │ 'a' │ 1 │
90+ │ 1 │ Symbol() │ [ 2 ] │
9191└───────────────────┴──────────┴────────┘
9292` ) ;
9393
9494test ( new Set ( [ 1 , 2 , Symbol ( ) ] ) , `
9595┌───────────────────┬──────────┐
96- │ (iteration index) │ Values │
96+ │ (iteration index) │ Values │
9797├───────────────────┼──────────┤
98- │ 0 │ 1 │
99- │ 1 │ 2 │
100- │ 2 │ Symbol() │
98+ │ 0 │ 1 │
99+ │ 1 │ 2 │
100+ │ 2 │ Symbol() │
101101└───────────────────┴──────────┘
102102` ) ;
103103
104104test ( { a : 1 , b : 2 } , [ 'a' ] , `
105105┌─────────┬───┐
106106│ (index) │ a │
107107├─────────┼───┤
108- │ a │ │
109- │ b │ │
108+ │ a │ │
109+ │ b │ │
110110└─────────┴───┘
111111` ) ;
112112
113113test ( [ { a : 1 , b : 2 } , { a : 3 , c : 4 } ] , [ 'a' ] , `
114114┌─────────┬───┐
115115│ (index) │ a │
116116├─────────┼───┤
117- │ 0 │ 1 │
118- │ 1 │ 3 │
117+ │ 0 │ 1 │
118+ │ 1 │ 3 │
119119└─────────┴───┘
120120` ) ;
121121
122122test ( new Map ( [ [ 1 , 1 ] , [ 2 , 2 ] , [ 3 , 3 ] ] ) . entries ( ) , `
123123┌───────────────────┬─────┬────────┐
124124│ (iteration index) │ Key │ Values │
125125├───────────────────┼─────┼────────┤
126- │ 0 │ 1 │ 1 │
127- │ 1 │ 2 │ 2 │
128- │ 2 │ 3 │ 3 │
126+ │ 0 │ 1 │ 1 │
127+ │ 1 │ 2 │ 2 │
128+ │ 2 │ 3 │ 3 │
129129└───────────────────┴─────┴────────┘
130130` ) ;
131131
132132test ( new Map ( [ [ 1 , 1 ] , [ 2 , 2 ] , [ 3 , 3 ] ] ) . values ( ) , `
133133┌───────────────────┬────────┐
134134│ (iteration index) │ Values │
135135├───────────────────┼────────┤
136- │ 0 │ 1 │
137- │ 1 │ 2 │
138- │ 2 │ 3 │
136+ │ 0 │ 1 │
137+ │ 1 │ 2 │
138+ │ 2 │ 3 │
139139└───────────────────┴────────┘
140140` ) ;
141141
142142test ( new Map ( [ [ 1 , 1 ] , [ 2 , 2 ] , [ 3 , 3 ] ] ) . keys ( ) , `
143143┌───────────────────┬────────┐
144144│ (iteration index) │ Values │
145145├───────────────────┼────────┤
146- │ 0 │ 1 │
147- │ 1 │ 2 │
148- │ 2 │ 3 │
146+ │ 0 │ 1 │
147+ │ 1 │ 2 │
148+ │ 2 │ 3 │
149149└───────────────────┴────────┘
150150` ) ;
151151
152152test ( new Set ( [ 1 , 2 , 3 ] ) . values ( ) , `
153153┌───────────────────┬────────┐
154154│ (iteration index) │ Values │
155155├───────────────────┼────────┤
156- │ 0 │ 1 │
157- │ 1 │ 2 │
158- │ 2 │ 3 │
156+ │ 0 │ 1 │
157+ │ 1 │ 2 │
158+ │ 2 │ 3 │
159159└───────────────────┴────────┘
160160` ) ;
161161
@@ -164,61 +164,61 @@ test({ a: { a: 1, b: 2, c: 3 } }, `
164164┌─────────┬───┬───┬───┐
165165│ (index) │ a │ b │ c │
166166├─────────┼───┼───┼───┤
167- │ a │ 1 │ 2 │ 3 │
167+ │ a │ 1 │ 2 │ 3 │
168168└─────────┴───┴───┴───┘
169169` ) ;
170170
171171test ( { a : { a : { a : 1 , b : 2 , c : 3 } } } , `
172172┌─────────┬──────────┐
173- │ (index) │ a │
173+ │ (index) │ a │
174174├─────────┼──────────┤
175- │ a │ [Object] │
175+ │ a │ [Object] │
176176└─────────┴──────────┘
177177` ) ;
178178
179179test ( { a : [ 1 , 2 ] } , `
180180┌─────────┬───┬───┐
181181│ (index) │ 0 │ 1 │
182182├─────────┼───┼───┤
183- │ a │ 1 │ 2 │
183+ │ a │ 1 │ 2 │
184184└─────────┴───┴───┘
185185` ) ;
186186
187187test ( { a : [ 1 , 2 , 3 , 4 , 5 ] , b : 5 , c : { e : 5 } } , `
188188┌─────────┬───┬───┬───┬───┬───┬───┬────────┐
189189│ (index) │ 0 │ 1 │ 2 │ 3 │ 4 │ e │ Values │
190190├─────────┼───┼───┼───┼───┼───┼───┼────────┤
191- │ a │ 1 │ 2 │ 3 │ 4 │ 5 │ │ │
192- │ b │ │ │ │ │ │ │ 5 │
193- │ c │ │ │ │ │ │ 5 │ │
191+ │ a │ 1 │ 2 │ 3 │ 4 │ 5 │ │ │
192+ │ b │ │ │ │ │ │ │ 5 │
193+ │ c │ │ │ │ │ │ 5 │ │
194194└─────────┴───┴───┴───┴───┴───┴───┴────────┘
195195` ) ;
196196
197197test ( new Uint8Array ( [ 1 , 2 , 3 ] ) , `
198198┌─────────┬────────┐
199199│ (index) │ Values │
200200├─────────┼────────┤
201- │ 0 │ 1 │
202- │ 1 │ 2 │
203- │ 2 │ 3 │
201+ │ 0 │ 1 │
202+ │ 1 │ 2 │
203+ │ 2 │ 3 │
204204└─────────┴────────┘
205205` ) ;
206206
207207test ( Buffer . from ( [ 1 , 2 , 3 ] ) , `
208208┌─────────┬────────┐
209209│ (index) │ Values │
210210├─────────┼────────┤
211- │ 0 │ 1 │
212- │ 1 │ 2 │
213- │ 2 │ 3 │
211+ │ 0 │ 1 │
212+ │ 1 │ 2 │
213+ │ 2 │ 3 │
214214└─────────┴────────┘
215215` ) ;
216216
217217test ( { a : undefined } , [ 'x' ] , `
218218┌─────────┬───┐
219219│ (index) │ x │
220220├─────────┼───┤
221- │ a │ │
221+ │ a │ │
222222└─────────┴───┘
223223` ) ;
224224
@@ -238,23 +238,23 @@ test(new Map(), `
238238
239239test ( [ { a : 1 , b : 'Y' } , { a : 'Z' , b : 2 } ] , `
240240┌─────────┬─────┬─────┐
241- │ (index) │ a │ b │
241+ │ (index) │ a │ b │
242242├─────────┼─────┼─────┤
243- │ 0 │ 1 │ 'Y' │
244- │ 1 │ 'Z' │ 2 │
243+ │ 0 │ 1 │ 'Y' │
244+ │ 1 │ 'Z' │ 2 │
245245└─────────┴─────┴─────┘
246246` ) ;
247247
248248{
249249 const line = '─' . repeat ( 79 ) ;
250- const header = `${ ' ' . repeat ( 37 ) } name${ ' ' . repeat ( 40 ) } ` ;
250+ const header = `name${ ' ' . repeat ( 77 ) } ` ;
251251 const name = 'very long long long long long long long long long long long ' +
252252 'long long long long' ;
253253 test ( [ { name } ] , `
254254┌─────────┬──${ line } ──┐
255- │ (index) │ ${ header } │
255+ │ (index) │ ${ header } │
256256├─────────┼──${ line } ──┤
257- │ 0 │ '${ name } ' │
257+ │ 0 │ '${ name } ' │
258258└─────────┴──${ line } ──┘
259259` ) ;
260260}
@@ -263,17 +263,17 @@ test({ foo: '¥', bar: '¥' }, `
263263┌─────────┬────────┐
264264│ (index) │ Values │
265265├─────────┼────────┤
266- │ foo │ '¥' │
267- │ bar │ '¥' │
266+ │ foo │ '¥' │
267+ │ bar │ '¥' │
268268└─────────┴────────┘
269269` ) ;
270270
271271test ( { foo : '你好' , bar : 'hello' } , `
272272┌─────────┬─────────┐
273273│ (index) │ Values │
274274├─────────┼─────────┤
275- │ foo │ '你好' │
276- │ bar │ 'hello' │
275+ │ foo │ '你好' │
276+ │ bar │ 'hello' │
277277└─────────┴─────────┘
278278` ) ;
279279
@@ -285,8 +285,8 @@ test([{ foo: 10 }, { foo: 20 }], ['__proto__'], `
285285┌─────────┬───────────┐
286286│ (index) │ __proto__ │
287287├─────────┼───────────┤
288- │ 0 │ │
289- │ 1 │ │
288+ │ 0 │ │
289+ │ 1 │ │
290290└─────────┴───────────┘
291291` ) ;
292292assert . strictEqual ( '0' in Object . prototype , false ) ;
0 commit comments