From afac0110f31a6a8374d43eb9cfa5ddf51fdbb0ea Mon Sep 17 00:00:00 2001 From: Orim Dominic Adah Date: Mon, 11 Aug 2025 16:33:33 +0100 Subject: [PATCH 1/3] 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 --- exercises/concept/factory-sensors/factory-sensors.spec.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/exercises/concept/factory-sensors/factory-sensors.spec.js b/exercises/concept/factory-sensors/factory-sensors.spec.js index 8fb7e2546c..ef26beb560 100644 --- a/exercises/concept/factory-sensors/factory-sensors.spec.js +++ b/exercises/concept/factory-sensors/factory-sensors.spec.js @@ -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(); }); From fa68723be4cbc42ccd927fa437e459fa0130435e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 12 Aug 2025 06:30:48 +0000 Subject: [PATCH 2/3] [CI] Format code --- exercises/concept/factory-sensors/factory-sensors.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/concept/factory-sensors/factory-sensors.spec.js b/exercises/concept/factory-sensors/factory-sensors.spec.js index ef26beb560..5ecbd96202 100644 --- a/exercises/concept/factory-sensors/factory-sensors.spec.js +++ b/exercises/concept/factory-sensors/factory-sensors.spec.js @@ -11,7 +11,7 @@ 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(); }); From f035d4c393c0bc1fa04ec847ccb61074d72d7d2e Mon Sep 17 00:00:00 2001 From: Orim Dominic Adah Date: Mon, 18 Aug 2025 18:04:19 +0100 Subject: [PATCH 3/3] chore: include contributor name in meta --- exercises/concept/factory-sensors/.meta/config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/concept/factory-sensors/.meta/config.json b/exercises/concept/factory-sensors/.meta/config.json index 043296967e..50e42d1b4c 100644 --- a/exercises/concept/factory-sensors/.meta/config.json +++ b/exercises/concept/factory-sensors/.meta/config.json @@ -5,7 +5,8 @@ "contributors": [ "SleeplessByte", "junedev", - "themetar" + "themetar", + "orimdominic" ], "files": { "solution": [