Skip to content

Commit 2d4b492

Browse files
committed
Cleanup the PR one.
1 parent b49f29d commit 2d4b492

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

browser-extension/tests/lib/enhancers/github.test.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@ describe('github', () => {
99
usingHar('gh_pr').it('should identify gh_pr textarea and create proper spot object', async () => {
1010
const enhancers = new EnhancerRegistry()
1111
const textareas = document.querySelectorAll('textarea')
12-
13-
let enhanced: ReturnType<EnhancerRegistry['tryToEnhance']> = null
14-
for (const textarea of textareas) {
15-
enhanced = enhancers.tryToEnhance(textarea as HTMLTextAreaElement)
16-
if (enhanced) break
17-
}
18-
19-
expect(enhanced).toBeTruthy()
20-
expect(enhanced?.spot).toMatchInlineSnapshot(`
12+
expect(textareas.length).toBe(2)
13+
expect(enhancers.tryToEnhance(textareas[0]!)).toBeNull()
14+
expect(enhancers.tryToEnhance(textareas[1]!)?.spot).toMatchInlineSnapshot(`
2115
{
2216
"domain": "github.com",
2317
"number": 517,

0 commit comments

Comments
 (0)