fixup completion tests now we have new keywords

This commit is contained in:
Lawrence Gripper
2025-09-09 11:09:05 +00:00
committed by GitHub
parent 7cf82aa761
commit 01c3723641
+6 -6
View File
@@ -70,7 +70,7 @@ jobs:
|`; |`;
const result = await complete(...getPositionFromCursor(input)); const result = await complete(...getPositionFromCursor(input));
expect(result).not.toBeUndefined(); expect(result).not.toBeUndefined();
expect(result.length).toEqual(20); expect(result.length).toEqual(21);
}); });
it("string definition completion in sequence", async () => { it("string definition completion in sequence", async () => {
@@ -243,7 +243,7 @@ jobs:
runs-|`; runs-|`;
const result = await complete(...getPositionFromCursor(input)); const result = await complete(...getPositionFromCursor(input));
expect(result).not.toBeUndefined(); expect(result).not.toBeUndefined();
expect(result).toHaveLength(20); expect(result).toHaveLength(21);
}); });
it("job key with comment afterwards", async () => { it("job key with comment afterwards", async () => {
@@ -254,7 +254,7 @@ jobs:
#`; #`;
const result = await complete(...getPositionFromCursor(input)); const result = await complete(...getPositionFromCursor(input));
expect(result).not.toBeUndefined(); expect(result).not.toBeUndefined();
expect(result).toHaveLength(20); expect(result).toHaveLength(21);
}); });
it("job key with other values afterwards", async () => { it("job key with other values afterwards", async () => {
@@ -266,7 +266,7 @@ jobs:
concurrency: 'group-name'`; concurrency: 'group-name'`;
const result = await complete(...getPositionFromCursor(input)); const result = await complete(...getPositionFromCursor(input));
expect(result).not.toBeUndefined(); expect(result).not.toBeUndefined();
expect(result).toHaveLength(19); expect(result).toHaveLength(20);
}); });
it("step key without space after colon", async () => { it("step key without space after colon", async () => {
@@ -335,7 +335,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
`; `;
const result = await complete(...getPositionFromCursor(input)); const result = await complete(...getPositionFromCursor(input));
expect(result).toHaveLength(16); expect(result).toHaveLength(17);
}); });
it("complete from behind a colon will replace it", async () => { it("complete from behind a colon will replace it", async () => {
@@ -348,7 +348,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
`; `;
const result = await complete(...getPositionFromCursor(input)); const result = await complete(...getPositionFromCursor(input));
expect(result).toHaveLength(16); expect(result).toHaveLength(17);
const textEdit = result[0].textEdit as TextEdit; const textEdit = result[0].textEdit as TextEdit;
expect(textEdit.range).toEqual({ expect(textEdit.range).toEqual({
start: {line: 5, character: 4}, start: {line: 5, character: 4},