Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoshihou514 committed Dec 8, 2024
1 parent 3fc9473 commit 28178eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions test/formatter/biome_spec.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
describe('biome', function()
it('can format json', function()
local ft = require('guard.filetype')
ft('json'):fmt('biome')

local formatted = require('test.formatter.helper').test_with('json', {
[[{"name": "dove" , "age":10 ]],
Expand Down
6 changes: 3 additions & 3 deletions test/linter/helper.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local M = {}
local api = vim.api
require('guard.lint')
local lint = require('guard.lint')
M.namespace = api.nvim_get_namespaces().Guard

function M.test_with(ft, input)
Expand All @@ -12,8 +12,8 @@ function M.test_with(ft, input)
api.nvim_buf_set_lines(bufnr, 0, -1, false, input)
-- To make linters happy
vim.cmd('silent! write! /tmp/test.' .. ft)
require('guard.lint').do_lint(bufnr)
vim.wait(3000)
lint.do_lint(bufnr)
vim.wait(5000)
return vim.diagnostic.get(bufnr)
end

Expand Down

0 comments on commit 28178eb

Please sign in to comment.