Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion exercises/concept/factory-sensors/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"contributors": [
"SleeplessByte",
"junedev",
"themetar"
"themetar",
"orimdominic"
],
"files": {
"solution": [
Expand Down
8 changes: 8 additions & 0 deletions exercises/concept/factory-sensors/factory-sensors.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@ import {
} from './factory-sensors';

describe('checkHumidityLevel', () => {
test('should throw if the humidity percentage is 71', () => {
expect(() => checkHumidityLevel(71)).toThrow();
});

test('should throw if the humidity percentage is 100', () => {
expect(() => checkHumidityLevel(100)).toThrow();
});

test('should not throw if the humidity level is 70', () => {
expect(() => checkHumidityLevel(70)).not.toThrow();
});

test('should not throw if the humidity level is 53', () => {
expect(() => checkHumidityLevel(53)).not.toThrow();
});
Expand Down