Skip to content

Commit

Permalink
antoraConfigUri can be undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Oct 3, 2023
1 parent 8e8a965 commit c6d6185
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/antoraSupport.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function testGetAntoraConfig ({ asciidocPathUri, antoraConfigExpectedUri }
if (antoraConfigExpectedUri === undefined) {
assert.strictEqual(antoraConfigUri, undefined)
} else {
assert.strictEqual(antoraConfigUri.path, antoraConfigExpectedUri.path)
assert.strictEqual(antoraConfigUri?.path, antoraConfigExpectedUri?.path)
}
}

Expand Down Expand Up @@ -62,7 +62,9 @@ suite('Antora Support', () => {
for (const testCase of testCases) {
test(testCase.title, async () => testGetAntoraConfig({
asciidocPathUri: vscode.Uri.joinPath(workspaceUri, testCase.asciidocPathSegments),
antoraConfigExpectedUri: testCase.antoraConfigExpectedPathSegments === undefined ? undefined : vscode.Uri.joinPath(workspaceUri, testCase.antoraConfigExpectedPathSegments),
antoraConfigExpectedUri: testCase.antoraConfigExpectedPathSegments === undefined
? undefined
: vscode.Uri.joinPath(workspaceUri, testCase.antoraConfigExpectedPathSegments),
}))
}

Expand Down
1 change: 1 addition & 0 deletions src/test/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ async function main () {
// Download VS Code, unzip it and run the integration test
const exitCode = await runTests(testOptions)
console.log('Exit code: ', exitCode)
process.exit(exitCode)
} catch (err) {
console.error('Failed to run tests')
process.exit(1)
Expand Down

0 comments on commit c6d6185

Please sign in to comment.