-
Notifications
You must be signed in to change notification settings - Fork 1
/
tests.lua
47 lines (40 loc) · 1.31 KB
/
tests.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
local describe = require("least")
describe("least lets you organize your tests by suite",function(_ENV)
describe("least supports sub-suites and sub-suites with sub-suites, and so on",function()
it("has basic assertions",function()
assert(true)
end)
it("supports truthy/falsey/nil checks",function()
assert.truthy(true)
assert.falsey(false)
assert.falsey(nil)
assert.isNil(nil)
end)
it.should.fail("when truthy is given a false value",function()
assert.truthy(false)
end)
it.should.fail("when truthy is given a nil value",function()
assert.truthy(nil)
end)
it.should.fail("when isNil is given a false value",function()
assert.isNil(false)
end)
it.should.fail("when isNil is given a true value",function()
assert.isNil(true)
end)
end)
suite("another suite",function()
test("test 3",function()
assert(true)
end)
test("test 4",function()
assert(true)
end)
end)
test("test 5",function()
assert(true)
end)
test("test 6",function()
assert(true)
end)
end)