chore: simplify toBeChecked for language ports

This commit is contained in:
Max Schmitt 2025-01-30 13:12:06 +01:00
parent 833c729eb0
commit c3b35973db

View file

@ -1291,7 +1291,7 @@ export class InjectedScript {
} else if (expression === 'to.be.checked') {
const { checked, indeterminate } = options.expectedValue;
if (indeterminate) {
if (checked !== undefined)
if (typeof checked === 'boolean')
throw this.createStacklessError('Can\'t assert indeterminate and checked at the same time');
result = this.elementState(element, 'indeterminate');
} else {