UNPKG

detox

Version:

E2E tests and automation for mobile

16 lines (12 loc) 357 B
const _ = require('lodash'); function hasTimedOut(test) { const { errors } = test; const errorsArray = (_.isArray(errors) ? errors : [errors]); const timedOut = _.chain(errorsArray) .flattenDeep() .filter(_.isObject) .some(e => _.includes(e.message, 'Exceeded timeout')) .value(); return timedOut; } module.exports = hasTimedOut;