@@ -229,7 +229,7 @@ test("load code quality config", async (t) => {
229229 } ) ;
230230} ) ;
231231
232- test ( "loading config saves config" , async ( t ) => {
232+ test ( "loading a saved config produces the same config" , async ( t ) => {
233233 return await withTmpDir ( async ( tempDir ) => {
234234 const logger = getRunnerLogger ( true ) ;
235235
@@ -259,6 +259,7 @@ test("loading config saves config", async (t) => {
259259 logger,
260260 } ) ,
261261 ) ;
262+ await configUtils . saveConfig ( config1 , logger ) ;
262263
263264 // The saved config file should now exist
264265 t . true ( fs . existsSync ( configUtils . getPathToParsedConfigFile ( tempDir ) ) ) ;
@@ -300,7 +301,7 @@ test("loading config with version mismatch throws", async (t) => {
300301 . stub ( actionsUtil , "getActionVersion" )
301302 . returns ( "does-not-exist" ) ;
302303
303- await configUtils . initConfig (
304+ const config = await configUtils . initConfig (
304305 createTestInitConfigInputs ( {
305306 languagesInput : "javascript,python" ,
306307 tempDir,
@@ -309,6 +310,8 @@ test("loading config with version mismatch throws", async (t) => {
309310 logger,
310311 } ) ,
311312 ) ;
313+ // initConfig does not save the config, so we do it here.
314+ await configUtils . saveConfig ( config , logger ) ;
312315
313316 // Restore `getActionVersion`.
314317 getActionVersionStub . restore ( ) ;
0 commit comments