Fix a couple more tests
This commit is contained in:
@@ -2,6 +2,7 @@ import {CompletionItem, MarkupContent} from "vscode-languageserver-types";
|
||||
import {complete} from "./complete";
|
||||
import {getPositionFromCursor} from "./test-utils/cursor-position";
|
||||
import {testFileProvider} from "./test-utils/test-file-provider";
|
||||
import { clearParsedCache, clearWorkflowTemplateCache } from "./utils/workflow-cache";
|
||||
|
||||
function mapResult(result: CompletionItem[]) {
|
||||
return result.map(x => {
|
||||
@@ -9,6 +10,11 @@ function mapResult(result: CompletionItem[]) {
|
||||
});
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
clearWorkflowTemplateCache();
|
||||
clearParsedCache();
|
||||
});
|
||||
|
||||
describe("completion with reusable workflows", () => {
|
||||
it("completes job inputs", async () => {
|
||||
const input = `
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import { clearParsedCache, clearWorkflowTemplateCache } from "../utils/workflow-cache";
|
||||
import {getPositionFromCursor} from "./cursor-position";
|
||||
|
||||
beforeEach(() => {
|
||||
clearWorkflowTemplateCache();
|
||||
clearParsedCache();
|
||||
});
|
||||
|
||||
describe("getPositionFromCursor", () => {
|
||||
it("returns the position of the cursor and the document without that cursor", () => {
|
||||
const input = "on: push\njobs:|";
|
||||
|
||||
Reference in New Issue
Block a user