Backup E2E test: Fix path analysis on windows

This commit is contained in:
Scott Nonnenberg 2018-04-20 16:56:39 -07:00
parent fdc13d0af3
commit 1bfc1ed63e
No known key found for this signature in database
GPG Key ID: 5F82280C35134661
1 changed files with 2 additions and 1 deletions

View File

@ -266,7 +266,8 @@ describe('Backup', () => {
return _.omit(model, ['id']);
}
const twoSlashes = /.*\/.*\/.*/;
const slash = path.sep === '/' ? '\\/' : '\\\\';
const twoSlashes = new RegExp(`.*${slash}.*${slash}.*`);
function removeDirs(dirs) {
return _.filter(dirs, (fullDir) => {
const dir = fullDir.replace(attachmentsPath, '');