mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
some cancellation error 💄
This commit is contained in:
@@ -10,6 +10,7 @@ import { isWindows } from 'vs/base/common/platform';
|
||||
import { assertType } from 'vs/base/common/types';
|
||||
import { Mimes } from 'vs/base/common/mime';
|
||||
import { MarshalledId } from 'vs/base/common/marshallingIds';
|
||||
import { CancellationError } from 'vs/base/common/errors';
|
||||
|
||||
function assertToJSON(a: any, expected: any) {
|
||||
const raw = JSON.stringify(a);
|
||||
@@ -565,6 +566,14 @@ suite('ExtHostTypes', function () {
|
||||
assert.ok(error instanceof types.FileSystemError);
|
||||
});
|
||||
|
||||
test('CancellationError', function () {
|
||||
// The CancellationError-type is used internally and exported as API. Make sure that at
|
||||
// its name and message are `Canceled`
|
||||
const err = new CancellationError();
|
||||
assert.strictEqual(err.name, 'Canceled');
|
||||
assert.strictEqual(err.message, 'Canceled');
|
||||
});
|
||||
|
||||
test('CodeActionKind contains', () => {
|
||||
assert.ok(types.CodeActionKind.RefactorExtract.contains(types.CodeActionKind.RefactorExtract));
|
||||
assert.ok(types.CodeActionKind.RefactorExtract.contains(types.CodeActionKind.RefactorExtract.append('other')));
|
||||
|
||||
Reference in New Issue
Block a user