From cd981848a50565cf416fbf60d0b66720f6ddd511 Mon Sep 17 00:00:00 2001 From: Szymon Rybczak Date: Tue, 6 Jun 2023 11:13:53 +0200 Subject: [PATCH] fix: code refactor (#1954) --- __e2e__/init.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/__e2e__/init.test.ts b/__e2e__/init.test.ts index 4daeded05..badd9b5ed 100644 --- a/__e2e__/init.test.ts +++ b/__e2e__/init.test.ts @@ -6,6 +6,7 @@ import { cleanupSync, writeFiles, } from '../jest/helpers'; +import slash from 'slash'; const DIR = getTempDirectory('command-init'); @@ -41,7 +42,7 @@ afterEach(() => { let templatePath = path.resolve(DIR, 'custom', 'template'); if (process.platform === 'win32') { - templatePath = templatePath.split('\\').join('/'); + templatePath = slash(templatePath); } else { templatePath = `file://${templatePath}`; }