to be defined

  • <any> to be defined

Asserts that the value is defined.

expect('Hello world!', 'to be defined');
expect({ foo: { bar: 'baz' } }, 'to be defined');

In case of a failing expectation you get the following output:

expect(undefined, 'to be defined');
expected undefined to be defined