1
1
mirror of https://github.com/github/semantic.git synced 2025-01-09 00:56:32 +03:00
semantic/test/corpus/diff-summaries/javascript/chained-callbacks.json
Rob Rix 483e8a3f00 Regenerate all the things!
JavaScript: method call → function call.

Go: regenerated everything.
2017-01-24 15:09:28 -05:00

456 lines
15 KiB
JSON

[{
"testCaseDescription": "javascript-chained-callbacks-insert-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
39
]
}
},
"summary": "Added the 'this.map(…)' function call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index e69de29b..ce9ee1ed 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -0,0 +1 @@",
"+this.map(function (a) { return a.b; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "e97f568708cabfc40035c206b04bf5b6abf6e5bd..f14828a645c440584da5db2b188a4155d63843e0"
}
,{
"testCaseDescription": "javascript-chained-callbacks-replacement-insert-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
42
]
}
},
"summary": "Added the 'this.reduce(…)' function call"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
39
]
}
},
"summary": "Added the 'this.map(…)' function call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index ce9ee1ed..acba744a 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -1 +1,3 @@",
"+this.reduce(function (a) { return b.a; })",
"+this.map(function (a) { return a.b; })",
" this.map(function (a) { return a.b; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "f14828a645c440584da5db2b188a4155d63843e0..861d17aed5329b7a49e2f97ae261307fe9b4431e"
}
,{
"testCaseDescription": "javascript-chained-callbacks-delete-insert-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"replace": [
{
"start": [
1,
6
],
"end": [
1,
12
]
},
{
"start": [
1,
6
],
"end": [
1,
9
]
}
]
},
"summary": "Replaced the 'reduce' identifier with the 'map' identifier in the this.map(…) function call"
},
{
"span": {
"replace": [
{
"start": [
1,
35
],
"end": [
1,
36
]
},
{
"start": [
1,
32
],
"end": [
1,
33
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'a' identifier in the this.map(…) function call"
},
{
"span": {
"replace": [
{
"start": [
1,
37
],
"end": [
1,
38
]
},
{
"start": [
1,
34
],
"end": [
1,
35
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'b' identifier in the this.map(…) function call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index acba744a..73905343 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -1,3 +1,3 @@",
"-this.reduce(function (a) { return b.a; })",
"+this.map(function (a) { return a.b; })",
" this.map(function (a) { return a.b; })",
" this.map(function (a) { return a.b; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "861d17aed5329b7a49e2f97ae261307fe9b4431e..e2193800198a04799244dc9f70907be929bdc41f"
}
,{
"testCaseDescription": "javascript-chained-callbacks-replacement-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"replace": [
{
"start": [
1,
6
],
"end": [
1,
9
]
},
{
"start": [
1,
6
],
"end": [
1,
12
]
}
]
},
"summary": "Replaced the 'map' identifier with the 'reduce' identifier in the this.reduce(…) function call"
},
{
"span": {
"replace": [
{
"start": [
1,
32
],
"end": [
1,
33
]
},
{
"start": [
1,
35
],
"end": [
1,
36
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'b' identifier in the this.reduce(…) function call"
},
{
"span": {
"replace": [
{
"start": [
1,
34
],
"end": [
1,
35
]
},
{
"start": [
1,
37
],
"end": [
1,
38
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'a' identifier in the this.reduce(…) function call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index 73905343..acba744a 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -1,3 +1,3 @@",
"-this.map(function (a) { return a.b; })",
"+this.reduce(function (a) { return b.a; })",
" this.map(function (a) { return a.b; })",
" this.map(function (a) { return a.b; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "e2193800198a04799244dc9f70907be929bdc41f..53dec994d0dc3b7c7bcc9249cab85a543ef25200"
}
,{
"testCaseDescription": "javascript-chained-callbacks-delete-replacement-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
42
]
}
},
"summary": "Deleted the 'this.reduce(…)' function call"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
39
]
}
},
"summary": "Deleted the 'this.map(…)' function call"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
42
]
}
},
"summary": "Added the 'this.reduce(…)' function call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index acba744a..c4db4326 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -1,3 +1,2 @@",
"-this.reduce(function (a) { return b.a; })",
"-this.map(function (a) { return a.b; })",
" this.map(function (a) { return a.b; })",
"+this.reduce(function (a) { return b.a; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "53dec994d0dc3b7c7bcc9249cab85a543ef25200..294233550240c3b5f5b279f688cc1f0dd2416ceb"
}
,{
"testCaseDescription": "javascript-chained-callbacks-delete-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
39
]
}
},
"summary": "Deleted the 'this.map(…)' function call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index c4db4326..e5934198 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -1,2 +1 @@",
"-this.map(function (a) { return a.b; })",
" this.reduce(function (a) { return b.a; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "294233550240c3b5f5b279f688cc1f0dd2416ceb..bc7658e860c11b717d322c7c38b7b5be70af8169"
}
,{
"testCaseDescription": "javascript-chained-callbacks-delete-rest-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
42
]
}
},
"summary": "Deleted the 'this.reduce(…)' function call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index e5934198..e69de29b 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -1 +0,0 @@",
"-this.reduce(function (a) { return b.a; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "bc7658e860c11b717d322c7c38b7b5be70af8169..65ec4b91fc50d92244f898493564425dc91dec99"
}]