Skip to content

Commit 51dd471

Browse files
committed
Merge branch 'mr/fix_assert_errors' into 'edge'
Minor edit: remove eslint warnings See merge request eng/ide/ada_language_server!1633
2 parents bae2e1e + 7094c02 commit 51dd471

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

integration/vscode/ada/test/suite/general/helpers.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,17 @@ suite('which and envHasExec', function () {
2929
suite('findAdaMain', function () {
3030
test('Find one main (simple case)', async function () {
3131
/* Test that findAdaMain works in a simple case */
32-
const uri = Uri.joinPath(workspace.workspaceFolders![0].uri, 'src', 'main1.adb');
32+
const folders = workspace.workspaceFolders;
33+
assert(folders && folders.length > 0);
34+
const uri = Uri.joinPath(folders[0].uri, 'src', 'main1.adb');
3335
const adaMain = await findAdaMain(uri.fsPath);
3436
assert(adaMain);
3537
});
3638
test('Find one main (case sensitivity)', async function () {
3739
/* Test the behavior of findAdaMain with respect to case sensitivity */
38-
const uri_uppercase = Uri.joinPath(workspace.workspaceFolders![0].uri, 'src', 'MAIN1.ADB');
40+
const folders = workspace.workspaceFolders;
41+
assert(folders && folders.length > 0);
42+
const uri_uppercase = Uri.joinPath(folders[0].uri, 'src', 'MAIN1.ADB');
3943
const adaMain_from_uppercase = await findAdaMain(uri_uppercase.fsPath);
4044

4145
/* On Windows we should have a main here, otherwise we should not */

0 commit comments

Comments
 (0)