@@ -19,6 +19,7 @@ test.group('vite-plugin-validate-env', (group) => {
1919
2020 await fs . add ( `.env.development` , `VITE_TEST=not boolean` )
2121
22+ // @ts -expect-error - `config` is the handler
2223 const fn = plugin . config ! . bind ( plugin , viteConfig , viteEnvConfig )
2324 await assert . rejects (
2425 fn ,
@@ -33,6 +34,7 @@ test.group('vite-plugin-validate-env', (group) => {
3334
3435 await fs . add ( `.env.development` , `VITE_TEST=not boolean` )
3536
37+ // @ts -expect-error - `config` is the handler
3638 const fn = plugin . config ! . bind ( plugin , viteConfig , viteEnvConfig )
3739 await assert . rejects ( fn , 'E_INVALID_ENV_VALUE: Heyhey' )
3840 } )
@@ -48,6 +50,7 @@ test.group('vite-plugin-validate-env', (group) => {
4850
4951 await fs . add ( `.env.development` , `VITE_TEST=not valid` )
5052
53+ // @ts -expect-error - `config` is the handler
5154 const fn = plugin . config ! . bind ( plugin , viteConfig , viteEnvConfig )
5255 await assert . rejects ( fn , 'Value must be "valid"' )
5356 } )
@@ -69,6 +72,7 @@ test.group('vite-plugin-validate-env', (group) => {
6972
7073 await fs . add ( `.env.development` , `VITE_URL_TRAILING=test.com` )
7174
75+ // @ts -expect-error - `config` is the handler
7276 await plugin . config ! ( viteConfig , viteEnvConfig )
7377 assert . equal ( process . env . VITE_URL_TRAILING , 'test.com/' )
7478 } )
@@ -86,6 +90,7 @@ test.group('vite-plugin-validate-env', (group) => {
8690 }`
8791 )
8892
93+ // @ts -expect-error - `config` is the handler
8994 const fn = plugin . config ! . bind ( plugin , viteConfig , viteEnvConfig )
9095 await assert . rejects ( fn , 'Error validating' )
9196 } )
@@ -95,6 +100,7 @@ test.group('vite-plugin-validate-env', (group) => {
95100
96101 await fs . add ( `.env.development` , `VITE_MY_VAR=true` )
97102
103+ // @ts -expect-error - `config` is the handler
98104 const fn = plugin . config ! . bind ( plugin , viteConfig , viteEnvConfig )
99105 await assert . rejects ( fn , 'Missing configuration for vite-plugin-validate-env' )
100106 } )
0 commit comments