💼 This rule is enabled in the ✅ recommended
config.
🔧 This rule is automatically fixable by the --fix
CLI option.
The boolean assertion functions assert.true()
and assert.false()
are available as of QUnit 2.11. These assertions can be stricter and clearer about intent when compared to using other assertion functions for boolean comparisons.
The following patterns are considered warnings:
QUnit.test('Name', function (assert) { assert.equal(a, true); });
QUnit.test('Name', function (assert) { assert.strictEqual(a, true); });
QUnit.test('Name', function (assert) { assert.deepEqual(false, a); });
The following patterns are not considered warnings:
QUnit.test('Name', function (assert) { assert.true(a); });
QUnit.test('Name', function (assert) { assert.false(a); });