Shouldn't this be `if(options.reportPending && stats.pending.length > 0) { ` ? (note the `.length`)

Also to keep the style idiomatic this should use a arrow function: `pending.forEach((test, num) => {`