From 9ea06bd91466facdd8814c076215cecf4450fa6b Mon Sep 17 00:00:00 2001 From: pyko Date: Wed, 2 Oct 2019 18:16:19 +1000 Subject: [PATCH] Update isbn-verifier.spec.js Updating 'X is only valid as a check digit' test so if `X` in the middle of ISBN is treated as `10` the test will fail. Changing check digit to `9` means `checksum('3-598-2X507-9') mod 11 == 0`, so solutions which simply replace `X` with `10` (without checking location) will treat `3-598-2X507-9` as a valid ISBN. --- exercises/isbn-verifier/isbn-verifier.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/isbn-verifier/isbn-verifier.spec.js b/exercises/isbn-verifier/isbn-verifier.spec.js index b6f4349498..c7141c922d 100644 --- a/exercises/isbn-verifier/isbn-verifier.spec.js +++ b/exercises/isbn-verifier/isbn-verifier.spec.js @@ -32,7 +32,7 @@ describe('ISBN Verifier Test Suite', () => { }); xtest('X is only valid as a check digit', () => { - const isbn = new ISBN('3-598-2X507-0'); + const isbn = new ISBN('3-598-2X507-9'); expect(isbn.isValid()).toEqual(false); });