aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/jsx_spec.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-06-12 09:54:30 -0600
committerChristian Clason <c.clason@uni-graz.at>2025-05-12 18:43:40 +0200
commit692b051b09935653befdb8f7ba8afdb640adf17b (patch)
tree167162b6b129ae04f68c5735078521a72917c742 /tests/indent/jsx_spec.lua
parentfeat(c-family): inherit injections (diff)
downloadnvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.gz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.bz2
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.lz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.xz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.zst
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.zip
feat!: drop modules, general refactor and cleanup
Diffstat (limited to 'tests/indent/jsx_spec.lua')
-rw-r--r--tests/indent/jsx_spec.lua38
1 files changed, 22 insertions, 16 deletions
diff --git a/tests/indent/jsx_spec.lua b/tests/indent/jsx_spec.lua
index e75b21f4f..7a32dbcc4 100644
--- a/tests/indent/jsx_spec.lua
+++ b/tests/indent/jsx_spec.lua
@@ -1,43 +1,49 @@
-local Runner = require("tests.indent.common").Runner
-local runner = Runner:new(it, "tests/indent/jsx", {
+local Runner = require('tests.indent.common').Runner
+local runner = Runner:new(it, 'tests/indent/jsx', {
tabstop = 2,
shiftwidth = 2,
expandtab = true,
- filetype = "jsx",
+ filetype = 'jsx',
})
-describe("indent JSX Elements:", function()
- describe("whole file:", function()
- runner:whole_file(".", {
+describe('indent JSX Elements:', function()
+ describe('whole file:', function()
+ runner:whole_file('.', {
expected_failures = {},
})
end)
- describe("new line:", function()
- for _, info in ipairs {
+ describe('new line:', function()
+ for _, info in ipairs({
{ 5, 8 },
{ 6, 6 },
{ 7, 6 },
{ 8, 4 },
{ 9, 2 },
- } do
- runner:new_line("issue-3986.jsx", { on_line = info[1], text = "text", indent = info[2] })
+ }) do
+ runner:new_line('issue-3986.jsx', { on_line = info[1], text = 'text', indent = info[2] })
end
- for _, info in ipairs {
+ for _, info in ipairs({
{ 4, 8 },
{ 6, 10 },
{ 9, 8 },
{ 11, 8 },
- } do
- runner:new_line("element_attributes.jsx", { on_line = info[1], text = "disabled", indent = info[2] })
+ }) do
+ runner:new_line(
+ 'element_attributes.jsx',
+ { on_line = info[1], text = 'disabled', indent = info[2] }
+ )
end
- for _, info in ipairs {
+ for _, info in ipairs({
{ 5, 10 },
{ 7, 8 },
{ 11, 10 },
- } do
- runner:new_line("jsx_expression.jsx", { on_line = info[1], text = "{disabled}", indent = info[2] })
+ }) do
+ runner:new_line(
+ 'jsx_expression.jsx',
+ { on_line = info[1], text = '{disabled}', indent = info[2] }
+ )
end
end)
end)