From d2f05768f0c0adb94a478d3bf8f968d67cc95dab Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Sun, 17 Feb 2019 15:07:57 -0800 Subject: [PATCH] Fix tests for marquee now that we account for separator --- js/components/MainWindow/Marquee.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/components/MainWindow/Marquee.test.js b/js/components/MainWindow/Marquee.test.js index 500aed2b..40142090 100644 --- a/js/components/MainWindow/Marquee.test.js +++ b/js/components/MainWindow/Marquee.test.js @@ -21,13 +21,13 @@ describe("stepOffset", () => { const expected = 5; expect(actual).toEqual(expected); }); - it("resets to 0 when step === string.length", () => { - const actual = stepOffset(long, long.length, 0); + it("resets to 0 when step === string.length + the separator length", () => { + const actual = stepOffset(long, long.length + 7, 0); const expected = 0; expect(actual).toEqual(expected); }); - it("offsets by one char when step = string.length + 1", () => { - const actual = stepOffset(long, long.length + 1, 0); + it("offsets by one char when step = string.length the separator length + 1", () => { + const actual = stepOffset(long, long.length + 7 + 1, 0); const expected = 5; expect(actual).toEqual(expected); });