Skip to content

Commit

Permalink
fix(tests): make them work [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianKohler committed Feb 4, 2022
1 parent c0d4ae6 commit 7b7fbb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/test/suite/absolutePathTo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ suite("AbsolutePathTo", () => {
assert.strictEqual(resultTwo.items[0].label, "fileInSubfolder.js");
});

test("autoslash", async () => {
test("autoslash on", async () => {
await setConfig("autoSlashAfterDirectory", true);

const resultSlashTrue = await executeCompletionLine1();
assert.strictEqual(resultSlashTrue.items[0].insertText, "mysubfolder/");
});

test("autoslash off", async () => {
await setConfig("autoSlashAfterDirectory", false);

const resultSlashFalse = await executeCompletionLine1();
Expand Down
2 changes: 1 addition & 1 deletion src/test/utils/set-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export async function setDefaults() {
await setConfig("showOnAbsoluteSlash", undefined);
await setConfig("exclude", undefined);
await setConfig("mappings", undefined);
await setConfig("ignoreTsConfigBaseUrl", false);
await setConfig("ignoreTsConfigBaseUrl", undefined);
}

0 comments on commit 7b7fbb9

Please sign in to comment.