jest not contain element code example Example: jest expect not contain expect('some string').toEqual(expect.not.stringContaining('something else'))