From 6677efd7b5a46c21b2ad0442ab1c7b3e1a76c1bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 26 May 2022 12:42:09 -0400 Subject: [PATCH] test: fix UUID test --- test/utils.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/utils.js b/test/utils.js index aee3aa8698..ca8b22464a 100644 --- a/test/utils.js +++ b/test/utils.js @@ -102,8 +102,10 @@ describe('Utility Methods', () => { describe('UUID generation', () => { it('return unique random value every time', () => { - const uuid1 = utils.generateUUID(); - const uuid2 = utils.generateUUID(); + delete require.cache[require.resolve('../src/utils')]; + const { generateUUID } = require('../src/utils'); + const uuid1 = generateUUID(); + const uuid2 = generateUUID(); assert.notEqual(uuid1, uuid2, 'matches'); }); });