File tree Expand file tree Collapse file tree 3 files changed +25
-45
lines changed
Expand file tree Collapse file tree 3 files changed +25
-45
lines changed Original file line number Diff line number Diff line change 1+ import { vi } from 'vitest'
2+
3+ // Mock the OverType editor component
4+ vi . mock ( '../src/overtype/overtype' , ( ) => {
5+ const mockConstructor = vi . fn ( ) . mockImplementation ( ( ) => [
6+ {
7+ container : document . createElement ( 'div' ) ,
8+ destroy : vi . fn ( ) ,
9+ focus : vi . fn ( ) ,
10+ getValue : vi . fn ( ( ) => '' ) ,
11+ preview : document . createElement ( 'div' ) ,
12+ setValue : vi . fn ( ) ,
13+ textarea : document . createElement ( 'textarea' ) ,
14+ wrapper : document . createElement ( 'div' ) ,
15+ } ,
16+ ] )
17+ ; ( mockConstructor as any ) . setCodeHighlighter = vi . fn ( )
18+ return {
19+ default : mockConstructor ,
20+ }
21+ } )
22+
123import { describe as baseDescribe , test as baseTest , expect } from 'vitest'
224import type { PAGES } from './har-index'
325import { cleanupDOM , setupHarDOM } from './test-utils'
Original file line number Diff line number Diff line change 1- import { setupCommonMocks } from '../../mock-setup '
1+ import { describe , expect , usingHar } from '../../fixture-har '
22
3- setupCommonMocks ( )
3+ // must import fixture **first** for mocks, the `expect` keeps biome from changing sort-order
4+ expect
45
56import { EnhancerRegistry } from '../../../src/lib/registries'
6- import { describe , expect , usingHar } from '../../test-fixtures'
77
88describe ( 'github' , ( ) => {
99 usingHar ( 'gh_pr' ) . it ( 'should identify gh_pr textarea and create proper spot object' , async ( ) => {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments