skip to Main Content

Jest testing a service that uses Neo4J and MongoDb returns error: "TypeError: Cannot read properties of undefined (reading 'inspectModules')"

I have a service that runs a query to Mongodb and Neo4j. The create method runs two methods: "CreateUserInMongoDB" and "CreateUserInNeo4j". The code is provided below: export class UserService { constructor( @InjectModel('User') private readonly userModel: Model<UserDocument>, @InjectModel('SportEvent') private readonly sportEventModel:…

VIEW QUESTION

Error 'Cannot use import statement outside a module ' while testing in Vite – Reactjs

I am working in a Vite project, my goal is to be able to write tests. So I setup Jest and Babel and write a test, but I'm getting an error like this: C:UsersjoaovOneDriveDev ProjetosProjetos pessoaiscsgo-e-commercenode_modulesfirebaseappdistindex.esm.js:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import { registerVersion }…

VIEW QUESTION
Back To Top
Search