mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 10:20:29 -06:00
setRunRequest: Allow changing multiple times from tests (#75346)
setRunRequest: Allow changing multiple time from tests
This commit is contained in:
parent
11d2938387
commit
f4de29dd87
@ -48,7 +48,7 @@ let runRequest: RunRequestFn | undefined;
|
||||
* @internal
|
||||
*/
|
||||
export function setRunRequest(fn: RunRequestFn): void {
|
||||
if (runRequest) {
|
||||
if (runRequest && process.env.NODE_ENV !== 'test') {
|
||||
throw new Error('runRequest function should only be set once, when Grafana is starting.');
|
||||
}
|
||||
runRequest = fn;
|
||||
|
Loading…
Reference in New Issue
Block a user