File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,7 +153,10 @@ export function arkenv<T extends CompiledEnvSchema>(
153153export function arkenv <
154154 const T extends SchemaShape ,
155155 const D extends EnvSchema < T > | CompiledEnvSchema ,
156- > ( def : D , config : ArkEnvConfig & { safe : true } ) : SafeArkEnvResult < ArkenvOutput < T , D > > ;
156+ > (
157+ def : D ,
158+ config : ArkEnvConfig & { safe : true } ,
159+ ) : SafeArkEnvResult < ArkenvOutput < T , D > > ;
157160export function arkenv <
158161 const T extends SchemaShape ,
159162 const D extends EnvSchema < T > | CompiledEnvSchema ,
Original file line number Diff line number Diff line change @@ -118,15 +118,21 @@ describe("ArkEnvError & arkenv safe mode", () => {
118118 } ) ;
119119
120120 it ( "should run arkenv safely" , ( ) => {
121- const result = arkenv ( { PORT : "number" } , { safe : true , env : { PORT : "3000" } } ) ;
121+ const result = arkenv (
122+ { PORT : "number" } ,
123+ { safe : true , env : { PORT : "3000" } } ,
124+ ) ;
122125 expect ( result . success ) . toBe ( true ) ;
123126 if ( result . success ) {
124127 expect ( result . data ) . toEqual ( { PORT : 3000 } ) ;
125128 }
126129 } ) ;
127130
128131 it ( "should return failure for arkenv safe mode with invalid input" , ( ) => {
129- const result = arkenv ( { PORT : "number" } , { safe : true , env : { PORT : "abc" } } ) ;
132+ const result = arkenv (
133+ { PORT : "number" } ,
134+ { safe : true , env : { PORT : "abc" } } ,
135+ ) ;
130136 expect ( result . success ) . toBe ( false ) ;
131137 if ( ! result . success ) {
132138 expect ( result . issues ) . toBeDefined ( ) ;
You can’t perform that action at this time.
0 commit comments