jest-mongodb (npm run test) work well on local but not work on gitlab-ci, it was working suddenly it stopped working and show the following error.
file: jest.config.js
const merge = require('merge');
const ts_preset = require('ts-jest/jest-preset');
const jest_mongodb = require('@shelf/jest-mongodb/jest-preset');
module.exports = merge.recursive(ts_preset, jest_mongodb, {
globals: {
test_url: `http://${process.env.HOST || '127.0.0.1'}:${
process.env.PORT || 3000
}`,
},
preset: '@shelf/jest-mongodb',
setupFiles: ['dotenv/config'],
testPathIgnorePatterns: ['<rootDir>/__tests__/helpers'],
});
Log:
Error: Jest: Got error running
globalSetup - /builds/elo/elo-api/node_modules/@shelf/jest-mongodb/setup.js,
reason: Instance Exited before
being ready and without throwing an error!
