test: fix UUID test

isekai-main
Barış Soner Uşaklı 3 years ago
parent 60eeae95d2
commit 6677efd7b5

@ -102,8 +102,10 @@ describe('Utility Methods', () => {
describe('UUID generation', () => { describe('UUID generation', () => {
it('return unique random value every time', () => { it('return unique random value every time', () => {
const uuid1 = utils.generateUUID(); delete require.cache[require.resolve('../src/utils')];
const uuid2 = utils.generateUUID(); const { generateUUID } = require('../src/utils');
const uuid1 = generateUUID();
const uuid2 = generateUUID();
assert.notEqual(uuid1, uuid2, 'matches'); assert.notEqual(uuid1, uuid2, 'matches');
}); });
}); });

Loading…
Cancel
Save