@@ -87,7 +87,7 @@ tape( 'the method serializes a tuple as a locale-specific string (default locale
87
87
Point = namedtypetuple ( [ 'price' , 'quantity' ] ) ;
88
88
p = new Point ( [ 123456.789 , 9876 ] ) ;
89
89
90
- expected = [ ( 123456.789 ) . toLocaleString ( ) , ( 9876 ) . toLocaleString ( ) ] . join ( ',' ) ;
90
+ expected = 'tuple(price=' + ( 123456.789 ) . toLocaleString ( ) + ', quantity=' + ( 9876 ) . toLocaleString ( ) + ')' ;
91
91
actual = p . toLocaleString ( ) ;
92
92
93
93
t . strictEqual ( actual , expected , 'returns expected string' ) ;
@@ -103,7 +103,7 @@ tape( 'the method serializes a tuple as a locale-specific string (specified loca
103
103
Point = namedtypetuple ( [ 'price' , 'quantity' ] ) ;
104
104
p = new Point ( [ 123456.789 , 9876 ] ) ;
105
105
106
- expected = [ ' 123.456,789' , ' 9.876' ] . join ( ',' ) ;
106
+ expected = 'tuple(price= 123.456,789, quantity= 9.876)' ;
107
107
actual = p . toLocaleString ( 'de-DE' ) ;
108
108
109
109
t . strictEqual ( actual , expected , 'returns expected string for German locale' ) ;
@@ -124,7 +124,7 @@ tape( 'the method serializes a tuple as a locale-specific string (locale and opt
124
124
'currency' : 'USD'
125
125
} ;
126
126
127
- expected = [ ( 1234.56 ) . toLocaleString ( 'en-US' , opts ) , ( 50 ) . toLocaleString ( 'en-US' , opts ) ] . join ( ',' ) ;
127
+ expected = 'tuple(price=' + ( 1234.56 ) . toLocaleString ( 'en-US' , opts ) + ', quantity=' + ( 50 ) . toLocaleString ( 'en-US' , opts ) + ')' ;
128
128
actual = p . toLocaleString ( 'en-US' , opts ) ;
129
129
130
130
t . strictEqual ( actual , expected , 'returns expected string for currency format' ) ;
@@ -140,7 +140,7 @@ tape( 'the method handles null and undefined values using String()', function te
140
140
Data = namedtypetuple ( [ 'value' , 'notes' , 'status' ] ) ;
141
141
d = new Data ( [ 1000 , null , void 0 ] ) ;
142
142
143
- expected = [ ( 1000 ) . toLocaleString ( ) , '0' , 'NaN' ] . join ( ',' ) ;
143
+ expected = 'tuple(value=' + ( 1000 ) . toLocaleString ( ) + ', notes=0, status=NaN)' ;
144
144
actual = d . toLocaleString ( ) ;
145
145
146
146
t . strictEqual ( actual , expected , 'returns expected string with null and undefined' ) ;
@@ -158,7 +158,7 @@ tape( 'the method serializes a tuple containing a Date object', function test( t
158
158
date = new Date ( '2025-09-02T18:30:00.000Z' ) ;
159
159
e = new Event ( [ 123 , date ] ) ;
160
160
161
- expected = [ ( 123 ) . toLocaleString ( ) , date . getTime ( ) . toLocaleString ( ) ] . join ( ',' ) ;
161
+ expected = 'tuple(id=' + ( 123 ) . toLocaleString ( ) + ', timestamp=' + date . getTime ( ) . toLocaleString ( ) + ')' ;
162
162
actual = e . toLocaleString ( ) ;
163
163
164
164
t . strictEqual ( actual , expected , 'calls toLocaleString on the Date object' ) ;
@@ -174,7 +174,7 @@ tape( 'the method handles boolean and NaN values', function test( t ) {
174
174
Record = namedtypetuple ( [ 'isValid' , 'value' ] ) ;
175
175
r = new Record ( [ true , NaN ] ) ;
176
176
177
- expected = [ '1' , ' NaN' ] . join ( ',' ) ;
177
+ expected = 'tuple(isValid=1, value= NaN)' ;
178
178
actual = r . toLocaleString ( ) ;
179
179
180
180
t . strictEqual ( actual , expected , 'handles boolean and NaN values' ) ;
@@ -196,7 +196,7 @@ tape( 'the method serializes a tuple containing an object with a custom toLocale
196
196
} ;
197
197
c = new Custom ( [ customObject ] ) ;
198
198
199
- expected = 'NaN' ;
199
+ expected = 'tuple(item= NaN) ' ;
200
200
actual = c . toLocaleString ( ) ;
201
201
202
202
t . strictEqual ( actual , expected , 'uses the custom toLocaleString method from the object' ) ;
0 commit comments