Use assert
in normalizeUuid
This commit is contained in:
@@ -12,4 +12,11 @@ describe('normalizeUuid', () => {
|
||||
assert.strictEqual(normalizeUuid(uuid, 'context 1'), uuid);
|
||||
assert.strictEqual(normalizeUuid(uuid.toUpperCase(), 'context 2'), uuid);
|
||||
});
|
||||
|
||||
it("throws if passed a string that's not a UUID", () => {
|
||||
assert.throws(
|
||||
() => normalizeUuid('not-uuid-at-all', 'context 3'),
|
||||
'Normalizing invalid uuid: not-uuid-at-all in context "context 3"'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user