From b68f199e69aabe4094e985d47843afc01d993b8e Mon Sep 17 00:00:00 2001 From: Oyvind Hansen Date: Tue, 10 Nov 2020 21:38:25 -0400 Subject: [PATCH] add humidex and heat index text tests --- test/temperature.test.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/test/temperature.test.js b/test/temperature.test.js index 01df487..6d05514 100644 --- a/test/temperature.test.js +++ b/test/temperature.test.js @@ -26,7 +26,7 @@ describe("Temperature Unit Tests", function () { }); }); - describe("Wind chill index", function () { + describe("Wind Chill Index", function () { it("it should equal", function () { //arrange const expected = 265.50; @@ -59,6 +59,18 @@ describe("Temperature Unit Tests", function () { }); }); + describe("Heat Index Text", function () { + it("it should equal", function () { + //arrange + const expected = 33; + //act + const heatIndex = temperature.heatIndex(31 + KELVIN, 60); + const actual = temperature.heatIndexText(heatIndex); + //assert + assert.strictEqual(actual.lowerLimit, expected); + }); + }); + describe("Humidex", function () { it("it should equal", function () { //arrange @@ -69,4 +81,16 @@ describe("Temperature Unit Tests", function () { assert.strictEqual(actual, expected); }); }); + + describe("Humidex Text", function () { + it("it should equal", function () { + //arrange + const expected = 40; + //act + const humidex = temperature.humidex(31 + KELVIN, 60); + const actual = temperature.humidexText(humidex); + //assert + assert.strictEqual(actual.lowerLimit, expected); + }); + }); }); \ No newline at end of file