UNPKG

test-fns

Version:

write usecase driven tests systematically for simpler, safer, and more readable code

20 lines 846 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const genTestUuid_1 = require("./genTestUuid"); describe('genTestUuid', () => { it('should generate a uuid', () => { const uuid = (0, genTestUuid_1.genTestUuid)(); expect(uuid).toBeTruthy(); }); it('should generate a uuid that is namespaced for testing by whodis', () => { const uuid = (0, genTestUuid_1.genTestUuid)(); expect(uuid).toMatch(/^beef.*-.*-.*-.*-.*beef$/); expect((0, genTestUuid_1.isTestUuid)(uuid)).toEqual(true); }); it('should generate a uuid that is different every time', () => { const uuid1 = (0, genTestUuid_1.genTestUuid)(); const uuid2 = (0, genTestUuid_1.genTestUuid)(); expect(uuid1).not.toEqual(uuid2); }); }); //# sourceMappingURL=genTestUuid.test.js.map