Skip to content

Commit

Permalink
add humidex and heat index text tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oyve committed Nov 11, 2020
1 parent 13e3e14 commit b68f199
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion test/temperature.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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);
});
});
});

0 comments on commit b68f199

Please sign in to comment.