Pages
Standard Library
Search
Entities
Test.Context
Functions
Asserts the equality of the current value of the test with the given one.
test {
Test.Context.of(5)
|> Test.Context.assertEqual(5)
}
Asserts that a given spy (function) was called.
Asserts that a given spy (function) was not called.
Asserts if the given value equals of the returned value from the given function.
test {
Test.Context.of(5)
|> Test.Context.assertOf("5", Number.toString)
}
Maps the given subject to a new subject.
test {
Test.Context.of(5)
|> Test.Context.map(Number.toString)
}
Starts a test using the given value.
test {
Test.Context.of(5)
|> assertEqual(5)
}
Spies on the given entity if it's a function.
Adds a transformation step to the test.
test {
Test.Context.of(5)
|> Test.Context.then((number : Number) { Promise.resolve(number + 2) })
|> Test.Context.assertEqual(7)
}
Adds a timeout to the test using the given duration (in milliseconds).
test {
Test.Context.of(5)
|> Test.Context.timeout(1000)
|> Test.Context.assertEqual(5)
}