Skip to content
This repository was archived by the owner on Nov 25, 2021. It is now read-only.

Commit deea250

Browse files
ijsnowfelixfbecker
authored andcommitted
docs: add explanation for test util impl of code part
1 parent aed13ca commit deea250

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/testutils/dom.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ export interface CodeViewProps extends DOMFunctions {
4444

4545
// BEGIN setup test cases
4646

47+
// Abstract implemetation for GitHub and Sourcegraph. Could potentially be sufficient for any code host
48+
// but we may want to keep this as a configuration point.
4749
const getDiffCodePart = (codeElement: HTMLElement): 'new' | 'old' | undefined => {
4850
switch (codeElement.textContent!.charAt(0)) {
4951
case '+':

0 commit comments

Comments
 (0)