Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: Add tokens to tests (fixes #203) #204

Merged
merged 1 commit into from Oct 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
110 changes: 110 additions & 0 deletions tests/fixtures/attach-comments/block-trailing-comment.result.js
Expand Up @@ -128,5 +128,115 @@ module.exports = {
}
}
}
],
"tokens": [
{
"type": "Punctuator",
"value": "{",
"range": [
0,
1
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 1
}
}
},
{
"type": "Identifier",
"value": "a",
"range": [
6,
7
],
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 5
}
}
},
{
"type": "Punctuator",
"value": "(",
"range": [
7,
8
],
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 6
}
}
},
{
"type": "Punctuator",
"value": ")",
"range": [
8,
9
],
"loc": {
"start": {
"line": 2,
"column": 6
},
"end": {
"line": 2,
"column": 7
}
}
},
{
"type": "Punctuator",
"value": ";",
"range": [
9,
10
],
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 8
}
}
},
{
"type": "Punctuator",
"value": "}",
"range": [
25,
26
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 1
}
}
}
]
};
112 changes: 111 additions & 1 deletion tests/fixtures/attach-comments/comment-within-condition.result.js
Expand Up @@ -148,5 +148,115 @@ module.exports = {
}
}
}
],
"tokens": [
{
"type": "Keyword",
"value": "if",
"range": [
10,
12
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 2
}
}
},
{
"type": "Punctuator",
"value": "(",
"range": [
13,
14
],
"loc": {
"start": {
"line": 2,
"column": 3
},
"end": {
"line": 2,
"column": 4
}
}
},
{
"type": "Identifier",
"value": "a",
"range": [
25,
26
],
"loc": {
"start": {
"line": 2,
"column": 15
},
"end": {
"line": 2,
"column": 16
}
}
},
{
"type": "Punctuator",
"value": ")",
"range": [
26,
27
],
"loc": {
"start": {
"line": 2,
"column": 16
},
"end": {
"line": 2,
"column": 17
}
}
},
{
"type": "Punctuator",
"value": "{",
"range": [
28,
29
],
"loc": {
"start": {
"line": 2,
"column": 18
},
"end": {
"line": 2,
"column": 19
}
}
},
{
"type": "Punctuator",
"value": "}",
"range": [
29,
30
],
"loc": {
"start": {
"line": 2,
"column": 19
},
"end": {
"line": 2,
"column": 20
}
}
}
]
};
};