mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
20 lines
538 B
TypeScript
20 lines
538 B
TypeScript
import {Component} from 'react';
|
|
import {OrganizationFixture} from 'sentry-fixture/organization';
|
|
import {ProjectFixture} from 'sentry-fixture/project';
|
|
|
|
const MOCK_ORG = OrganizationFixture();
|
|
const DEFAULTS = {
|
|
organization: MOCK_ORG,
|
|
organizations: [MOCK_ORG],
|
|
project: ProjectFixture(),
|
|
};
|
|
|
|
const withLatestContextMock = WrappedComponent =>
|
|
class WithLatestContextMockWrapper extends Component {
|
|
render() {
|
|
return <WrappedComponent {...DEFAULTS} {...this.props} />;
|
|
}
|
|
};
|
|
|
|
export default withLatestContextMock;
|