Fix tests for marquee now that we account for separator

This commit is contained in:
Jordan Eldredge 2019-02-17 15:07:57 -08:00
parent 6c28ac5386
commit d2f05768f0

View file

@ -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);
});