mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
348 lines
12 KiB
JSON
348 lines
12 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-parameterless-function.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
28
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an anonymous() function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index e69de29..4a26ae8 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+function() { return 'hi'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "2a5f85a471c9c83f2e835139afa5eb7bfecd546a..a2527ab39dbaa7651e66e24f3d143d11060841f6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-parameterless-function.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an anonymous() function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
28
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an anonymous() function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index 4a26ae8..c31dd4b 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+function() { return 'hello'; }",
|
|
"+function() { return 'hi'; }",
|
|
" function() { return 'hi'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "a2527ab39dbaa7651e66e24f3d143d11060841f6..4b3321e8a707ad91af6735319257f7f68fb593b7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-parameterless-function.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
21
|
|
],
|
|
"end": [
|
|
1,
|
|
28
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
21
|
|
],
|
|
"end": [
|
|
1,
|
|
25
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'hello' string with the 'hi' string"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index c31dd4b..6b1efa4 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-function() { return 'hello'; }",
|
|
"+function() { return 'hi'; }",
|
|
" function() { return 'hi'; }",
|
|
" function() { return 'hi'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "4b3321e8a707ad91af6735319257f7f68fb593b7..a01626612654464812b9cedaad745f686edc8138"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-parameterless-function.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
21
|
|
],
|
|
"end": [
|
|
1,
|
|
25
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
21
|
|
],
|
|
"end": [
|
|
1,
|
|
28
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'hi' string with the 'hello' string"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index 6b1efa4..c31dd4b 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-function() { return 'hi'; }",
|
|
"+function() { return 'hello'; }",
|
|
" function() { return 'hi'; }",
|
|
" function() { return 'hi'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "a01626612654464812b9cedaad745f686edc8138..d640dfcedbbda8708bb8c679b2b96460e63e8e53"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-parameterless-function.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an anonymous() function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
28
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an anonymous() function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an anonymous() function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index c31dd4b..b8e05c0 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-function() { return 'hello'; }",
|
|
"-function() { return 'hi'; }",
|
|
" function() { return 'hi'; }",
|
|
"+function() { return 'hello'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d640dfcedbbda8708bb8c679b2b96460e63e8e53..f1436a17d64c050a7d6aa15fe0876ce3fc4176f0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-parameterless-function.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
28
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an anonymous() function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index b8e05c0..ce1ef83 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-function() { return 'hi'; }",
|
|
" function() { return 'hello'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f1436a17d64c050a7d6aa15fe0876ce3fc4176f0..1bd2372f874ec3588d5510b5c7fa50c378b5e665"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-parameterless-function.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an anonymous() function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index ce1ef83..e69de29 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-function() { return 'hello'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "1bd2372f874ec3588d5510b5c7fa50c378b5e665..e66b1b20abc596d2b560eaa80f1749c79816f9ff"
|
|
}]
|