Git Product home page Git Product logo

Comments (6)

asciidisco avatar asciidisco commented on September 3, 2024 24

We use it with a Typescript setup, our jest.config.js looks like this:

const { defaults: tsjPreset } = require('ts-jest/presets')

module.exports = {
  preset: '@shelf/jest-mongodb',
  // ...some other non related config values...
  transform: tsjPreset.transform,
}

// EDIT: But as you see, we're not using babel, so you might need to configure ts-jest differently, in order to pick up your babel preset: Maybe this helps - https://kulshekhar.github.io/ts-jest/user/config/babelConfig

from jest-mongodb.

chanced avatar chanced commented on September 3, 2024 2

@francesco-albanese You left this issue open. Sounds like you should be able to close it.

from jest-mongodb.

Arcanorum avatar Arcanorum commented on September 3, 2024 1

I was having same error on Ubuntu 22, i just tried with a different OS like windows and it worked.

Probably related: #351

from jest-mongodb.

francesco-albanese avatar francesco-albanese commented on September 3, 2024

Actually I copy pasted the stuff about babel from another project, this is a node project strictly so there is no need to use babel-jest.

I replaced the configuration with this:

const { defaults: tsjPreset } = require('ts-jest/presets')

module.exports = {
  transform: tsjPreset.transform,
  rootDir: './lib',
  roots: ['<rootDir>'],
  moduleFileExtensions: ['ts', 'js', 'json', 'node'],
  preset: "@shelf/jest-mongodb"
};

but still does not work. Keeps on saying "Determining test suites to run..."

from jest-mongodb.

francesco-albanese avatar francesco-albanese commented on September 3, 2024

Never mind, it was just the Docker image node:alpine which apparently is not compatible with mongodb-memory-server

from jest-mongodb.

gervasioartur avatar gervasioartur commented on September 3, 2024

I was having same error on Ubuntu 22, i just tried with a different OS like windows and it worked.

from jest-mongodb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.