From e4b210b98f466587c3cd0af11e608f8f5d5683b1 Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Wed, 15 May 2024 17:32:38 +0200 Subject: [PATCH] Performance tests: fix results file path --- bin/plugin/commands/performance.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/plugin/commands/performance.js b/bin/plugin/commands/performance.js index 4c650bb4c7d138..a945319a5491b1 100644 --- a/bin/plugin/commands/performance.js +++ b/bin/plugin/commands/performance.js @@ -20,7 +20,8 @@ const config = require( '../config' ); const ARTIFACTS_PATH = process.env.WP_ARTIFACTS_PATH || path.join( process.cwd(), 'artifacts' ); -const RESULTS_FILE_SUFFIX = '.performance-results.raw.json'; +const RAW_RESULTS_FILE_SUFFIX = '.performance-results.raw.json'; +const RESULTS_FILE_SUFFIX = '.performance-results.json'; /** * @typedef WPPerformanceCommandOptions @@ -492,7 +493,7 @@ async function runPerformanceTests( branches, options ) { logAtIndent( 0, 'Calculating results' ); const resultFiles = getFilesFromDir( ARTIFACTS_PATH ).filter( ( file ) => - file.endsWith( RESULTS_FILE_SUFFIX ) + file.endsWith( RAW_RESULTS_FILE_SUFFIX ) ); /** @type {Record>>>} */ const results = {};