Chore/jest

This commit is contained in:
Sofiya Tepikin
2022-08-12 09:31:33 +00:00
parent 0cd2770996
commit a103949f7c
16 changed files with 6978 additions and 912 deletions
+11 -13
View File
@@ -1,25 +1,23 @@
import { expect } from 'chai'
import {getOrdinalSuffix } from '../components/helpers/home'
import { getOrdinalSuffix } from '../components/helpers/home'
describe('Home helper: getOrdinalSuffix', () => {
it('For 1, it returns suffix \'st\'', () => {
expect(getOrdinalSuffix(1)).to.eql('st')
test("For 1, it returns suffix 'st'", () => {
expect(getOrdinalSuffix(1)).toEqual('st')
})
it('For 2, it returns suffix \'nd\'', () => {
expect(getOrdinalSuffix(2)).to.eql('nd')
test("For 2, it returns suffix 'nd'", () => {
expect(getOrdinalSuffix(2)).toEqual('nd')
})
it('For 3, it returns suffix \'rd\'', () => {
expect(getOrdinalSuffix(3)).to.eql('rd')
test("For 3, it returns suffix 'rd'", () => {
expect(getOrdinalSuffix(3)).toEqual('rd')
})
it('For 11, it returns suffix \'th\'', () => {
expect(getOrdinalSuffix(11)).to.eql('th')
test("For 11, it returns suffix 'th'", () => {
expect(getOrdinalSuffix(11)).toEqual('th')
})
it('For 23, it returns suffix \'rd\'', () => {
expect(getOrdinalSuffix(23)).to.eql('rd')
test("For 23, it returns suffix 'rd'", () => {
expect(getOrdinalSuffix(23)).toEqual('rd')
})
})