From e549c575e8d97a1535075af04d3eeaef944478d1 Mon Sep 17 00:00:00 2001 From: cinderblockgames <79210192+cinderblockgames@users.noreply.github.com> Date: Thu, 18 Nov 2021 09:49:35 -0500 Subject: [PATCH] Expanding getExtension test to cover all cases. Not sure why 0 is a case, but not removing it. --- src/test/components/greeter.spec.tsx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/test/components/greeter.spec.tsx b/src/test/components/greeter.spec.tsx index 6cb6a0d..f9d04ab 100644 --- a/src/test/components/greeter.spec.tsx +++ b/src/test/components/greeter.spec.tsx @@ -68,7 +68,34 @@ it("getExtension test", () => { expect(getExtension(1)).toEqual("st"); expect(getExtension(2)).toEqual("nd"); expect(getExtension(3)).toEqual("rd"); + expect(getExtension(4)).toEqual("th"); + expect(getExtension(5)).toEqual("th"); + expect(getExtension(6)).toEqual("th"); + expect(getExtension(7)).toEqual("th"); + expect(getExtension(8)).toEqual("th"); + expect(getExtension(9)).toEqual("th"); + expect(getExtension(10)).toEqual("th"); + expect(getExtension(11)).toEqual("th"); + expect(getExtension(12)).toEqual("th"); + expect(getExtension(13)).toEqual("th"); + expect(getExtension(14)).toEqual("th"); expect(getExtension(15)).toEqual("th"); + expect(getExtension(16)).toEqual("th"); + expect(getExtension(17)).toEqual("th"); + expect(getExtension(18)).toEqual("th"); + expect(getExtension(19)).toEqual("th"); + expect(getExtension(20)).toEqual("th"); + expect(getExtension(21)).toEqual("st"); + expect(getExtension(22)).toEqual("nd"); + expect(getExtension(23)).toEqual("rd"); + expect(getExtension(24)).toEqual("th"); + expect(getExtension(25)).toEqual("th"); + expect(getExtension(26)).toEqual("th"); + expect(getExtension(27)).toEqual("th"); + expect(getExtension(28)).toEqual("th"); + expect(getExtension(29)).toEqual("th"); + expect(getExtension(30)).toEqual("th"); + expect(getExtension(31)).toEqual("st"); }); it("Greeter snapshot test", () => {