Skip to content

Commit 272428a

Browse files
authored
test: rename variable and update test messages
Signed-off-by: Athan <[email protected]>
1 parent dbce613 commit 272428a

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

lib/node_modules/@stdlib/dstructs/named-typed-tuple/test/test.to_locale_string.js

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
var tape = require( 'tape' );
2424
var hasProp = require( '@stdlib/assert/has-property' );
2525
var isFunction = require( '@stdlib/assert/is-function' );
26-
var namedtypetuple = require( './../lib' );
26+
var namedtypedtuple = require( './../lib' );
2727

2828

2929
// TESTS //
3030

3131
tape( 'main export is a function', function test( t ) {
3232
t.ok( true, __filename );
33-
t.strictEqual( typeof namedtypetuple, 'function', 'main export is a function' );
33+
t.strictEqual( typeof namedtypedtuple, 'function', 'main export is a function' );
3434
t.end();
3535
});
3636

@@ -40,7 +40,7 @@ tape( 'the method throws an error if invoked with a `this` context which is not
4040
var p;
4141
var i;
4242

43-
Point = namedtypetuple( [ 'x', 'y' ] );
43+
Point = namedtypedtuple( [ 'x', 'y' ] );
4444
p = new Point();
4545

4646
values = [
@@ -70,11 +70,11 @@ tape( 'a tuple has a `toLocaleString` method', function test( t ) {
7070
var Point;
7171
var p;
7272

73-
Point = namedtypetuple( [ 'x', 'y' ] );
73+
Point = namedtypedtuple( [ 'x', 'y' ] );
7474
p = new Point();
7575

76-
t.strictEqual( hasProp( p, 'toLocaleString' ), true, 'has property' );
77-
t.strictEqual( isFunction( p.toLocaleString ), true, 'is a function' );
76+
t.strictEqual( hasProp( p, 'toLocaleString' ), true, 'returns expected value' );
77+
t.strictEqual( isFunction( p.toLocaleString ), true, 'returns expected value' );
7878
t.end();
7979
});
8080

@@ -84,13 +84,13 @@ tape( 'the method serializes a tuple as a locale-specific string (default locale
8484
var Point;
8585
var p;
8686

87-
Point = namedtypetuple( [ 'price', 'quantity' ] );
87+
Point = namedtypedtuple( [ 'price', 'quantity' ] );
8888
p = new Point( [ 123456.789, 9876 ] );
8989

9090
expected = 'tuple(price=' + (123456.789).toLocaleString() + ', quantity=' + (9876).toLocaleString() + ')';
9191
actual = p.toLocaleString();
9292

93-
t.strictEqual( actual, expected, 'returns expected string' );
93+
t.strictEqual( actual, expected, 'returns expected value' );
9494
t.end();
9595
});
9696

@@ -100,13 +100,13 @@ tape( 'the method serializes a tuple as a locale-specific string (specified loca
100100
var Point;
101101
var p;
102102

103-
Point = namedtypetuple( [ 'price', 'quantity' ] );
103+
Point = namedtypedtuple( [ 'price', 'quantity' ] );
104104
p = new Point( [ 123456.789, 9876 ] );
105105

106106
expected = 'tuple(price=123.456,789, quantity=9.876)';
107107
actual = p.toLocaleString( 'de-DE' );
108108

109-
t.strictEqual( actual, expected, 'returns expected string for German locale' );
109+
t.strictEqual( actual, expected, 'returns expected value' );
110110
t.end();
111111
});
112112

@@ -117,7 +117,7 @@ tape( 'the method serializes a tuple as a locale-specific string (locale and opt
117117
var opts;
118118
var p;
119119

120-
Point = namedtypetuple( [ 'price', 'quantity' ] );
120+
Point = namedtypedtuple( [ 'price', 'quantity' ] );
121121
p = new Point( [ 1234.56, 50 ] );
122122
opts = {
123123
'style': 'currency',
@@ -127,7 +127,7 @@ tape( 'the method serializes a tuple as a locale-specific string (locale and opt
127127
expected = 'tuple(price=' + (1234.56).toLocaleString( 'en-US', opts ) + ', quantity=' + (50).toLocaleString( 'en-US', opts ) + ')';
128128
actual = p.toLocaleString( 'en-US', opts );
129129

130-
t.strictEqual( actual, expected, 'returns expected string for currency format' );
130+
t.strictEqual( actual, expected, 'returns expected value' );
131131
t.end();
132132
});
133133

@@ -137,13 +137,12 @@ tape( 'the method handles NaN values', function test( t ) {
137137
var actual;
138138
var r;
139139

140-
Record = namedtypetuple( [ 'isValid', 'value' ] );
140+
Record = namedtypedtuple( [ 'isValid', 'value' ] );
141141
r = new Record( [ 1, NaN ] );
142142

143143
expected = 'tuple(isValid=1, value=NaN)';
144144
actual = r.toLocaleString();
145145

146-
t.strictEqual( actual, expected, 'handles boolean and NaN values' );
146+
t.strictEqual( actual, expected, 'returns expected value' );
147147
t.end();
148148
});
149-

0 commit comments

Comments
 (0)