@@ -8,12 +8,8 @@ test('defines a valid Oxlint config', () => {
88 let config = defineConfig ( ) ;
99
1010 expectTypeOf ( config ) . toEqualTypeOf < OxlintConfig > ( ) ;
11- expectTypeOf ( defineOxlintConfig ( config ) ) . toEqualTypeOf <
12- ReturnType < typeof defineOxlintConfig >
13- > ( ) ;
14- expectTypeOf ( defineViteConfig ( { lint : config } ) ) . toEqualTypeOf <
15- ReturnType < typeof defineViteConfig >
16- > ( ) ;
11+ expectTypeOf ( defineOxlintConfig ) . toBeCallableWith ( config ) ;
12+ expectTypeOf ( defineViteConfig ) . toBeCallableWith ( { lint : config } ) ;
1713
1814 config = defineConfig ( {
1915 ignorePatterns : [ 'fixtures/**' ] ,
@@ -23,24 +19,16 @@ test('defines a valid Oxlint config', () => {
2319 } ) ;
2420
2521 expectTypeOf ( config ) . toEqualTypeOf < OxlintConfig > ( ) ;
26- expectTypeOf ( defineOxlintConfig ( config ) ) . toEqualTypeOf <
27- ReturnType < typeof defineOxlintConfig >
28- > ( ) ;
29- expectTypeOf ( defineViteConfig ( { lint : config } ) ) . toEqualTypeOf <
30- ReturnType < typeof defineViteConfig >
31- > ( ) ;
22+ expectTypeOf ( defineOxlintConfig ) . toBeCallableWith ( config ) ;
23+ expectTypeOf ( defineViteConfig ) . toBeCallableWith ( { lint : config } ) ;
3224} ) ;
3325
3426test ( 'supports the `react` option' , ( ) => {
3527 let config = defineConfig ( { react : true } ) ;
3628
3729 expectTypeOf ( config ) . toEqualTypeOf < OxlintConfig > ( ) ;
38- expectTypeOf ( defineOxlintConfig ( config ) ) . toEqualTypeOf <
39- ReturnType < typeof defineOxlintConfig >
40- > ( ) ;
41- expectTypeOf ( defineViteConfig ( { lint : config } ) ) . toEqualTypeOf <
42- ReturnType < typeof defineViteConfig >
43- > ( ) ;
30+ expectTypeOf ( defineOxlintConfig ) . toBeCallableWith ( config ) ;
31+ expectTypeOf ( defineViteConfig ) . toBeCallableWith ( { lint : config } ) ;
4432
4533 config = defineConfig ( {
4634 react : true ,
@@ -51,10 +39,6 @@ test('supports the `react` option', () => {
5139 } ) ;
5240
5341 expectTypeOf ( config ) . toEqualTypeOf < OxlintConfig > ( ) ;
54- expectTypeOf ( defineOxlintConfig ( config ) ) . toEqualTypeOf <
55- ReturnType < typeof defineOxlintConfig >
56- > ( ) ;
57- expectTypeOf ( defineViteConfig ( { lint : config } ) ) . toEqualTypeOf <
58- ReturnType < typeof defineViteConfig >
59- > ( ) ;
42+ expectTypeOf ( defineOxlintConfig ) . toBeCallableWith ( config ) ;
43+ expectTypeOf ( defineViteConfig ) . toBeCallableWith ( { lint : config } ) ;
6044} ) ;
0 commit comments