Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
12
test/toOrdinalSuffix/toOrdinalSuffix.test.js
Normal file
12
test/toOrdinalSuffix/toOrdinalSuffix.test.js
Normal file
@ -0,0 +1,12 @@
|
||||
const expect = require('expect');
|
||||
const toOrdinalSuffix = require('./toOrdinalSuffix.js');
|
||||
|
||||
|
||||
test('toOrdinalSuffix is a Function', () => {
|
||||
expect(toOrdinalSuffix).toBeInstanceOf(Function);
|
||||
});
|
||||
t.equal(toOrdinalSuffix('123'), '123rd', 'Adds an ordinal suffix to a number');
|
||||
t.equal(toOrdinalSuffix(5), '5th', 'Adds an ordinal suffix to a number');
|
||||
t.equal(toOrdinalSuffix(1), '1st', 'Adds an ordinal suffix to a number');
|
||||
t.equal(toOrdinalSuffix(0), '0th', 'Adds an ordinal suffix to a number');
|
||||
|
||||
Reference in New Issue
Block a user