UNPKG

wdio-wait-for

Version:

a library of conditions that are useful for end-to-end tests

17 lines (16 loc) 413 B
/** * Negates the result of a promise * * @example * browser.waitUntil(not(alertIsPresent())); * * @param {!Function} expectedCondition The function to check * * @returns {!function} An expected condition that returns the negated value. */ export function not(expectedCondition) { return async function () { const result = await expectedCondition.call(this); return !result; }; }