Boolean Assertions - dylanparry/ceylon GitHub Wiki

Table of Contents

  1. toBeTrue
  2. toBeFalse

toBeTrue

expect(item: boolean).toBeTrue(message?: string): this;

Asserts that the tested item is true.

Outputs optional message in case of a failed assertion.

Example

expect(2 + 2 === 4).toBeTrue();

expect(2 + 2 === 5).toBeTrue(); // Assertion Error

toBeFalse

expect(item: boolean).toBeFalse(message?: string): this;

Asserts that the tested item is false.

Outputs optional message in case of a failed assertion.

Example

expect(2 + 2 === 5).toBeFalse();

expect(2 + 2 === 4).toBeFalse(); // Assertion Error
⚠️ **GitHub.com Fallback** ⚠️