Skip to content

Commit

Permalink
refactor: iniline spec
Browse files Browse the repository at this point in the history
  • Loading branch information
luckasRanarison committed Aug 1, 2024
1 parent 934d91f commit dfa3e97
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 36 deletions.
6 changes: 2 additions & 4 deletions tests/queries/astro_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local spec = {
require("tests.queries.runner").test({
name = "astro",
provider = "treesitter",
file = "tests/queries/astro/index.astro",
Expand All @@ -8,6 +8,4 @@ local spec = {
{ 7, 14, 7, 41 },
{ 9, 33, 9, 43 },
},
}

require("tests.queries.runner").test(spec)
})
6 changes: 2 additions & 4 deletions tests/queries/css_spec.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
local spec = {
require("tests.queries.runner").test({
name = "css",
provider = "treesitter",
file = "tests/queries/css/style.css",
ranges = {
{ 5, 9, 5, 34 },
{ 9, 9, 10, 37 },
},
}

require("tests.queries.runner").test(spec)
})
6 changes: 2 additions & 4 deletions tests/queries/heex_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local spec = {
require("tests.queries.runner").test({
name = "heex",
provider = "treesitter",
file = "tests/queries/heex/index.html.heex",
Expand All @@ -7,6 +7,4 @@ local spec = {
{ 1, 13, 1, 20 },
{ 2, 12, 5, 4 },
},
}

require("tests.queries.runner").test(spec)
})
6 changes: 2 additions & 4 deletions tests/queries/html_spec.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
local spec = {
require("tests.queries.runner").test({
name = "html",
provider = "treesitter",
file = "tests/queries/html/index.html",
ranges = {
{ 10, 14, 10, 47 },
{ 11, 16, 11, 39 },
},
}

require("tests.queries.runner").test(spec)
})
6 changes: 2 additions & 4 deletions tests/queries/htmldjango_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local spec = {
require("tests.queries.runner").test({
name = "html",
provider = "treesitter",
file = "tests/queries/html/index.html",
Expand All @@ -7,6 +7,4 @@ local spec = {
{ 10, 14, 10, 47 },
{ 11, 16, 11, 39 },
},
}

require("tests.queries.runner").test(spec)
})
6 changes: 2 additions & 4 deletions tests/queries/php_spec.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
local spec = {
require("tests.queries.runner").test({
name = "php",
provider = "treesitter",
file = "tests/queries/php/index.php",
ranges = {
{ 10, 14, 10, 47 },
{ 11, 16, 11, 39 },
},
}

require("tests.queries.runner").test(spec)
})
6 changes: 2 additions & 4 deletions tests/queries/svelte_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local spec = {
require("tests.queries.runner").test({
name = "svelte",
provider = "treesitter",
file = "tests/queries/svelte/test.svelte",
Expand All @@ -7,6 +7,4 @@ local spec = {
{ 5, 14, 5, 41 },
{ 8, 17, 8, 27 },
},
}

require("tests.queries.runner").test(spec)
})
6 changes: 2 additions & 4 deletions tests/queries/tsx_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local spec = {
require("tests.queries.runner").test({
name = "tsx",
provider = "treesitter",
file = "tests/queries/tsx/Component.tsx",
Expand All @@ -7,6 +7,4 @@ local spec = {
{ 9, 24, 9, 47 },
{ 13, 33, 13, 45 },
},
}

require("tests.queries.runner").test(spec)
})
6 changes: 2 additions & 4 deletions tests/queries/twig_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local spec = {
require("tests.queries.runner").test({
name = "twig",
provider = "treesitter",
file = "tests/queries/twig/test.twig",
Expand All @@ -7,6 +7,4 @@ local spec = {
{ 1, 14, 1, 41 },
{ 4, 17, 4, 27 },
},
}

require("tests.queries.runner").test(spec)
})

0 comments on commit dfa3e97

Please sign in to comment.