Skip to content

Commit

Permalink
Hardcode env for tests #2281
Browse files Browse the repository at this point in the history
  • Loading branch information
onigoetz committed Feb 26, 2024
1 parent de4f8a5 commit 10d08b3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/crafty-preset-jest/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ import { normalizeJestOptions } from "@swissquote/crafty-preset-jest";
const crafty = await initialize(process.argv);
// Crafty configures its own environment for builds
// tests have different needs
process.env.NODE_ENV = "test";
const config = normalizeJestOptions(crafty, process.argv);
export default config;
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Generated by [AVA](https://avajs.dev).
const crafty = await initialize(process.argv);␊
// Crafty configures its own environment for builds␊
// tests have different needs␊
process.env.NODE_ENV = "test";␊
const config = normalizeJestOptions(crafty, process.argv);␊
export default config;␊
`
Expand Down Expand Up @@ -75,6 +79,10 @@ Generated by [AVA](https://avajs.dev).
const crafty = await initialize(process.argv);␊
// Crafty configures its own environment for builds␊
// tests have different needs␊
process.env.NODE_ENV = "test";␊
const config = normalizeJestOptions(crafty, process.argv);␊
export default config;␊
`
Expand Down
Binary file not shown.

0 comments on commit 10d08b3

Please sign in to comment.