mirror of
https://github.com/MillironX/docker-names.git
synced 2024-12-22 09:58:16 +00:00
Apply Prettier formatting to tests
Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
This commit is contained in:
parent
d66bab11a7
commit
d94d76c840
1 changed files with 8 additions and 9 deletions
|
@ -1,21 +1,20 @@
|
||||||
import {generateName, generateNameWithNumber, left, right} from "../index";
|
import { generateName, generateNameWithNumber, left, right } from "../index";
|
||||||
|
|
||||||
|
describe("Docker names", () => {
|
||||||
describe('Docker names', () => {
|
test("should generate a random name", () => {
|
||||||
test('should generate a random name', () => {
|
|
||||||
const name = generateName();
|
const name = generateName();
|
||||||
const parts = name.split('-');
|
const parts = name.split("-");
|
||||||
expect(parts).toHaveLength(2);
|
expect(parts).toHaveLength(2);
|
||||||
expect(left).toContain(parts[0]);
|
expect(left).toContain(parts[0]);
|
||||||
expect(right).toContain(parts[1]);
|
expect(right).toContain(parts[1]);
|
||||||
})
|
});
|
||||||
|
|
||||||
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(3);
|
||||||
expect(left).toContain(parts[0]);
|
expect(left).toContain(parts[0]);
|
||||||
expect(right).toContain(parts[1]);
|
expect(right).toContain(parts[1]);
|
||||||
expect(parseInt(parts[2])).toBeGreaterThan(0);
|
expect(parseInt(parts[2])).toBeGreaterThan(0);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
Loading…
Reference in a new issue