Skip to content

Commit

Permalink
fix: force NODE_ENV=test when running the test command
Browse files Browse the repository at this point in the history
Closes #4794
  • Loading branch information
thetutlage committed Dec 5, 2024
1 parent ec313c2 commit 25a8d8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions commands/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ export default class Test extends BaseCommand {
* Runs tests
*/
async run() {
process.env.NODE_ENV = 'test'

const assembler = await importAssembler(this.app)
if (!assembler) {
this.#logMissingDevelopmentDependency('@adonisjs/assembler')
Expand Down Expand Up @@ -175,6 +177,9 @@ export default class Test extends BaseCommand {
files: suite.files,
}
}),
env: {
NODE_ENV: 'test',
},
metaFiles: this.app.rcFile.metaFiles,
})

Expand Down
4 changes: 3 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import { configPkg } from '@adonisjs/eslint-config'
export default configPkg()
export default configPkg({
ignores: ['coverage'],
})

0 comments on commit 25a8d8a

Please sign in to comment.