Description

Contains asserts that the specified string or list(array, slice...) contains the specified substring or element.

assert.Contains(t, "Hello World", "World", "But 'Hello World' does contain 'World'")
assert.Contains(t, ["Hello", "World"], "World", "But ["Hello", "World"] does contain 'World'")

Returns whether the assertion was successful (true) or not (false).

Contains is referenced in 0 repositories