Description

NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element.

assert.NotContains(t, "Hello World", "Earth", "But 'Hello World' does NOT contain 'Earth'")
assert.NotContains(t, ["Hello", "World"], "Earth", "But ['Hello', 'World'] does NOT contain 'Earth'")
assert.NotContains(t, {"Hello": "World"}, "Earth", "But {'Hello': 'World'} does NOT contain 'Earth'")

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

NotContains is referenced in 90 repositories

github.com/stretchr/testify github.com/mkboudreau/loggo github.com/Team254/cheesy-arena

...