Skip to content

Use runtime mode for testing#148

Open
NullVoxPopuli wants to merge 2 commits into
mainfrom
NullVoxPopuli-patch-3
Open

Use runtime mode for testing#148
NullVoxPopuli wants to merge 2 commits into
mainfrom
NullVoxPopuli-patch-3

Conversation

@NullVoxPopuli

@NullVoxPopuli NullVoxPopuli commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Copied from:

To better handle this error:

error during build:
[babel] tests/test-helper.ts: setTesting(true) cannot change the testing state in compile-time mode. The current global config has isTesting=false. setTesting() calls are compiled away at build time, so they cannot change the testing state. If you need to change the testing state at runtime, use runtime mode instead.
   9 |
  10 | export function start() {
> 11 |   setTesting(true);
     |   ^^^^^^^^^^^^^^^^
  12 |   setApplication(Application.create(config.APP));
  13 |   configureNrg();
  14 |

so, when preparing to run tests in the CLI, we need to tell babel we want either:

  • isTetsing to be true,
  • or: enable runtime mode so it can be changed

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

Successfully merging this pull request may close these issues.

1 participant