From 878cecd6043b5b853d5969efa6273433cf71ec7e Mon Sep 17 00:00:00 2001 From: agusduha Date: Thu, 4 Apr 2024 15:32:43 -0300 Subject: [PATCH] fix: format mock directory --- src/smock-foundry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/smock-foundry.ts b/src/smock-foundry.ts index cc5a9af..efdbfa3 100644 --- a/src/smock-foundry.ts +++ b/src/smock-foundry.ts @@ -59,7 +59,7 @@ export async function generateMockContracts( const escapedSubstrings = contractsDirectories.map((directory) => directory.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')); const regexPattern = new RegExp(escapedSubstrings.join('|'), 'g'); const mockContractPath = scope.absolutePath - .replace(regexPattern, mocksDirectory) + .replace(regexPattern, path.join(mocksDirectory, path.sep)) .replace(path.basename(sourceUnit.absolutePath), `Mock${contract.name}.sol`); const mockContractAbsolutePath = path.resolve(rootPath, mockContractPath);