export function assertStringArrayContainsString()

in src/assert.ts [56:79]


export function assertStringArrayContainsString(
  name: string,
  actual: unknown,
  expected: string | string[],
  errorConstructor: AssertionErrorConstructor = FailedAssertionError
): void {
  if (!actual) {
    throw new errorConstructor(
      `Missing ${name}. ${expectationMessage(expected)}`,

      actual,
      expected
    );
  }
  if (typeof actual !== "string") {
    throw new errorConstructor(
      `${name} is not of type string`,

      actual,
      expected
    );
  }
  return assertStringArraysOverlap(name, actual, expected, errorConstructor);
}