@@ -5,20 +5,21 @@ import path from "node:path";
5
5
6
6
export const matrix = [ [ "solid" , "react" , "vue" ] , [ "tailwindcss" , "daisyui" , "panda-css" ] , "eslint" ] ;
7
7
8
- await describeBati ( ( { test, expect, fetch, context } ) => {
8
+ await describeBati ( ( { test, expect, fetch, testMatch , context } ) => {
9
9
test ( "home" , async ( ) => {
10
10
const res = await fetch ( "/" ) ;
11
11
expect ( res . status ) . toBe ( 200 ) ;
12
12
expect ( await res . text ( ) ) . not . toContain ( '{"is404":true}' ) ;
13
13
} ) ;
14
14
15
- test ( "daisyui" , async ( ) => {
16
- const content = await readFile ( "tailwind.config.ts" , "utf-8" ) ;
17
- expect ( content . includes ( "daisyui" ) ) . toBe ( context . flags . includes ( "daisyui" ) ) ;
18
- } ) ;
19
-
20
- test ( "panda-css" , async ( ) => {
21
- expect ( existsSync ( path . join ( process . cwd ( ) , "panda.config.ts" ) ) ) . toBe ( true ) ;
22
- expect ( existsSync ( path . join ( process . cwd ( ) , "layouts" , "panda.css" ) ) ) . toBe ( true ) ;
15
+ testMatch < typeof matrix > ( "config exists" , {
16
+ daisyui : async ( ) => {
17
+ const content = await readFile ( "tailwind.config.ts" , "utf-8" ) ;
18
+ expect ( content . includes ( "daisyui" ) ) . toBe ( context . flags . includes ( "daisyui" ) ) ;
19
+ } ,
20
+ "panda-css" : async ( ) => {
21
+ expect ( existsSync ( path . join ( process . cwd ( ) , "panda.config.ts" ) ) ) . toBe ( true ) ;
22
+ expect ( existsSync ( path . join ( process . cwd ( ) , "layouts" , "panda.css" ) ) ) . toBe ( true ) ;
23
+ } ,
23
24
} ) ;
24
25
} ) ;
0 commit comments