zazoomauro / node-dependency-injection

The NodeDependencyInjection component allows you to standarize and centralize the way objects are constructed in your application.
https://github.com/zazoomauro/node-dependency-injection/wiki
MIT License
280 stars 34 forks source link

Vitest compatibility #209

Closed ManuPerezDev closed 5 months ago

ManuPerezDev commented 8 months ago

We are trying to run our project with node-dependency-injection and Vitest.

Our tests fails once we need to load yaml files when we start the application to run e2e tests.

image

Any idea of what could be happening?

We are using:

ManuPerezDev commented 8 months ago

We manually registering the services and It works but the yaml loader does not.

zazoomauro commented 8 months ago

@ManuPerezDev can you provide the configuration?

AlejandroPerez92 commented 8 months ago

Do you only encounter the error with Vitest? I have a similar issue in a Nuxt3 project, I have only managed to get it working by registering the services in TypeScript.