1
0
Fork 0
mirror of https://github.com/MillironX/docker-names.git synced 2024-12-22 09:58:16 +00:00

Fix broken tests

Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
This commit is contained in:
Thomas A. Christensen II 2022-05-09 08:46:47 -05:00
parent d94d76c840
commit 24dfd282a2
Signed by: millironx
GPG key ID: 139C07724802BC5D

View file

@ -11,10 +11,11 @@ describe("Docker names", () => {
test("should generate a random name with a number", () => { test("should generate a random name with a number", () => {
const nameWithNumber = generateNameWithNumber(); const nameWithNumber = generateNameWithNumber();
const parts = nameWithNumber.split("-"); const parts = nameWithNumber.split("_");
expect(parts).toHaveLength(3); expect(parts).toHaveLength(2);
expect(left).toContain(parts[0]); const nameparts = parts[0].split("-");
expect(right).toContain(parts[1]); expect(left).toContain(nameparts[0]);
expect(parseInt(parts[2])).toBeGreaterThan(0); expect(right).toContain(nameparts[1]);
expect(parseInt(parts[1])).toBeGreaterThan(0);
}); });
}); });