@@ -6,17 +6,20 @@ import type { Config } from "./types";
6
6
describe ( "normalizeConfig" , ( ) => {
7
7
it ( "uses default strategy = merge when not provided" , async ( ) => {
8
8
const result = await normalizeConfig ( { } ) ;
9
- expect ( result . rules . default ) . toEqual ( [ "merge" ] ) ;
9
+ expect ( result . rules . default ) . toEqual ( [ { name : "merge" , important : false } ] ) ;
10
10
} ) ;
11
11
12
12
it ( "accepts single default strategy" , async ( ) => {
13
13
const result = await normalizeConfig ( { defaultStrategy : "replace" } ) ;
14
- expect ( result . rules . default ) . toEqual ( [ "replace" ] ) ;
14
+ expect ( result . rules . default ) . toEqual ( [ { name : "replace" , important : false } ] ) ;
15
15
} ) ;
16
16
17
17
it ( "accepts multiple default strategies" , async ( ) => {
18
18
const result = await normalizeConfig ( { defaultStrategy : [ "merge" , "replace" ] } ) ;
19
- expect ( result . rules . default ) . toEqual ( [ "merge" , "replace" ] ) ;
19
+ expect ( result . rules . default ) . toEqual ( [
20
+ { name : "merge" , important : false } ,
21
+ { name : "replace" , important : false } ,
22
+ ] ) ;
20
23
} ) ;
21
24
22
25
it ( "classifies rules from byStrategy into exactFields" , async ( ) => {
@@ -100,21 +103,6 @@ describe("normalizeConfig", () => {
100
103
] ) ;
101
104
} ) ;
102
105
103
- it ( "applies include/exclude defaults" , async ( ) => {
104
- const result = await normalizeConfig ( { } ) ;
105
- expect ( result . include ) . toContain ( "**/*" ) ;
106
- expect ( result . exclude ) . toContain ( "node_modules/**" ) ;
107
- } ) ;
108
-
109
- it ( "uses provided include/exclude" , async ( ) => {
110
- const result = await normalizeConfig ( {
111
- include : [ "src/**" ] ,
112
- exclude : [ "dist/**" ] ,
113
- } ) ;
114
- expect ( result . include ) . toEqual ( [ "src/**" ] ) ;
115
- expect ( result . exclude ) . toEqual ( [ "dist/**" ] ) ;
116
- } ) ;
117
-
118
106
it ( "fileFilter includes allowed files and excludes others" , async ( ) => {
119
107
const result = await normalizeConfig ( {
120
108
include : [ "src/**" ] ,
0 commit comments