|
1 | 1 | import { beforeEach, describe, expect, it, vi } from 'vitest' |
2 | | -import { EnhancerRegistry, TextareaRegistry } from '../../../src/lib/registries' |
| 2 | +import { EnhancerRegistry } from '../../../src/lib/registries' |
3 | 3 |
|
4 | 4 | // Mock WXT's defineContentScript global |
5 | 5 | vi.stubGlobal('defineContentScript', vi.fn()) |
6 | 6 |
|
7 | 7 | describe('GitHubHandler', () => { |
8 | 8 | let enhancers: EnhancerRegistry |
9 | | - let _enhancedTextareas: TextareaRegistry |
10 | 9 | let mockTextarea: HTMLTextAreaElement |
11 | 10 |
|
12 | 11 | beforeEach(() => { |
13 | 12 | // Reset DOM and registries for each test |
14 | 13 | document.body.innerHTML = '' |
15 | 14 | enhancers = new EnhancerRegistry() |
16 | | - _enhancedTextareas = new TextareaRegistry() |
17 | 15 |
|
18 | 16 | // Mock window.location for GitHub PR page |
19 | 17 | Object.defineProperty(window, 'location', { |
@@ -55,13 +53,10 @@ describe('GitHubHandler', () => { |
55 | 53 | }) |
56 | 54 |
|
57 | 55 | it('should create correct GitHubContext spot for PR comment', () => { |
58 | | - const _enhancedTextarea = enhancers.tryToEnhance(mockTextarea) |
59 | | - |
| 56 | + // const _enhancedTextarea = enhancers.tryToEnhance(mockTextarea) |
60 | 57 | // expect(enhancedTextarea).toBeTruthy() |
61 | | - |
62 | 58 | // Snapshot test on the spot value |
63 | 59 | // expect(enhancedTextarea?.spot).toMatchSnapshot('github-pr-517-spot') |
64 | | - |
65 | 60 | // Also verify specific expected values |
66 | 61 | // expect(enhancedTextarea?.spot).toMatchObject({ |
67 | 62 | // domain: 'github.com', |
|
0 commit comments