* 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 | * the console.* function, the function is saved into the closure of the created logging |
| 84 | * function before jasmine can spy. |
| 85 | */ |
| 86 | function runConsoleCommand(loadCommand: () => Function, logLevel: LogLevel, ...text: unknown[]) { |
| 87 | if (getLogLevel() >= logLevel) { |
| 88 | loadCommand()(...text); |
| 89 | } |
| 90 | appendToLogFile(logLevel, ...text); |
| 91 | } |
| 92 | |
| 93 | /** |
no test coverage detected