diff --git a/libs/remix-tests/sol/tests.sol.js b/libs/remix-tests/sol/tests.sol.ts similarity index 100% rename from libs/remix-tests/sol/tests.sol.js rename to libs/remix-tests/sol/tests.sol.ts diff --git a/libs/remix-tests/sol/tests_accounts.sol.js b/libs/remix-tests/sol/tests_accounts.sol.ts similarity index 100% rename from libs/remix-tests/sol/tests_accounts.sol.js rename to libs/remix-tests/sol/tests_accounts.sol.ts diff --git a/libs/remix-tests/src/compiler.ts b/libs/remix-tests/src/compiler.ts index 84d5a01795..9fc5270fb8 100644 --- a/libs/remix-tests/src/compiler.ts +++ b/libs/remix-tests/src/compiler.ts @@ -10,7 +10,7 @@ function regexIndexOf (inputString: string, regex: RegExp, startpos = 0) { } function writeTestAccountsContract (accounts: string[]) { - const testAccountContract = require('../sol/tests_accounts.sol.js') + const testAccountContract = require('../sol/tests_accounts.sol') let body = `address[${accounts.length}] memory accounts;` if (!accounts.length) body += ';' else { @@ -86,8 +86,8 @@ export function compileFileOrFiles(filename: string, isDirectory: boolean, opts: let compiler: any const accounts: string[] = opts.accounts || [] const sources: SrcIfc = { - 'tests.sol': { content: require('../sol/tests.sol.js') }, - 'remix_tests.sol': { content: require('../sol/tests.sol.js') }, + 'tests.sol': { content: require('../sol/tests.sol') }, + 'remix_tests.sol': { content: require('../sol/tests.sol') }, 'remix_accounts.sol': { content: writeTestAccountsContract(accounts) } } const filepath: string = (isDirectory ? filename : path.dirname(filename)) diff --git a/libs/remix-tests/src/index.ts b/libs/remix-tests/src/index.ts index b786ceda08..854db0dcad 100644 --- a/libs/remix-tests/src/index.ts +++ b/libs/remix-tests/src/index.ts @@ -2,4 +2,4 @@ export { runTestFiles } from './runTestFiles' export { runTestSources } from './runTestSources' export { runTest } from './testRunner' export * from './types' -export const assertLibCode = require('../sol/tests.sol.js') +export const assertLibCode = require('../sol/tests.sol') diff --git a/libs/remix-tests/tsconfig.lib.json b/libs/remix-tests/tsconfig.lib.json index 4233bbafd2..ac117282b1 100644 --- a/libs/remix-tests/tsconfig.lib.json +++ b/libs/remix-tests/tsconfig.lib.json @@ -4,7 +4,7 @@ "module": "commonjs", "outDir": "../../dist/out-tsc", "declaration": true, - "rootDir": "./src", + "rootDir": "./", "types": ["node"] }, "exclude": [ diff --git a/tsconfig.json b/tsconfig.json index 6fdcee4557..826dd82351 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,7 +22,7 @@ "@remix-project/remix-lib": ["dist/libs/remix-lib/index.js"], "@remix-project/remix-simulator": ["dist/libs/remix-simulator/index.js"], "@remix-project/remix-solidity": ["dist/libs/remix-solidity/index.js"], - "@remix-project/remix-tests": ["dist/libs/remix-tests/index.js"], + "@remix-project/remix-tests": ["dist/libs/remix-tests/src/index.js"], "@remix-project/remix-url-resolver": ["dist/libs/remix-url-resolver/index.js"] } },