File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
client/src/components/__tests__ Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ describe("Sidebar Environment Variables", () => {
166
166
const setEnv = jest . fn ( ) ;
167
167
const initialEnv = {
168
168
KEY1 : "value1" ,
169
- KEY2 : "value2"
169
+ KEY2 : "value2" ,
170
170
} ;
171
171
renderSidebar ( { env : initialEnv , setEnv } ) ;
172
172
@@ -175,13 +175,17 @@ describe("Sidebar Environment Variables", () => {
175
175
// Type "NEW_" one character at a time
176
176
const key1Input = screen . getByDisplayValue ( "KEY1" ) ;
177
177
"NEW_" . split ( "" ) . forEach ( ( char ) => {
178
- fireEvent . change ( key1Input , { target : { value : char + "KEY1" . slice ( 1 ) } } ) ;
178
+ fireEvent . change ( key1Input , {
179
+ target : { value : char + "KEY1" . slice ( 1 ) } ,
180
+ } ) ;
179
181
} ) ;
180
182
181
183
// Verify the last setEnv call maintains the order
182
- const lastCall = setEnv . mock . calls [ setEnv . mock . calls . length - 1 ] [ 0 ] as Record < string , string > ;
184
+ const lastCall = setEnv . mock . calls [
185
+ setEnv . mock . calls . length - 1
186
+ ] [ 0 ] as Record < string , string > ;
183
187
const entries = Object . entries ( lastCall ) ;
184
-
188
+
185
189
// The values should stay with their original keys
186
190
expect ( entries [ 0 ] [ 1 ] ) . toBe ( "value1" ) ; // First entry should still have value1
187
191
expect ( entries [ 1 ] [ 1 ] ) . toBe ( "value2" ) ; // Second entry should still have value2
You can’t perform that action at this time.
0 commit comments