Skip to content

Commit

Permalink
Update more tests.
Browse files Browse the repository at this point in the history
Reviewed by @tolmasky.
  • Loading branch information
tolmasky committed Jan 31, 2022
1 parent de04763 commit 4b6d25e
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 34 deletions.
102 changes: 68 additions & 34 deletions packages/babel-core/test/fixtures/parse/output.json
Expand Up @@ -6,11 +6,13 @@
"loc": {
"start": {
"line": 1,
"column": 0
"column": 0,
"index": 0
},
"end": {
"line": 7,
"column": 0
"column": 0,
"index": 91
}
},
"program": {
Expand All @@ -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,
Expand All @@ -37,11 +41,13 @@
"loc": {
"start": {
"line": 1,
"column": 0
"column": 0,
"index": 0
},
"end": {
"line": 2,
"column": 17
"column": 17,
"index": 29
}
},
"decorators": [
Expand All @@ -52,11 +58,13 @@
"loc": {
"start": {
"line": 1,
"column": 0
"column": 0,
"index": 0
},
"end": {
"line": 1,
"column": 11
"column": 11,
"index": 11
}
},
"expression": {
Expand All @@ -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"
},
Expand All @@ -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"
},
Expand All @@ -103,11 +115,13 @@
"loc": {
"start": {
"line": 2,
"column": 14
"column": 14,
"index": 26
},
"end": {
"line": 2,
"column": 17
"column": 17,
"index": 29
}
},
"body": []
Expand All @@ -120,11 +134,13 @@
"loc": {
"start": {
"line": 4,
"column": 0
"column": 0,
"index": 31
},
"end": {
"line": 6,
"column": 1
"column": 1,
"index": 90
}
},
"id": {
Expand All @@ -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"
},
Expand All @@ -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"
},
Expand All @@ -172,11 +192,13 @@
"loc": {
"start": {
"line": 4,
"column": 28
"column": 28,
"index": 59
},
"end": {
"line": 6,
"column": 1
"column": 1,
"index": 90
}
},
"body": [
Expand All @@ -187,11 +209,13 @@
"loc": {
"start": {
"line": 5,
"column": 3
"column": 3,
"index": 64
},
"end": {
"line": 5,
"column": 27
"column": 27,
"index": 88
}
},
"expression": {
Expand All @@ -201,11 +225,13 @@
"loc": {
"start": {
"line": 5,
"column": 3
"column": 3,
"index": 64
},
"end": {
"line": 5,
"column": 26
"column": 26,
"index": 87
}
},
"operator": "=",
Expand All @@ -216,11 +242,13 @@
"loc": {
"start": {
"line": 5,
"column": 3
"column": 3,
"index": 64
},
"end": {
"line": 5,
"column": 19
"column": 19,
"index": 80
}
},
"object": {
Expand All @@ -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"
},
Expand All @@ -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"
},
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions packages/babel-traverse/test/scope.js
Expand Up @@ -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", () => {
Expand Down

0 comments on commit 4b6d25e

Please sign in to comment.