Skip to content
Source
Sign inSign up
Open History to see the last commit

sourceControlDefinitions.test.ts

24 lines730 Bytes

1import { expect, it } from "@effect/vitest";
2​
3import {
4 BUILT_IN_SOURCE_CONTROL_DRIVER_LIST,
5 sourceControlDefinitions,
6} from "./sourceControlDefinitions.ts";
7​
8it("runs a driver for every host the server and clients read, in their order", () => {
9 expect(BUILT_IN_SOURCE_CONTROL_DRIVER_LIST.map((driver) => driver.definition)).toEqual(
10 sourceControlDefinitions.definitions,
11 );
12});
13​
14it.each([
15 "C:/repos/project",
16 "C:\\repos\\project",
17 "/srv/git/repo.git",
18 "./team:group/repo",
19 "file:///srv/git/repo.git",
20 "hg::team/repo",
21 "codecommit::us-east-1://repo",
22])("finds no host in %s, which git does not read as SSH", (remoteUrl) => {
23 expect(sourceControlDefinitions.recognizeRemote(remoteUrl)).toBeNull();
24});