Skip to content

Commit cd98184

Browse files
fix: code refactor (#1954)
1 parent 232b5ba commit cd98184

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

__e2e__/init.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
cleanupSync,
77
writeFiles,
88
} from '../jest/helpers';
9+
import slash from 'slash';
910

1011
const DIR = getTempDirectory('command-init');
1112

@@ -41,7 +42,7 @@ afterEach(() => {
4142

4243
let templatePath = path.resolve(DIR, 'custom', 'template');
4344
if (process.platform === 'win32') {
44-
templatePath = templatePath.split('\\').join('/');
45+
templatePath = slash(templatePath);
4546
} else {
4647
templatePath = `file://${templatePath}`;
4748
}

0 commit comments

Comments
 (0)