Update generated IDs completion test
This commit is contained in:
@@ -262,7 +262,7 @@ jobs:
|
||||
|
||||
expect(result).toEqual([]);
|
||||
});
|
||||
|
||||
|
||||
describe("steps context", () => {
|
||||
it("includes defined step IDs", async () => {
|
||||
const input = `
|
||||
@@ -317,23 +317,22 @@ jobs:
|
||||
|
||||
expect(result.map(x => x.label)).toEqual(["a"]);
|
||||
});
|
||||
});
|
||||
|
||||
// The workflow parser doesn't currently generate IDs, so we can't test this yet
|
||||
it.failing("Ignores generated IDs", async () => {
|
||||
const input = `
|
||||
on: push
|
||||
jobs:
|
||||
one:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo hello a
|
||||
- id: b
|
||||
run: echo hello b
|
||||
- run: echo "hello \${{ steps.|
|
||||
`;
|
||||
const result = await complete(...getPositionFromCursor(input), undefined, contextProviderConfig);
|
||||
it("Ignores generated IDs", async () => {
|
||||
const input = `
|
||||
on: push
|
||||
jobs:
|
||||
one:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo hello a
|
||||
- id: b
|
||||
run: echo hello b
|
||||
- run: echo "hello \${{ steps.|
|
||||
`;
|
||||
const result = await complete(...getPositionFromCursor(input), undefined, contextProviderConfig);
|
||||
|
||||
expect(result.map(x => x.label)).toEqual(["b"]);
|
||||
expect(result.map(x => x.label)).toEqual(["b"]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Generated
+6
-6
@@ -665,9 +665,9 @@
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@github/actions-workflow-parser": {
|
||||
"version": "0.0.27",
|
||||
"resolved": "https://npm.pkg.github.com/download/@github/actions-workflow-parser/0.0.27/7da28182bb856a124acf10ae60d6c1eab80a21cd",
|
||||
"integrity": "sha512-EKnGr8C2Fe8ksswJXJoewcVtOEJcebDJRHZhgkIhDT74GTLZpXfBbE+tYzQaj2cVu6jylV27oj2otwHYNWSTGA==",
|
||||
"version": "0.0.28",
|
||||
"resolved": "https://npm.pkg.github.com/download/@github/actions-workflow-parser/0.0.28/ad1da14904a4aa3482176614d454a85041f1e23b",
|
||||
"integrity": "sha512-x0P5FZ78ige6o03wU4BgfrfkzDOL+iCFbBHk6mTNL4ZX/dR4xCUn8mfhOb9JxCKhuO3UqN5y1+mitcgejGHyfg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@github/actions-expressions": "*",
|
||||
@@ -10927,9 +10927,9 @@
|
||||
}
|
||||
},
|
||||
"@github/actions-workflow-parser": {
|
||||
"version": "0.0.27",
|
||||
"resolved": "https://npm.pkg.github.com/download/@github/actions-workflow-parser/0.0.27/7da28182bb856a124acf10ae60d6c1eab80a21cd",
|
||||
"integrity": "sha512-EKnGr8C2Fe8ksswJXJoewcVtOEJcebDJRHZhgkIhDT74GTLZpXfBbE+tYzQaj2cVu6jylV27oj2otwHYNWSTGA==",
|
||||
"version": "0.0.28",
|
||||
"resolved": "https://npm.pkg.github.com/download/@github/actions-workflow-parser/0.0.28/ad1da14904a4aa3482176614d454a85041f1e23b",
|
||||
"integrity": "sha512-x0P5FZ78ige6o03wU4BgfrfkzDOL+iCFbBHk6mTNL4ZX/dR4xCUn8mfhOb9JxCKhuO3UqN5y1+mitcgejGHyfg==",
|
||||
"requires": {
|
||||
"@github/actions-expressions": "*",
|
||||
"yaml": "^2.0.0-8"
|
||||
|
||||
Reference in New Issue
Block a user