@@ -80,7 +80,9 @@ describe('utils', () => {
80
80
Object . defineProperty ( process , 'arch' , {
81
81
value : savedArch ,
82
82
} ) ;
83
- process . config . variables = savedVariables ;
83
+ Object . defineProperty ( process . config , 'variables' , {
84
+ value : savedVariables ,
85
+ } ) ;
84
86
} ) ;
85
87
86
88
it ( 'should return process.arch on x64' , ( ) => {
@@ -101,8 +103,9 @@ describe('utils', () => {
101
103
Object . defineProperty ( process , 'arch' , {
102
104
value : 'arm' ,
103
105
} ) ;
104
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
105
- process . config . variables = { } as any ;
106
+ Object . defineProperty ( process . config , 'variables' , {
107
+ value : { } ,
108
+ } ) ;
106
109
expect ( getHostArch ( ) ) . toEqual ( 'armv7l' ) ;
107
110
} ) ;
108
111
@@ -111,8 +114,12 @@ describe('utils', () => {
111
114
Object . defineProperty ( process , 'arch' , {
112
115
value : 'arm' ,
113
116
} ) ;
114
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/camelcase
115
- process . config . variables = { arm_version : '6' } as any ;
117
+ Object . defineProperty ( process . config , 'variables' , {
118
+ value : {
119
+ // eslint-disable-next-line @typescript-eslint/camelcase
120
+ arm_version : '6' ,
121
+ } ,
122
+ } ) ;
116
123
expect ( getHostArch ( ) ) . toEqual ( uname ( ) ) ;
117
124
} ) ;
118
125
}
@@ -121,8 +128,12 @@ describe('utils', () => {
121
128
Object . defineProperty ( process , 'arch' , {
122
129
value : 'arm' ,
123
130
} ) ;
124
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/camelcase
125
- process . config . variables = { arm_version : '7' } as any ;
131
+ Object . defineProperty ( process . config , 'variables' , {
132
+ value : {
133
+ // eslint-disable-next-line @typescript-eslint/camelcase
134
+ arm_version : '7' ,
135
+ } ,
136
+ } ) ;
126
137
expect ( getHostArch ( ) ) . toEqual ( 'armv7l' ) ;
127
138
} ) ;
128
139
} ) ;
0 commit comments