diff --git a/jest-setup.js b/jest-setup.js index 8ddb4e3dcc2ab8cec2a57e4b4696418e07e6ea10..0864a9dead1eb066c6899d7df57909b744e534f6 100644 --- a/jest-setup.js +++ b/jest-setup.js @@ -6,13 +6,14 @@ const { const hbuilderx_version = process.env.HX_Version const uniTestPlatformInfo = process.env.uniTestPlatformInfo ? process.env.uniTestPlatformInfo.replace(/\s/g,'_') : '' const folderName = `__image_snapshots__/${hbuilderx_version}/__${uniTestPlatformInfo}__` +const baseFolderName = `__image_snapshots__/base` expect.extend({ toMatchImageSnapshot: configureToMatchImageSnapshot({ customSnapshotIdentifier(args) { return args.currentTestName.replace(/\//g, '-').replace(' ', '-'); }, - customSnapshotsDir: path.join(__dirname, folderName), + customSnapshotsDir: path.join(__dirname, baseFolderName), customDiffDir: path.join(__dirname, `${folderName}/`, 'diff'), }), }); \ No newline at end of file