mirror of
https://github.com/coder/code-server.git
synced 2026-05-16 17:27: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:
@@ -8,17 +8,17 @@ import { CancellationTokenSource, CancellationToken } from 'vs/base/common/cance
|
||||
suite('CancellationToken', function () {
|
||||
|
||||
test('None', () => {
|
||||
assert.equal(CancellationToken.None.isCancellationRequested, false);
|
||||
assert.equal(typeof CancellationToken.None.onCancellationRequested, 'function');
|
||||
assert.strictEqual(CancellationToken.None.isCancellationRequested, false);
|
||||
assert.strictEqual(typeof CancellationToken.None.onCancellationRequested, 'function');
|
||||
});
|
||||
|
||||
test('cancel before token', function (done) {
|
||||
|
||||
const source = new CancellationTokenSource();
|
||||
assert.equal(source.token.isCancellationRequested, false);
|
||||
assert.strictEqual(source.token.isCancellationRequested, false);
|
||||
source.cancel();
|
||||
|
||||
assert.equal(source.token.isCancellationRequested, true);
|
||||
assert.strictEqual(source.token.isCancellationRequested, true);
|
||||
|
||||
source.token.onCancellationRequested(function () {
|
||||
assert.ok(true);
|
||||
@@ -29,7 +29,7 @@ suite('CancellationToken', function () {
|
||||
test('cancel happens only once', function () {
|
||||
|
||||
let source = new CancellationTokenSource();
|
||||
assert.equal(source.token.isCancellationRequested, false);
|
||||
assert.strictEqual(source.token.isCancellationRequested, false);
|
||||
|
||||
let cancelCount = 0;
|
||||
function onCancel() {
|
||||
@@ -41,7 +41,7 @@ suite('CancellationToken', function () {
|
||||
source.cancel();
|
||||
source.cancel();
|
||||
|
||||
assert.equal(cancelCount, 1);
|
||||
assert.strictEqual(cancelCount, 1);
|
||||
});
|
||||
|
||||
test('cancel calls all listeners', function () {
|
||||
@@ -60,7 +60,7 @@ suite('CancellationToken', function () {
|
||||
});
|
||||
|
||||
source.cancel();
|
||||
assert.equal(count, 3);
|
||||
assert.strictEqual(count, 3);
|
||||
});
|
||||
|
||||
test('token stays the same', function () {
|
||||
@@ -92,7 +92,7 @@ suite('CancellationToken', function () {
|
||||
|
||||
source.dispose();
|
||||
source.cancel();
|
||||
assert.equal(count, 0);
|
||||
assert.strictEqual(count, 0);
|
||||
});
|
||||
|
||||
test('dispose calls no listeners (unless told to cancel)', function () {
|
||||
@@ -106,7 +106,7 @@ suite('CancellationToken', function () {
|
||||
|
||||
source.dispose(true);
|
||||
// source.cancel();
|
||||
assert.equal(count, 1);
|
||||
assert.strictEqual(count, 1);
|
||||
});
|
||||
|
||||
test('parent cancels child', function () {
|
||||
@@ -119,8 +119,8 @@ suite('CancellationToken', function () {
|
||||
|
||||
parent.cancel();
|
||||
|
||||
assert.equal(count, 1);
|
||||
assert.equal(child.token.isCancellationRequested, true);
|
||||
assert.equal(parent.token.isCancellationRequested, true);
|
||||
assert.strictEqual(count, 1);
|
||||
assert.strictEqual(child.token.isCancellationRequested, true);
|
||||
assert.strictEqual(parent.token.isCancellationRequested, true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user