Created
November 25, 2019 21:23
-
-
Save bobsilverberg/8c9c348848c7c830920f87f406a797bf to your computer and use it in GitHub Desktop.
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
// Props of the <DiffView> component: | |
type DiffProps = { | |
children: (hunks: HunkInfo[]) => ReactNode; | |
className?: string; | |
diffType: string; | |
hunks: Hunks; | |
tokens?: Tokens; | |
viewType: ViewType; | |
gutterType?: 'default' | 'anchor' | 'none'; | |
generateAnchorID?: (change: ChangeInfo) => string; | |
selectedChanges?: string[]; | |
widgets?: WidgetMap; | |
renderGutter?: RenderGutter; | |
}; | |
// Test code | |
const root = renderWithLinterProvider({ diff }); | |
const { renderGutter } = root.find(Diff).props(); | |
const gutter = shallow(renderGutter()); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment