diff --git a/lib/generator/index.js b/lib/generator/index.js index 68f7e44..1ab186e 100644 --- a/lib/generator/index.js +++ b/lib/generator/index.js @@ -69,8 +69,9 @@ export const generateTestFile = (editor = {}) => { // user settings const { testDirName, testSufix, typeSystem } = getUserSettings(); // file info: Name, path - const srcFileName = getFileName(editor.getTitle()); // fileName without extension - const filePath = getFilePath(editor.getPath(), "/"); // The dir the file is located + const auxPathName = editor.getPath().replace(/\\/g, "/"); + const srcFileName = getFileName(auxPathName); // fileName without extension + const filePath = getFilePath(auxPathName); // The dir the file is located // generated test info: testFileName, saveLocation for test const testFileName = `${srcFileName}${testSufix}.js`;