File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
browser-extension/tests/lib/enhancers Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments