mirror of
https://github.com/coder/code-server.git
synced 2026-05-05 20:15:19 +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:
@@ -5,24 +5,33 @@
|
||||
|
||||
import * as assert from 'assert';
|
||||
import * as path from 'vs/base/common/path';
|
||||
import * as os from 'os';
|
||||
import { tmpdir } from 'os';
|
||||
import { extract } from 'vs/base/node/zip';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { rimraf, exists } from 'vs/base/node/pfs';
|
||||
import { rimraf, exists, mkdirp } from 'vs/base/node/pfs';
|
||||
import { getPathFromAmdModule } from 'vs/base/common/amd';
|
||||
import { createCancelablePromise } from 'vs/base/common/async';
|
||||
|
||||
const fixtures = getPathFromAmdModule(require, './fixtures');
|
||||
import { getRandomTestPath } from 'vs/base/test/node/testUtils';
|
||||
|
||||
suite('Zip', () => {
|
||||
|
||||
test('extract should handle directories', () => {
|
||||
const fixture = path.join(fixtures, 'extract.zip');
|
||||
const target = path.join(os.tmpdir(), generateUuid());
|
||||
let testDir: string;
|
||||
|
||||
return createCancelablePromise(token => extract(fixture, target, {}, token)
|
||||
.then(() => exists(path.join(target, 'extension')))
|
||||
.then(exists => assert(exists))
|
||||
.then(() => rimraf(target)));
|
||||
setup(() => {
|
||||
testDir = getRandomTestPath(tmpdir(), 'vsctests', 'zip');
|
||||
|
||||
return mkdirp(testDir);
|
||||
});
|
||||
|
||||
teardown(() => {
|
||||
return rimraf(testDir);
|
||||
});
|
||||
|
||||
test('extract should handle directories', async () => {
|
||||
const fixtures = getPathFromAmdModule(require, './fixtures');
|
||||
const fixture = path.join(fixtures, 'extract.zip');
|
||||
|
||||
await createCancelablePromise(token => extract(fixture, testDir, {}, token));
|
||||
const doesExist = await exists(path.join(testDir, 'extension'));
|
||||
assert(doesExist);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user