Skip to content

Commit afac011

Browse files
authored
test: constrict lower bounds and upper bounds of test case
I recently mentored a solution where the mentee used `>=100` and it passed. I'm making this PR to fix that. Link to solution: https://exercism.org/mentoring/requests/dad84dead4344defb12e2788a142713b
1 parent 17c0f6f commit afac011

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

exercises/concept/factory-sensors/factory-sensors.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@ import {
88
} from './factory-sensors';
99

1010
describe('checkHumidityLevel', () => {
11+
test('should throw if the humidity percentage is 71', () => {
12+
expect(() => checkHumidityLevel(71)).toThrow();
13+
});
14+
1115
test('should throw if the humidity percentage is 100', () => {
1216
expect(() => checkHumidityLevel(100)).toThrow();
1317
});
1418

19+
test('should not throw if the humidity level is 70', () => {
20+
expect(() => checkHumidityLevel(70)).not.toThrow();
21+
});
22+
1523
test('should not throw if the humidity level is 53', () => {
1624
expect(() => checkHumidityLevel(53)).not.toThrow();
1725
});

0 commit comments

Comments
 (0)