Skip to content

Commit f9f53be

Browse files
committed
test: update test descriptions and assertion messages
1 parent 38eff0a commit f9f53be

File tree

1 file changed

+9
-9
lines changed
  • lib/node_modules/@stdlib/string/first/test

1 file changed

+9
-9
lines changed

lib/node_modules/@stdlib/string/first/test/test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,17 @@ tape( 'the function returns an empty string if provided an empty string', functi
9292
t.end();
9393
});
9494

95-
tape( 'the function returns the first character of a given string', function test( t ) {
95+
tape( 'the function returns the expected value of a provided string', function test( t ) {
9696
var out;
9797

9898
out = first( 'hello world' );
99-
t.strictEqual( out, 'h', 'returns first character' );
99+
t.strictEqual( out, 'h', 'returns expected value' );
100100

101101
out = first( '!!!' );
102-
t.strictEqual( out, '!', 'returns first character' );
102+
t.strictEqual( out, '!', 'returns expected value' );
103103

104104
out = first( 'Hello World' );
105-
t.strictEqual( out, 'H', 'returns first character' );
105+
t.strictEqual( out, 'H', 'returns expected value' );
106106

107107
out = first( 'अनुच्छेद' );
108108
t.strictEqual( out, 'अ', 'returns expected value' );
@@ -116,26 +116,26 @@ tape( 'the function returns the first character of a given string', function tes
116116
t.end();
117117
});
118118

119-
tape( 'the function returns the empty string if provided zero as the second argument', function test( t ) {
119+
tape( 'the function returns an empty string if provided zero as the second argument', function test( t ) {
120120
var out;
121121

122122
out = first( 'hello world', 0 );
123-
t.strictEqual( out, '', 'returns empty string' );
123+
t.strictEqual( out, '', 'returns expected value' );
124124

125125
t.end();
126126
});
127127

128-
tape( 'the function returns the first `n` visual characters of a given string if provided a second argument', function test( t ) {
128+
tape( 'the function supports returning the first `n` visual characters of a provided string', function test( t ) {
129129
var out;
130130

131131
out = first( 'hello world', 1 );
132-
t.strictEqual( out, 'h', 'returns first character' );
132+
t.strictEqual( out, 'h', 'returns expected value' );
133133

134134
out = first( 'hello world', 7 );
135135
t.strictEqual( out, 'hello w', 'returns expected value' );
136136

137137
out = first( '!!!', 1 );
138-
t.strictEqual( out, '!', 'returns first character' );
138+
t.strictEqual( out, '!', 'returns expected value' );
139139

140140
out = first( '!!!', 2 );
141141
t.strictEqual( out, '!!', 'returns expected value' );

0 commit comments

Comments
 (0)