* Run the console command provided, if the environments logging level greater than the * provided logging level. * * The loadCommand takes in a function which is called to retrieve the console.* function * to allow for jasmine spies to still work in testing. Without this method of retrieval *
(loadCommand: () => Function, logLevel: LogLevel, ...text: unknown[])
| 83 | * function before jasmine can spy. |
| 84 | */ |
| 85 | function runConsoleCommand(loadCommand: () => Function, logLevel: LogLevel, ...text: unknown[]) { |
| 86 | if (getLogLevel() >= logLevel) { |
| 87 | loadCommand()(...text); |
| 88 | } |
| 89 | appendToLogFile(logLevel, ...text); |
| 90 | } |
| 91 | |
| 92 | /** |
| 93 | * Retrieve the log level from environment variables, if the value found |
no test coverage detected