Elffuss BraidHub

kikocis/continue public

99fe51849b68 · 1.0 KiBRawPermalink
1import { expect } from "chai";
2import { EditorView, TextEditor } from "vscode-extension-tester";
3
4import { AutocompleteActions } from "../actions/Autocomplete.actions";
5import { GlobalActions } from "../actions/Global.actions";
6import { DEFAULT_TIMEOUT } from "../constants";
7
8describe("Autocomplete", () => {
9 let editor: TextEditor;
10
11 beforeEach(async function () {
12 this.timeout(DEFAULT_TIMEOUT.XL);
13
14 await GlobalActions.openTestWorkspace();
15 ({ editor } = await GlobalActions.createAndOpenNewTextFile());
16 });
17
18 afterEach(async function () {
19 this.timeout(DEFAULT_TIMEOUT.XL);
20 await editor.clearText();
21 await new EditorView().closeAllEditors();
22 });
23
24 it("Should display completions", async () => {
25 await AutocompleteActions.testCompletions(editor);
26 }).timeout(DEFAULT_TIMEOUT.XL);
27 it("Should force a completion using the command", async () => {
28 const ghostText = await AutocompleteActions.forceCompletion(editor);
29 expect(ghostText).to.not.be.empty;
30 }).timeout(DEFAULT_TIMEOUT.XL);
31});