mirror of
https://github.com/coder/code-server.git
synced 2026-05-15 00:37:26 +02:00
chore(vscode): update to 1.53.2
These conflicts will be resolved in the following commits. We do it this way so that PR review is possible.
This commit is contained in:
@@ -4,24 +4,29 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { checksum } from 'vs/base/node/crypto';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { join } from 'vs/base/common/path';
|
||||
import { tmpdir } from 'os';
|
||||
import { mkdirp, rimraf, RimRafMode, writeFile } from 'vs/base/node/pfs';
|
||||
import { mkdirp, rimraf, writeFile } from 'vs/base/node/pfs';
|
||||
import { getRandomTestPath } from 'vs/base/test/node/testUtils';
|
||||
|
||||
suite('Crypto', () => {
|
||||
|
||||
let testDir: string;
|
||||
|
||||
setup(function () {
|
||||
testDir = getRandomTestPath(tmpdir(), 'vsctests', 'crypto');
|
||||
|
||||
return mkdirp(testDir);
|
||||
});
|
||||
|
||||
teardown(function () {
|
||||
return rimraf(testDir);
|
||||
});
|
||||
|
||||
test('checksum', async () => {
|
||||
const id = generateUuid();
|
||||
const testDir = join(tmpdir(), 'vsctests', id);
|
||||
const testFile = join(testDir, 'checksum.txt');
|
||||
|
||||
await mkdirp(testDir);
|
||||
|
||||
await writeFile(testFile, 'Hello World');
|
||||
|
||||
await checksum(testFile, '0a4d55a8d778e5022fab701977c5d840bbc486d0');
|
||||
|
||||
await rimraf(testDir, RimRafMode.MOVE);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user