diff --git a/packages/babel-core/test/fixtures/parse/output.json b/packages/babel-core/test/fixtures/parse/output.json index 5c48f0e09836..1a400f953757 100644 --- a/packages/babel-core/test/fixtures/parse/output.json +++ b/packages/babel-core/test/fixtures/parse/output.json @@ -6,11 +6,13 @@ "loc": { "start": { "line": 1, - "column": 0 + "column": 0, + "index": 0 }, "end": { "line": 7, - "column": 0 + "column": 0, + "index": 91 } }, "program": { @@ -20,11 +22,13 @@ "loc": { "start": { "line": 1, - "column": 0 + "column": 0, + "index": 0 }, "end": { "line": 7, - "column": 0 + "column": 0, + "index": 91 } }, "interpreter": null, @@ -37,11 +41,13 @@ "loc": { "start": { "line": 1, - "column": 0 + "column": 0, + "index": 0 }, "end": { "line": 2, - "column": 17 + "column": 17, + "index": 29 } }, "decorators": [ @@ -52,11 +58,13 @@ "loc": { "start": { "line": 1, - "column": 0 + "column": 0, + "index": 0 }, "end": { "line": 1, - "column": 11 + "column": 11, + "index": 11 } }, "expression": { @@ -66,11 +74,13 @@ "loc": { "start": { "line": 1, - "column": 1 + "column": 1, + "index": 1 }, "end": { "line": 1, - "column": 11 + "column": 11, + "index": 11 }, "identifierName": "annotation" }, @@ -85,11 +95,13 @@ "loc": { "start": { "line": 2, - "column": 6 + "column": 6, + "index": 18 }, "end": { "line": 2, - "column": 13 + "column": 13, + "index": 25 }, "identifierName": "MyClass" }, @@ -103,11 +115,13 @@ "loc": { "start": { "line": 2, - "column": 14 + "column": 14, + "index": 26 }, "end": { "line": 2, - "column": 17 + "column": 17, + "index": 29 } }, "body": [] @@ -120,11 +134,13 @@ "loc": { "start": { "line": 4, - "column": 0 + "column": 0, + "index": 31 }, "end": { "line": 6, - "column": 1 + "column": 1, + "index": 90 } }, "id": { @@ -134,11 +150,13 @@ "loc": { "start": { "line": 4, - "column": 9 + "column": 9, + "index": 40 }, "end": { "line": 4, - "column": 19 + "column": 19, + "index": 50 }, "identifierName": "annotation" }, @@ -154,11 +172,13 @@ "loc": { "start": { "line": 4, - "column": 20 + "column": 20, + "index": 51 }, "end": { "line": 4, - "column": 26 + "column": 26, + "index": 57 }, "identifierName": "target" }, @@ -172,11 +192,13 @@ "loc": { "start": { "line": 4, - "column": 28 + "column": 28, + "index": 59 }, "end": { "line": 6, - "column": 1 + "column": 1, + "index": 90 } }, "body": [ @@ -187,11 +209,13 @@ "loc": { "start": { "line": 5, - "column": 3 + "column": 3, + "index": 64 }, "end": { "line": 5, - "column": 27 + "column": 27, + "index": 88 } }, "expression": { @@ -201,11 +225,13 @@ "loc": { "start": { "line": 5, - "column": 3 + "column": 3, + "index": 64 }, "end": { "line": 5, - "column": 26 + "column": 26, + "index": 87 } }, "operator": "=", @@ -216,11 +242,13 @@ "loc": { "start": { "line": 5, - "column": 3 + "column": 3, + "index": 64 }, "end": { "line": 5, - "column": 19 + "column": 19, + "index": 80 } }, "object": { @@ -230,11 +258,13 @@ "loc": { "start": { "line": 5, - "column": 3 + "column": 3, + "index": 64 }, "end": { "line": 5, - "column": 9 + "column": 9, + "index": 70 }, "identifierName": "target" }, @@ -247,11 +277,13 @@ "loc": { "start": { "line": 5, - "column": 10 + "column": 10, + "index": 71 }, "end": { "line": 5, - "column": 19 + "column": 19, + "index": 80 }, "identifierName": "annotated" }, @@ -266,11 +298,13 @@ "loc": { "start": { "line": 5, - "column": 22 + "column": 22, + "index": 83 }, "end": { "line": 5, - "column": 26 + "column": 26, + "index": 87 } }, "value": true diff --git a/packages/babel-traverse/test/scope.js b/packages/babel-traverse/test/scope.js index 604325adcb54..ea3375d18e0d 100644 --- a/packages/babel-traverse/test/scope.js +++ b/packages/babel-traverse/test/scope.js @@ -442,10 +442,12 @@ describe("scope", () => { expect(referencePaths[0].node.loc.start).toEqual({ line: 1, column: 28, + index: 28, }); expect(referencePaths[1].node.loc.start).toEqual({ line: 1, column: 32, + index: 32, }); }); it("id referenced in function body", () => {