From ce21f1f004c29f91b1a63b6365de1171254f7462 Mon Sep 17 00:00:00 2001 From: BynariStar Date: Thu, 23 Nov 2017 15:39:59 +0200 Subject: [PATCH] Reverse order of multiple test cases (#64) --- scripts/games/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/games/app.js b/scripts/games/app.js index 5cd268f..aa3ffa9 100644 --- a/scripts/games/app.js +++ b/scripts/games/app.js @@ -121,6 +121,9 @@ function processGame(game) { var model = toml.parse(fs.readFileSync(`${fsPathCode}/${game}/game.dat`, 'utf8')); let currentDate = new Date(); model.date = `${currentDate.toISOString()}`; + + // Reverse the order of the testcases array, so that the newest ones are displayed first + model.testcases = model.testcases.reverse(); // SHORTCUTS BLOCK // Parse testcase information out of the dat to reinject as shortcut values.