Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while setting up Adonis test environment #15

Open
manouman opened this issue Oct 1, 2023 · 0 comments
Open

Error while setting up Adonis test environment #15

manouman opened this issue Oct 1, 2023 · 0 comments

Comments

@manouman
Copy link

manouman commented Oct 1, 2023

Hey!
I just want to try this preset and I getting this error:

Error while setting up Adonis test environment

Exception: E_INVALID_ENV_VALUE: Value for environment variable "NODE_ENV" must be one of "development,production,test", instead received "testing"

 at ensureOneOf (test/node_modules/@adonisjs/env/build/src/Schema/oneOf.js:46:11)
    at Object.validate (test/node_modules/@adonisjs/env/build/src/Schema/oneOf.js:55:16)
    at test/node_modules/@adonisjs/env/build/src/Env/index.js:87:60
    at Array.forEach (<anonymous>)
    at Env.process (test/node_modules/@adonisjs/env/build/src/Env/index.js:86:44)
    at Application.loadEnvironmentVariables (test/node_modules/@adonisjs/application/build/src/Application.js:303:18)
    at Application.setup (test/node_modules/@adonisjs/application/build/src/Application.js:518:14)
    at AdonisEnvironment.createApplication (test/node_modules/adonis-jest/adonis-environment.js:35:17)
    at AdonisEnvironment.setup (test/node_modules/adonis-jest/adonis-environment.js:51:18)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runTestInternal (test/node_modules/jest-runner/build/runTest.js:361:5)
    at async runTest (test/node_modules/jest-runner/build/runTest.js:444:34)

I've installed @types/jest, adonis-jest, jest, ts-jest and also added

module.exports = {
  preset: 'adonis-jest',
}

My package.json script "test:unit": "jest --verbose ./tests/unit",

Should I need something else?

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant