Fix JS test cases failing on Windows OS

This commit is contained in:
Aditya Toshniwal 2023-12-23 16:08:05 +05:30
parent 8c06d93303
commit 41a62c8082

View File

@ -7,7 +7,7 @@ const webpackAliasToJestModules = ()=>{
Object.keys(webpackShimAlias).forEach((an)=>{
// eg - sources: ./pgadmin/static/js/ to '^sources/(.*)$': '<rootDir>/pgadmin/static/js/$1'
let ap = webpackShimAlias[an].replace(__dirname, '<rootDir>');
if(ap.endsWith('/')) {
if(ap.endsWith('/') || ap.endsWith('\\')) {
ret[`^${an}/(.*)$`] = ap + '$1';
return;
}