-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: extract mocks into separate module
- Loading branch information
1 parent
815f6cc
commit 2b44a40
Showing
3 changed files
with
45 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
export let templateSrvMock = { | ||
replace: jest.fn().mockImplementation(query => query) | ||
}; | ||
|
||
export let backendSrvMock = { | ||
datasourceRequest: jest.fn() | ||
}; | ||
|
||
export let datasourceSrvMock = { | ||
loadDatasource: jest.fn(), | ||
getAll: jest.fn() | ||
}; | ||
|
||
export let zabbixAlertingSrvMock = { | ||
setPanelAlertState: jest.fn(), | ||
removeZabbixThreshold: jest.fn(), | ||
}; | ||
|
||
const defaultExports = { | ||
templateSrvMock, | ||
backendSrvMock, | ||
datasourceSrvMock, | ||
zabbixAlertingSrvMock | ||
}; | ||
|
||
export default defaultExports; |