mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
26 lines
786 B
TypeScript
26 lines
786 B
TypeScript
import {CodeOwnerFixture} from 'sentry-fixture/codeOwner';
|
|
|
|
import {render, screen} from 'sentry-test/reactTestingLibrary';
|
|
|
|
import ViewCodeOwnerModal from './viewCodeOwnerModal';
|
|
|
|
describe('ViewCodeOwnerModal', () => {
|
|
const mockComponent: any = ({children}) => <div>{children}</div>;
|
|
|
|
it('should display parsed codeowners file', () => {
|
|
const ownershipSyntax = `codeowners:/src/sentry/migrations/ #developer-infrastructure\n`;
|
|
render(
|
|
<ViewCodeOwnerModal
|
|
codeowner={CodeOwnerFixture({ownershipSyntax})}
|
|
closeModal={jest.fn()}
|
|
Header={mockComponent}
|
|
Footer={mockComponent}
|
|
Body={mockComponent}
|
|
CloseButton={mockComponent}
|
|
/>
|
|
);
|
|
|
|
expect(screen.getByRole('textbox')).toHaveValue(ownershipSyntax);
|
|
});
|
|
});
|