From 24dfd282a231bb806818fadbc382b6ef3520e4c3 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Mon, 9 May 2022 08:46:47 -0500 Subject: [PATCH] Fix broken tests Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- src/__tests__/index.test.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/__tests__/index.test.ts b/src/__tests__/index.test.ts index 1f355d6..6a6277c 100644 --- a/src/__tests__/index.test.ts +++ b/src/__tests__/index.test.ts @@ -11,10 +11,11 @@ describe("Docker names", () => { test("should generate a random name with a number", () => { const nameWithNumber = generateNameWithNumber(); - const parts = nameWithNumber.split("-"); - expect(parts).toHaveLength(3); - expect(left).toContain(parts[0]); - expect(right).toContain(parts[1]); - expect(parseInt(parts[2])).toBeGreaterThan(0); + const parts = nameWithNumber.split("_"); + expect(parts).toHaveLength(2); + const nameparts = parts[0].split("-"); + expect(left).toContain(nameparts[0]); + expect(right).toContain(nameparts[1]); + expect(parseInt(parts[1])).toBeGreaterThan(0); }); });