aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mason-core/functional
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mason-core/functional')
-rw-r--r--tests/mason-core/functional/function_spec.lua18
-rw-r--r--tests/mason-core/functional/list_spec.lua4
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/mason-core/functional/function_spec.lua b/tests/mason-core/functional/function_spec.lua
index 8c4b41ef..4da41d40 100644
--- a/tests/mason-core/functional/function_spec.lua
+++ b/tests/mason-core/functional/function_spec.lua
@@ -28,7 +28,7 @@ describe("functional: function", function()
end)
it("coalesces first non-nil value", function()
- assert.equal("Hello World!", _.coalesce(nil, nil, "Hello World!", ""))
+ assert.equals("Hello World!", _.coalesce(nil, nil, "Hello World!", ""))
end)
it("should compose functions", function()
@@ -54,7 +54,7 @@ describe("functional: function", function()
end)
it("should not allow composing no functions", function()
- local e = assert.error(function()
+ local e = assert.has_error(function()
_.compose()
end)
assert.equals("compose requires at least one function", e)
@@ -79,9 +79,9 @@ describe("functional: function", function()
return s
end)
local memoized_fn = _.memoize(expensive_function)
- assert.equal("key", memoized_fn "key")
- assert.equal("key", memoized_fn "key")
- assert.equal("new_key", memoized_fn "new_key")
+ assert.equals("key", memoized_fn "key")
+ assert.equals("key", memoized_fn "key")
+ assert.equals("new_key", memoized_fn "new_key")
assert.spy(expensive_function).was_called(2)
end)
@@ -92,9 +92,9 @@ describe("functional: function", function()
local memoized_fn = _.memoize(expensive_function, function(arg1, arg2)
return arg1 .. arg2
end)
- assert.equal("key1key2", memoized_fn("key1", "key2"))
- assert.equal("key1key2", memoized_fn("key1", "key2"))
- assert.equal("key1key3", memoized_fn("key1", "key3"))
+ assert.equals("key1key2", memoized_fn("key1", "key2"))
+ assert.equals("key1key2", memoized_fn("key1", "key2"))
+ assert.equals("key1key3", memoized_fn("key1", "key3"))
assert.spy(expensive_function).was_called(2)
end)
@@ -120,7 +120,7 @@ describe("functional: function", function()
end)
local a, b = lazy_fn()
assert.is_nil(a)
- assert.equal(2, b)
+ assert.equals(2, b)
end)
it("should provide identity value", function()
diff --git a/tests/mason-core/functional/list_spec.lua b/tests/mason-core/functional/list_spec.lua
index ce0c285f..029396e3 100644
--- a/tests/mason-core/functional/list_spec.lua
+++ b/tests/mason-core/functional/list_spec.lua
@@ -11,7 +11,7 @@ describe("functional: list", function()
local list = { "BLUE", { nested = "TABLE" }, "RED" }
local list_copy = _.list_copy(list)
assert.same({ "BLUE", { nested = "TABLE" }, "RED" }, list_copy)
- assert.is_not.is_true(list == list_copy)
+ assert.is_false(list == list_copy)
assert.is_true(list[2] == list_copy[2])
end)
@@ -65,7 +65,7 @@ describe("functional: list", function()
return item == "Waldo"
end)
- assert.equal(
+ assert.equals(
"Waldo",
_.find_first(predicate, {
"Where",