提交 4b427941 编写于 作者: S Sandeep Somavarapu

#53526 Fix compilations

上级 2b902734
......@@ -7,14 +7,13 @@
import * as assert from 'assert';
import { Cache } from 'vs/base/common/cache';
import { TPromise } from 'vs/base/common/winjs.base';
import { timeout } from 'vs/base/common/async';
suite('Cache', () => {
test('simple value', () => {
let counter = 0;
const cache = new Cache(_ => TPromise.as(counter++));
const cache = new Cache(_ => Promise.resolve(counter++));
return cache.get().promise
.then(c => assert.equal(c, 0), () => assert.fail('Unexpected assertion error'))
......@@ -24,7 +23,7 @@ suite('Cache', () => {
test('simple error', () => {
let counter = 0;
const cache = new Cache(_ => TPromise.wrapError(new Error(String(counter++))));
const cache = new Cache(_ => Promise.reject(new Error(String(counter++))));
return cache.get().promise
.then(() => assert.fail('Unexpected assertion error'), err => assert.equal(err.message, 0))
......@@ -37,7 +36,7 @@ suite('Cache', () => {
const cache = new Cache(token => {
counter1++;
return timeout(2, token).then(() => counter2++);
return Promise.resolve(timeout(2, token).then(() => counter2++));
});
assert.equal(counter1, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册