testing.assertMatches() function
testing.assertMatches()
tests whether a string matches a given regex.
Function type signature
(got: string, want: regexp) => stream[{v: string, _diff: string}]
Parameters
got
(Required) Value to test.
want
(Required) Regex to test against.
Examples
Test if two values are equal
import "internal/testing"
testing.assertMatches(got: "123", want: /12/)
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.