assert.contains

Asserts that `haystack` contains `needle` as a substring.

Reference version

Signature

function assert.contains(haystack: string, needle: string) -> void

Asserts that haystack contains needle as a substring.

Parameters

  • haystack: The string to search within.
  • needle: The substring to search for.

Panics

  • baml.panics.AssertionFailed when haystack does not contain needle as a substring.

Source:<builtin>/assert/assert.bamlbytes 33103570