isTestRunning static method

bool isTestRunning()

Checks if the application is running in test mode.

This method determines if the current execution environment is a test environment by checking the FINCH_IS_TEST environment variable. When running tests, certain logging and debugging features may be disabled to avoid interference with test output.

Returns true if the application is running in test mode, false otherwise.

Example usage:

if (!Console.isTestRunning()) {
  Console.i('Application started in development mode');
}

Implementation

static bool isTestRunning() {
  return Platform.environment['FINCH_IS_TEST'] == 'true';
}