From c6e298d909a3a35d221d3576d511ace6ea7e9a17 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 10 Jul 2018 11:36:43 -0700 Subject: [PATCH] renable disabled test. Seems fine now. --- .../src/singlefolder-tests/workspace.test.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts index 2e9fe0d0bbf..03548116a3b 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts @@ -499,17 +499,16 @@ suite('workspace-namespace', () => { }); }); - // TODO@Joh this test fails randomly - // test('findFiles, cancellation', () => { + test('findFiles, cancellation', () => { - // const source = new CancellationTokenSource(); - // const token = source.token; // just to get an instance first - // source.cancel(); + const source = new vscode.CancellationTokenSource(); + const token = source.token; // just to get an instance first + source.cancel(); - // return vscode.workspace.findFiles('*.js', null, 100, token).then((res) => { - // assert.equal(res, void 0); - // }); - // }); + return vscode.workspace.findFiles('*.js', null, 100, token).then((res) => { + assert.deepEqual(res, []); + }); + }); test('findTextInFiles', async () => { const results: vscode.TextSearchResult[] = [];