0

I can able to get custom message for failure expect in Jasmine. But i want to get custom message for pass expect also in Jasmine.

I used below code

expect(true).toBe(false,'To verify the icon');

Custom Message

Expected true to be false, 'To verify the icon'

But i need custom message for pass expect.

Sebastian Lenartowicz
  • 4,695
  • 4
  • 28
  • 39
Nagakesav
  • 1
  • 1

1 Answers1

1

There is no way to add a custom message to the actual expect You will need to wrap it in an it()

    it('can verify an icon', function() {
        expect(true).toBe(false);
    });
purplecabbage
  • 495
  • 3
  • 8