Merge pull request #27 from github/joshmgross/validation-pos-fix

Use correct token position for validation
This commit is contained in:
Josh Gross
2022-12-01 16:30:32 -05:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
@@ -55,7 +55,7 @@ describe("expression validation", () => {
]); ]);
}); });
it.failing("needs.<job_id>", async () => { it("needs.<job_id>", async () => {
const input = ` const input = `
on: push on: push
jobs: jobs:
+2 -2
View File
@@ -191,8 +191,8 @@ function getProviderContext(
): WorkflowContext { ): WorkflowContext {
const {parent, path} = findToken( const {parent, path} = findToken(
{ {
line: token.range!.start[0], line: token.range!.start[0] - 1,
character: token.range!.start[1] character: token.range!.start[1] - 1
}, },
root root
); );