I had doubted that this had something to do with yarn.
I got the error to reproduce locally.
Did something like git bisect manually first.
Then just
rm yarn.lock
yarn
yarn test
And then the error went away.
So I speculate the problem is that greenkeeper-bot updates package.json but it does not update yarn.lock file. Which then makes our tests run on older versions of packages even though they are updated in package.json.
So I think the solution would be that if we are using yarn to run our tests in travis, we need to update yarn.lock file when greenkeeper updates our package.json.
I had doubted that this had something to do with yarn. I got the error to reproduce locally. Did something like
git bisect
manually first. Then justAnd then the error went away.
So I speculate the problem is that greenkeeper-bot updates package.json but it does not update yarn.lock file. Which then makes our tests run on older versions of packages even though they are updated in package.json. So I think the solution would be that if we are using yarn to run our tests in travis, we need to update yarn.lock file when greenkeeper updates our package.json.