Skip to content

Commit

Permalink
chore: move comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Caele committed May 11, 2022
1 parent 3b91ddd commit 3028f10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apis/enigma-mocker/src/mocks/create-session-object-mock.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-disable no-underscore-dangle */
import extend from 'extend';

// To cover test
const crt = global.crypto || { getRandomValues: () => 123456 };

// https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid
// Not using crypto.randomUUID due to missing safari support < 15
function uuidv4() {
// To cover test
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>
(c ^ (crt.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)
);
Expand Down

0 comments on commit 3028f10

Please sign in to comment.