mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 08:08:39 +01:00
use randomBytes for rnd file name generation, https://github.com/microsoft/vscode/issues/139217
This commit is contained in:
@@ -4,11 +4,12 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import * as crypto from 'crypto';
|
||||
import * as vscode from 'vscode';
|
||||
import { TestFS } from './memfs';
|
||||
|
||||
export function rndName() {
|
||||
return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 10);
|
||||
return crypto.randomBytes(8).toString('hex');
|
||||
}
|
||||
|
||||
export const testFs = new TestFS('fake-fs', true);
|
||||
|
||||
Reference in New Issue
Block a user