Skip to content

Commit 0daa32d

Browse files
committed
Fix failing test
1 parent 827d15d commit 0daa32d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/integration-tests/commands/generateSourcekitConfiguration.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727
sourcekitConfigFilePath,
2828
sourcekitFolderPath,
2929
} from "../../../src/commands/generateSourcekitConfiguration";
30+
import { Version } from "../../../src/utilities/version";
3031

3132
suite("Generate SourceKit-LSP configuration Command", function () {
3233
let folderContext: FolderContext;
@@ -64,7 +65,12 @@ suite("Generate SourceKit-LSP configuration Command", function () {
6465
).toString("utf-8");
6566
const config = JSON.parse(contents);
6667
const version = folderContext.swiftVersion;
67-
const branch = version.dev ? "main" : `release/${version.major}.${version.minor}`;
68+
let branch: string;
69+
if (folderContext.swiftVersion.isGreaterThanOrEqual(new Version(6, 1, 0))) {
70+
branch = version.dev ? "main" : `release/${version.major}.${version.minor}`;
71+
} else {
72+
branch = "main";
73+
}
6874
expect(config).to.have.property(
6975
"$schema",
7076
`https://raw.githubusercontent.com/swiftlang/sourcekit-lsp/refs/heads/${branch}/config.schema.json`

0 commit comments

Comments
 (0)