Skip to content

Commit a3811ba

Browse files
authored
Add unit test for relativeRepoPath (#236)
1 parent c0d3e1e commit a3811ba

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/databricks-vscode/src/configuration/SyncDestination.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,22 @@ describe(__filename, () => {
9797
assert.equal(mapper.name, "notebook-best-practices");
9898
});
9999

100+
it("should compute relative repo path", () => {
101+
const mapper = new SyncDestination(
102+
instance(mock(Repo)),
103+
Uri.from({
104+
scheme: "wsfs",
105+
path: "/Workspace/Repos/fabian.jakobs@databricks.com/notebook-best-practices",
106+
}),
107+
Uri.file("/Users/fabian.jakobs/Desktop/notebook-best-practices")
108+
);
109+
110+
assert.equal(
111+
mapper.relativeRepoPath,
112+
"/Repos/fabian.jakobs@databricks.com/notebook-best-practices"
113+
);
114+
});
115+
100116
it("should map notebooks", async () => {
101117
const mapper = new SyncDestination(
102118
instance(mock(Repo)),

0 commit comments

Comments
 (0)