aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent
diff options
context:
space:
mode:
Diffstat (limited to 'tests/indent')
-rw-r--r--tests/indent/ecma/func.js14
-rw-r--r--tests/indent/javascript_spec.lua6
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/indent/ecma/func.js b/tests/indent/ecma/func.js
index 5bbfa1e31..a615214e9 100644
--- a/tests/indent/ecma/func.js
+++ b/tests/indent/ecma/func.js
@@ -35,3 +35,17 @@ func_call(
.map()
.filter()
)
+
+function prepare_list_fetcher(filter) {
+ return Object.assign(
+ async () =>
+ (
+ await http.get('/list', {
+ params: {
+ filter: filter,
+ },
+ })
+ ).data,
+ { key: ['/list', filter] }
+ )
+}
diff --git a/tests/indent/javascript_spec.lua b/tests/indent/javascript_spec.lua
index 6af93c190..ff4dcb800 100644
--- a/tests/indent/javascript_spec.lua
+++ b/tests/indent/javascript_spec.lua
@@ -60,6 +60,12 @@ describe("indent JavaScript:", function()
{ 19, 2 },
{ 20, 2 },
{ 25, 2 },
+ { 42, 8 },
+ { 43, 10 },
+ { 44, 12 },
+ { 48, 4 },
+ { 49, 4 },
+ { 50, 2 },
}
do
run:new_line("ecma/func.js", { on_line = info[1], text = "//", indent = info[2] }, info[3], info[4])