From 16ad1addf5522d09acfb12438f11cb4c7e3057ec Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Fri, 27 Jan 2023 15:54:51 -0500 Subject: [PATCH] Update position tuples in tests --- actions-workflow-parser/src/expressions.test.ts | 16 ++++++++-------- actions-workflow-parser/src/index.test.ts | 8 ++++---- .../src/workflows/yaml-object-reader.test.ts | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/actions-workflow-parser/src/expressions.test.ts b/actions-workflow-parser/src/expressions.test.ts index f45eaea..8bdc916 100644 --- a/actions-workflow-parser/src/expressions.test.ts +++ b/actions-workflow-parser/src/expressions.test.ts @@ -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'" } diff --git a/actions-workflow-parser/src/index.test.ts b/actions-workflow-parser/src/index.test.ts index de071cb..b316089 100644 --- a/actions-workflow-parser/src/index.test.ts +++ b/actions-workflow-parser/src/index.test.ts @@ -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} } ) ]); diff --git a/actions-workflow-parser/src/workflows/yaml-object-reader.test.ts b/actions-workflow-parser/src/workflows/yaml-object-reader.test.ts index 9813dff..4ff3b13 100644 --- a/actions-workflow-parser/src/workflows/yaml-object-reader.test.ts +++ b/actions-workflow-parser/src/workflows/yaml-object-reader.test.ts @@ -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} }); });