Merge pull request #38 from github/joshmgross/generated-ids-test

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