Skip to content

Commit 2143056

Browse files
committed
Add Finnish tests
1 parent 3ef5f93 commit 2143056

File tree

1 file changed

+57
-0
lines changed
  • lib/node_modules/@stdlib/nlp/ordinalize/test

1 file changed

+57
-0
lines changed

lib/node_modules/@stdlib/nlp/ordinalize/test/test.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,63 @@ tape( 'the function returns an ordinal string for a provided integer string (lan
590590
t.end();
591591
});
592592

593+
tape( 'the function returns an ordinal string for a provided integer string (lang=fin)', function test( t ) {
594+
var expected;
595+
var values;
596+
var opts;
597+
var i;
598+
599+
values = [
600+
'1',
601+
'2',
602+
'21',
603+
'7',
604+
'10',
605+
'11',
606+
'12',
607+
'13',
608+
'14',
609+
'15',
610+
'16',
611+
'21',
612+
'22',
613+
'23',
614+
'24',
615+
'332',
616+
'333',
617+
'999'
618+
];
619+
expected = [
620+
'1.',
621+
'2.',
622+
'21.',
623+
'7.',
624+
'10.',
625+
'11.',
626+
'12.',
627+
'13.',
628+
'14.',
629+
'15.',
630+
'16.',
631+
'21.',
632+
'22.',
633+
'23.',
634+
'24.',
635+
'332.',
636+
'333.',
637+
'999.'
638+
];
639+
640+
opts = {
641+
'lang': 'fin'
642+
};
643+
644+
for ( i = 0; i < values.length; i++ ) {
645+
t.equal( ordinalize( values[i], opts ), expected[i], 'returns expected value' );
646+
}
647+
t.end();
648+
});
649+
593650
tape( 'the function returns an ordinal string for a provided integer string (lang=it, gender=masculine)', function test( t ) {
594651
var expected;
595652
var values;

0 commit comments

Comments
 (0)