From dfa3e97459bd75a96ae212f217876abef8954b2a Mon Sep 17 00:00:00 2001 From: Luckas Date: Thu, 1 Aug 2024 19:02:41 +0300 Subject: [PATCH] refactor: iniline spec --- tests/queries/astro_spec.lua | 6 ++---- tests/queries/css_spec.lua | 6 ++---- tests/queries/heex_spec.lua | 6 ++---- tests/queries/html_spec.lua | 6 ++---- tests/queries/htmldjango_spec.lua | 6 ++---- tests/queries/php_spec.lua | 6 ++---- tests/queries/svelte_spec.lua | 6 ++---- tests/queries/tsx_spec.lua | 6 ++---- tests/queries/twig_spec.lua | 6 ++---- 9 files changed, 18 insertions(+), 36 deletions(-) diff --git a/tests/queries/astro_spec.lua b/tests/queries/astro_spec.lua index 76cd6e7..e089da4 100644 --- a/tests/queries/astro_spec.lua +++ b/tests/queries/astro_spec.lua @@ -1,4 +1,4 @@ -local spec = { +require("tests.queries.runner").test({ name = "astro", provider = "treesitter", file = "tests/queries/astro/index.astro", @@ -8,6 +8,4 @@ local spec = { { 7, 14, 7, 41 }, { 9, 33, 9, 43 }, }, -} - -require("tests.queries.runner").test(spec) +}) diff --git a/tests/queries/css_spec.lua b/tests/queries/css_spec.lua index 0ebc9ee..035eeaa 100644 --- a/tests/queries/css_spec.lua +++ b/tests/queries/css_spec.lua @@ -1,4 +1,4 @@ -local spec = { +require("tests.queries.runner").test({ name = "css", provider = "treesitter", file = "tests/queries/css/style.css", @@ -6,6 +6,4 @@ local spec = { { 5, 9, 5, 34 }, { 9, 9, 10, 37 }, }, -} - -require("tests.queries.runner").test(spec) +}) diff --git a/tests/queries/heex_spec.lua b/tests/queries/heex_spec.lua index fcbf678..522a570 100644 --- a/tests/queries/heex_spec.lua +++ b/tests/queries/heex_spec.lua @@ -1,4 +1,4 @@ -local spec = { +require("tests.queries.runner").test({ name = "heex", provider = "treesitter", file = "tests/queries/heex/index.html.heex", @@ -7,6 +7,4 @@ local spec = { { 1, 13, 1, 20 }, { 2, 12, 5, 4 }, }, -} - -require("tests.queries.runner").test(spec) +}) diff --git a/tests/queries/html_spec.lua b/tests/queries/html_spec.lua index 338a965..88381d5 100644 --- a/tests/queries/html_spec.lua +++ b/tests/queries/html_spec.lua @@ -1,4 +1,4 @@ -local spec = { +require("tests.queries.runner").test({ name = "html", provider = "treesitter", file = "tests/queries/html/index.html", @@ -6,6 +6,4 @@ local spec = { { 10, 14, 10, 47 }, { 11, 16, 11, 39 }, }, -} - -require("tests.queries.runner").test(spec) +}) diff --git a/tests/queries/htmldjango_spec.lua b/tests/queries/htmldjango_spec.lua index 75f8196..c255b65 100644 --- a/tests/queries/htmldjango_spec.lua +++ b/tests/queries/htmldjango_spec.lua @@ -1,4 +1,4 @@ -local spec = { +require("tests.queries.runner").test({ name = "html", provider = "treesitter", file = "tests/queries/html/index.html", @@ -7,6 +7,4 @@ local spec = { { 10, 14, 10, 47 }, { 11, 16, 11, 39 }, }, -} - -require("tests.queries.runner").test(spec) +}) diff --git a/tests/queries/php_spec.lua b/tests/queries/php_spec.lua index 2293c72..3c9de37 100644 --- a/tests/queries/php_spec.lua +++ b/tests/queries/php_spec.lua @@ -1,4 +1,4 @@ -local spec = { +require("tests.queries.runner").test({ name = "php", provider = "treesitter", file = "tests/queries/php/index.php", @@ -6,6 +6,4 @@ local spec = { { 10, 14, 10, 47 }, { 11, 16, 11, 39 }, }, -} - -require("tests.queries.runner").test(spec) +}) diff --git a/tests/queries/svelte_spec.lua b/tests/queries/svelte_spec.lua index 3ee940e..7d41db4 100644 --- a/tests/queries/svelte_spec.lua +++ b/tests/queries/svelte_spec.lua @@ -1,4 +1,4 @@ -local spec = { +require("tests.queries.runner").test({ name = "svelte", provider = "treesitter", file = "tests/queries/svelte/test.svelte", @@ -7,6 +7,4 @@ local spec = { { 5, 14, 5, 41 }, { 8, 17, 8, 27 }, }, -} - -require("tests.queries.runner").test(spec) +}) diff --git a/tests/queries/tsx_spec.lua b/tests/queries/tsx_spec.lua index 38bef9f..423c242 100644 --- a/tests/queries/tsx_spec.lua +++ b/tests/queries/tsx_spec.lua @@ -1,4 +1,4 @@ -local spec = { +require("tests.queries.runner").test({ name = "tsx", provider = "treesitter", file = "tests/queries/tsx/Component.tsx", @@ -7,6 +7,4 @@ local spec = { { 9, 24, 9, 47 }, { 13, 33, 13, 45 }, }, -} - -require("tests.queries.runner").test(spec) +}) diff --git a/tests/queries/twig_spec.lua b/tests/queries/twig_spec.lua index 51b54d5..a4c21d8 100644 --- a/tests/queries/twig_spec.lua +++ b/tests/queries/twig_spec.lua @@ -1,4 +1,4 @@ -local spec = { +require("tests.queries.runner").test({ name = "twig", provider = "treesitter", file = "tests/queries/twig/test.twig", @@ -7,6 +7,4 @@ local spec = { { 1, 14, 1, 41 }, { 4, 17, 4, 27 }, }, -} - -require("tests.queries.runner").test(spec) +})