Build/Test Tools: Fix path check when comparing performance test results.

This is a follow-up to r56926, r56927, r56928.

See #59517.

git-svn-id: https://develop.svn.wordpress.org/trunk@56930 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler 2023-10-13 12:32:28 +00:00
parent e9375e0679
commit 93782b5177

View File

@ -28,14 +28,14 @@ const testSuites = [ 'home-block-theme', 'home-classic-theme' ];
// The current commit's results.
const testResults = Object.fromEntries(
testSuites
.filter( ( key ) => fs.existsSync( `${ key }.test.results.json` ) )
.filter( ( key ) => fs.existsSync( path.join( __dirname, '/specs/', `${ key }.test.results.json` ) ) )
.map( ( key ) => [ key, parseFile( `${ key }.test.results.json` ) ] )
);
// The previous commit's results.
const prevResults = Object.fromEntries(
testSuites
.filter( ( key ) => fs.existsSync( `before-${ key }.test.results.json` ) )
.filter( ( key ) => fs.existsSync( path.join( __dirname, '/specs/', `before-${ key }.test.results.json` ) ) )
.map( ( key ) => [ key, parseFile( `before-${ key }.test.results.json` ) ] )
);