Closed jtupa closed 5 years ago
Yeah that .value() call appears to be no longer necessary and breaking everywhere it's used. I'll do a mass removal now.
Ah this has been fixed in master: https://github.com/admc/wd/blob/master/lib/asserters.js#L19
@jtupa & @admc This issue has been fixed, so we can close this ticket. Thanks.
After updating wd from version 1.9 to 1.10, the nonEmptyText is throwing a TypeError right after .trim().
var nonEmptyText = new Asserter( function (target, cb) { target.text(function(err, text) { if(err) { return cb(err); } var satisfied = text && _(text).trim().value().length >0; cb(null, satisfied, satisfied? text : undefined); }); } );
The arguments being passed in for "err" is null and for "text" is a valid string ("asdf"). I was expecting the execution to finish and the callback to be invoked, but that did not happen because of the TypeError.
Proposed Solution: remove calling ".value()"