One extra use case for expect.stringContaining
is that it can be used in nested matchers:
it("tests with nested stringContaining", () => {
const o = {
x: "testerama"
};
expect(o).toMatchObject({
x: expect.stringContaining("test")
});
});