Update position tuples in tests

This commit is contained in:
Josh Gross
2023-01-27 15:54:51 -05:00
parent c33fcbc83d
commit 16ad1addf5
3 changed files with 14 additions and 14 deletions
@@ -85,15 +85,15 @@ jobs:
[
"${{ github.event_name }}",
{
start: [7, 16],
end: [7, 40]
start: {line: 7, column: 16},
end: {line: 7, column: 40}
}
],
[
"${{ github.ref }}",
{
start: [8, 24],
end: [8, 41]
start: {line: 8, column: 24},
end: {line: 8, column: 41}
}
]
]);
@@ -160,16 +160,16 @@ jobs:
{
prefix: "test.yaml (Line: 6, Col: 14)",
range: {
start: [7, 16],
end: [7, 40]
start: {line: 7, column: 16},
end: {line: 7, column: 40}
},
rawMessage: "Unrecognized function: 'fromJSON2'"
},
{
prefix: "test.yaml (Line: 6, Col: 14)",
range: {
start: [8, 24],
end: [8, 51]
start: {line: 8, column: 24},
end: {line: 8, column: 51}
},
rawMessage: "Unrecognized function: 'toJSON2'"
}
+4 -4
View File
@@ -32,8 +32,8 @@ describe("parseWorkflow", () => {
expect(result.context.errors.getErrors()).toEqual([
new TemplateValidationError("Required property is missing: runs-on", "test.yaml (Line: 4, Col: 5)", undefined, {
start: [4, 5],
end: [5, 24]
start: {line: 4, column: 5},
end: {line: 5, column: 24}
})
]);
});
@@ -62,8 +62,8 @@ jobs:
"test.yaml (Line: 6, Col: 13)",
undefined,
{
start: [6, 13],
end: [6, 37]
start: {line: 6, column: 13},
end: {line: 6, column: 37}
}
)
]);
@@ -74,8 +74,8 @@ it("YAML errors include range information", () => {
const error = context.errors.getErrors()[0];
expect(error.range).toEqual({
start: [7, 38],
end: [7, 63]
start: {line: 7, column: 38},
end: {line: 7, column: 63}
});
});