all repos

gopher.nvim @ 8b3c68e38adac95e41f8e55606d9d9a6a549ca00

Minimalistic plugin for Go development

gopher.nvim/spec/gopher_utils_spec.lua(view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
describe("gopher._utils", function()
  it("can be requried", function()
    require "gopher._utils"
  end)

  it(".empty() with non-empty talbe", function()
    local empty = require("gopher._utils").empty
    local res = empty { first = "1", second = 2 }

    assert.are.same(res, false)
  end)

  it(".empty() with empty talbe", function()
    local empty = require("gopher._utils").empty
    local res = empty {}

    assert.are.same(res, true)
  end)
end)