diff --git a/CHANGELOG.md b/CHANGELOG.md index ef8f0c2..1a13060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,3 +51,7 @@ First Release for Vs Code Extension. ## [1.0.11] - Maintaining user session + +## [1.0.12] + +- Fixing wrong file test generation in express mongoose diff --git a/package.json b/package.json index c55a8e3..934efdf 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "keployio", "displayName": "Keploy", "description": "Streamline testing with the power of Keploy, directly in your favorite IDE.", - "version": "1.0.11", + "version": "1.0.12", "publisher": "Keploy", "icon": "media/logo.png", "pricing": "Free", diff --git a/src/Utg.ts b/src/Utg.ts index a54a63b..a4de359 100644 --- a/src/Utg.ts +++ b/src/Utg.ts @@ -52,7 +52,6 @@ async function Utg(context: vscode.ExtensionContext) { const rootDir = vscode.workspace.workspaceFolders[0].uri.fsPath; - await ensureTestFileExists(sourceFilePath , rootDir); const extension = path.extname(sourceFilePath); let testFilePath: string; @@ -61,7 +60,7 @@ async function Utg(context: vscode.ExtensionContext) { let testFileContent:string; if (extension === '.js' || extension === '.ts') { - testFilePath = sourceFilePath.replace(extension, `.test${extension}`); + testFilePath = path.join(path.join(rootDir, 'test'), path.basename(sourceFilePath).replace(extension, `.test${extension}`)); if (!fs.existsSync(testFilePath)) { vscode.window.showInformationMessage("Test doesn't exist", testFilePath); fs.writeFileSync(testFilePath, `// Test file for ${testFilePath}`);