test: Move mocks to setup file
This moves all the mocks used throughout our test files into the test setup file.
This commit is contained in:
parent
79d54eed7b
commit
1554d78cba
25 changed files with 43 additions and 632 deletions
|
|
@ -3,26 +3,6 @@ import userEvent from '@testing-library/user-event';
|
|||
|
||||
import { renderWithReduxRouter } from '../../test/testUtils';
|
||||
|
||||
vi.mock('@redhat-cloud-services/frontend-components/useChrome', () => ({
|
||||
useChrome: () => ({
|
||||
isBeta: () => true,
|
||||
isProd: () => true,
|
||||
getEnvironment: () => 'stage',
|
||||
}),
|
||||
}));
|
||||
|
||||
vi.mock('@unleash/proxy-client-react', () => ({
|
||||
useUnleashContext: () => vi.fn(),
|
||||
useFlag: vi.fn((flag) => {
|
||||
switch (flag) {
|
||||
case 'image-builder.import.enabled':
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}),
|
||||
}));
|
||||
|
||||
const BLUEPRINT_JSON = `{
|
||||
"customizations": {
|
||||
"files": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue