@@ -67,6 +67,10 @@ const registryCompatibilityTestPlan: TestPlan[] = [
6767 }
6868] ;
6969
70+ function envVariableExists ( key : string ) : boolean {
71+ return ! ! process . env [ key ] && process . env [ key ] !== '' ;
72+ }
73+
7074function constructAuthFromStrategy ( tmpFolder : string , authStrategy : AuthStrategy , authStrategyKey ?: string ) : string | undefined {
7175 const generateAuthFolder = ( ) => {
7276 const randomChars = Math . random ( ) . toString ( 36 ) . substring ( 2 , 6 ) ;
@@ -116,7 +120,7 @@ describe('Registry Compatibility', function () {
116120 registryCompatibilityTestPlan . forEach ( ( { name, configName, testFeatureId, testCommand, testCommandResult, useAuthStrategy, authStrategyKey } ) => {
117121 this . timeout ( '120s' ) ;
118122 describe ( name , async function ( ) {
119- ( ( authStrategyKey && ! process . env [ authStrategyKey ] ) ? describe . skip : describe ) ( 'devcontainer up' , async function ( ) {
123+ ( ( authStrategyKey && ! envVariableExists ( authStrategyKey ) ) ? describe . skip : describe ) ( 'devcontainer up' , async function ( ) {
120124
121125 const authFolder = constructAuthFromStrategy ( tmp , useAuthStrategy ?? AuthStrategy . Anonymous , authStrategyKey ) || '/fake-path' ;
122126
@@ -138,7 +142,7 @@ describe('Registry Compatibility', function () {
138142 } ) ;
139143 } ) ;
140144
141- ( ( authStrategyKey && ! process . env [ authStrategyKey ] ) ? describe . skip : describe ) ( `devcontainer features info manifest` , async function ( ) {
145+ ( ( authStrategyKey && ! envVariableExists ( authStrategyKey ) ) ? describe . skip : describe ) ( `devcontainer features info manifest` , async function ( ) {
142146
143147 const authFolder = constructAuthFromStrategy ( tmp , useAuthStrategy ?? AuthStrategy . Anonymous , authStrategyKey ) || '/fake-path' ;
144148
0 commit comments