mirror of
https://github.com/ansible/awx.git
synced 2026-05-06 17:07:36 -02:30
update path to useThrottle in tests
This commit is contained in:
@@ -8,7 +8,7 @@ import useWsJobs from './useWsJobs';
|
|||||||
Jest mock timers don’t play well with jest-websocket-mock,
|
Jest mock timers don’t play well with jest-websocket-mock,
|
||||||
so we'll stub out throttling to resolve immediately
|
so we'll stub out throttling to resolve immediately
|
||||||
*/
|
*/
|
||||||
jest.mock('./useThrottle', () => ({
|
jest.mock('../../util/useThrottle', () => ({
|
||||||
__esModule: true,
|
__esModule: true,
|
||||||
default: jest.fn(val => val),
|
default: jest.fn(val => val),
|
||||||
}));
|
}));
|
||||||
@@ -90,6 +90,7 @@ describe('useWsJobs hook', () => {
|
|||||||
mockServer.send(
|
mockServer.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
unified_job_id: 1,
|
unified_job_id: 1,
|
||||||
|
type: 'job',
|
||||||
status: 'successful',
|
status: 'successful',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -116,6 +117,7 @@ describe('useWsJobs hook', () => {
|
|||||||
mockServer.send(
|
mockServer.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
unified_job_id: 2,
|
unified_job_id: 2,
|
||||||
|
type: 'job',
|
||||||
status: 'running',
|
status: 'running',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user