@wpazderski/playwright-utils
    Preparing search index...
    • Ensures that value is an Array or Set and contains an expected item.

      Usage

      const value = [1, 2, 3];
      expect(value).toContain(2);
      expect(new Set(value)).toContain(2);

      Parameters

      • internalOptions: MatcherInternalOptions

        Internal options that provide extra context for the matcher.

      • received: ContainIterable

        Received value.

      • expected: unknown

        Expected value in the collection.

      Returns void

    • Ensures that string value contains an expected substring. Comparison is case-sensitive.

      Usage

      const value = 'Hello, World';
      expect(value).toContain('World');
      expect(value).toContain(',');

      Parameters

      • internalOptions: MatcherInternalOptions

        Internal options that provide extra context for the matcher.

      • received: string

        Received value.

      • expected: string

        Expected substring.

      Returns void