Skip to content

Commit

Permalink
Replace crypto with math random
Browse files Browse the repository at this point in the history
  • Loading branch information
bischofmax committed Dec 23, 2024
1 parent b9d06bc commit 64aaf4e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/modules/worker/worker.api.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { createMock, DeepMocked } from '@golevelup/ts-jest';
import { INestApplication } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import { randomUUID } from 'crypto';
import { WebSocket } from 'ws';
import { WebsocketProvider } from 'y-websocket';
import * as Y from 'yjs';
Expand Down Expand Up @@ -68,7 +67,7 @@ describe('Worker Api Test', () => {
const setup = () => {
workerService.start();

const room = randomUUID();
const room = Math.random().toString(36).substring(7);

authorizationService.hasPermission.mockResolvedValueOnce({
hasWriteAccess: true,
Expand Down Expand Up @@ -119,7 +118,7 @@ describe('Worker Api Test', () => {
const setup = () => {
workerService.start();

const room = randomUUID();
const room = Math.random().toString(36).substring(7);

authorizationService.hasPermission.mockResolvedValueOnce({
hasWriteAccess: true,
Expand Down Expand Up @@ -180,7 +179,7 @@ describe('Worker Api Test', () => {
const setup = async () => {
workerService.start();

const room = randomUUID();
const room = Math.random().toString(36).substring(7);

authorizationService.hasPermission.mockResolvedValueOnce({
hasWriteAccess: true,
Expand Down

0 comments on commit 64aaf4e

Please sign in to comment.