node.js - Ako opraviť problém s jest a mongodb na gitlabe


jest-mongodb (npm run test) funguje dobre lokálne, ale na gitlab-ci nefunguje, fungovalo to a zrazu prestalo fungovať a zobrazilo nasledujúcu chybu.

súbor: 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'],
});

Denník :

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!

Prosím, môžete mi pomôcť?