From 1bfc1ed63e2580ec3fd4137eca9456ae68bb29c2 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Fri, 20 Apr 2018 16:56:39 -0700 Subject: [PATCH] Backup E2E test: Fix path analysis on windows --- test/backup_test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/backup_test.js b/test/backup_test.js index 36939ce9d..5ccf53165 100644 --- a/test/backup_test.js +++ b/test/backup_test.js @@ -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, '');