Skip to content

Commit

Permalink
Sandbox run test/plugin_spec.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Oct 25, 2023
1 parent 22ee6ad commit a4cf9cf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/plugin_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ describe('Hurl.nvim plugin', function()
end)

it('should correctly create custom command', function()
utils.create_cmd('TestCommand', function() print('Test command') end, { desc = 'Test description' })
utils.create_cmd('TestCommand', function()
print('Test command')
end, { desc = 'Test description' })
assert.truthy(vim.fn.exists(':TestCommand'))
end)

Expand All @@ -57,7 +59,10 @@ describe('Hurl.nvim plugin', function()
it('should correctly render header table', function()
local headers = { ['Content-Type'] = 'application/json', ['Accept'] = 'application/json' }
local rendered_headers = utils.render_header_table(headers)
assert.are.same({ 'Content-Type | application/json', 'Accept | application/json' }, rendered_headers.headers)
assert.are.same(
{ 'Content-Type | application/json', 'Accept | application/json' },
rendered_headers.headers
)
end)

it('should correctly check if the response is json', function()
Expand Down

0 comments on commit a4cf9cf

Please sign in to comment.