• used to perform a [a, b, c] includes b or Set([a, b, c]) has b or Map([[a, aval], [b, bval]]) has b comparison between the expected and actual result like:

    const t = new AftTest('description', () => null);
    await t.verify(() => 'foobarbaz', containing('bar')); // succeeds
    await t.verify(() => [1, 2, 3, 4, 5, 6], containing(5)); // succeeds
    await t.verify(() => new Set([1, 2, 3, 4, 5, 6], containing(5)); // succeeds
    await t.verify(() => new Map([[5, 'five'], [6, 'six']]), containing(5)); // succeeds
    await t.verify(() => 'foo', containing('oof')); // fails
    await t.verify(() => new Map([[5, 'five'], [6, 'six']]), containing('five')); // fails
    await t.verify(() => ['foobarbaz','wolfhound','racecar'], containing('bar')); // succeeds

    Parameters

    • expected: any

      the expected value

    Returns ValueContaining

    a new ValueContaining instance

Generated using TypeDoc