This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
forked from microsoft/vscode-java-test
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Cannot navigate to the source location for <TestError> items (mi…
- Loading branch information
Showing
5 changed files
with
42 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. | ||
|
||
import * as assert from 'assert'; | ||
import { commands, TextDocument, window, workspace, extensions } from 'vscode'; | ||
import { searchTestLocation, ILocation } from '../../extension.bundle'; | ||
import { Uris } from '../shared'; | ||
|
||
suite('Command Utils Tests', function() { | ||
|
||
suiteSetup(async function() { | ||
await extensions.getExtension('vscjava.vscode-java-test')!.activate(); | ||
}); | ||
|
||
test("Can search location for <TestError> items", async function() { | ||
const document: TextDocument = await workspace.openTextDocument(Uris.JUNIT4_TEST); | ||
await window.showTextDocument(document); | ||
|
||
const location: ILocation[] = await searchTestLocation('junit4.ExceptionInBefore#<TestError>'); | ||
assert.ok(location); | ||
assert.ok(location.length === 1); | ||
assert.equal(location[0].uri, Uris.JUNIT4_EXCEPTION_BEFORE); | ||
}); | ||
|
||
teardown(async function() { | ||
await commands.executeCommand('workbench.action.closeActiveEditor'); | ||
}); | ||
}); |