diff --git a/src/redux/services/index.ts b/src/redux/services/index.ts index ce28e6fdb7..a82a1ca693 100644 --- a/src/redux/services/index.ts +++ b/src/redux/services/index.ts @@ -7,9 +7,12 @@ import {PROCESS_ENV, RESOURCES_PATH} from '@utils/env'; */ export function getStaticResourcePath(resourcePath: string) { + if (PROCESS_ENV.NODE_ENV === 'test') { + return path.join('resources', resourcePath); + } + return PROCESS_ENV.NODE_ENV !== 'development' - ? // @ts-ignore - path.join(RESOURCES_PATH, 'resources', resourcePath) + ? path.join(RESOURCES_PATH, 'resources', resourcePath) : path.join('resources', resourcePath); } diff --git a/src/utils/env.ts b/src/utils/env.ts index 772b61ca48..36699c66ab 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -58,7 +58,5 @@ function shellEnvSync() { } } } -console.log('process.resourcesPath', process.resourcesPath); -console.log('shellEnvSync', shellEnvSync()); export const PROCESS_ENV: any = shellEnvSync(); export const RESOURCES_PATH = process.resourcesPath;