From 5a79d1ba06d29277da062098ddbde5f3a44107b3 Mon Sep 17 00:00:00 2001 From: 0mkar <0mkar@protonmail.com> Date: Mon, 28 Jan 2019 19:07:21 +0530 Subject: [PATCH] Try to create a typescript version of remix-tests module --- remix-tests/package.json | 6 ++++-- remix-tests/src/index.ts | 10 ++++++++++ remix-tests/src/runTestFiles.ts | 0 remix-tests/src/runTestSources.ts | 0 remix-tests/src/testRunner.ts | 0 5 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 remix-tests/src/index.ts create mode 100644 remix-tests/src/runTestFiles.ts create mode 100644 remix-tests/src/runTestSources.ts create mode 100644 remix-tests/src/testRunner.ts diff --git a/remix-tests/package.json b/remix-tests/package.json index a78636e48f..7ec98e760e 100644 --- a/remix-tests/package.json +++ b/remix-tests/package.json @@ -2,7 +2,8 @@ "name": "remix-tests", "version": "0.1.1", "description": "Tests for the Ethereum tool suite Remix", - "main": "./src/index.js", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "contributors": [ { "name": "Iuri Matias", @@ -17,8 +18,9 @@ "remix-tests": "./bin/remix-tests" }, "scripts": { + "build": "tsc", "lint": "standard", - "test": "standard && mocha tests/ -t 300000" + "test": "standard && mocha --require ts-node/register tests/*.ts -t 300000" }, "repository": { "type": "git", diff --git a/remix-tests/src/index.ts b/remix-tests/src/index.ts new file mode 100644 index 0000000000..9b79dfdff6 --- /dev/null +++ b/remix-tests/src/index.ts @@ -0,0 +1,10 @@ +import runTestFiles from './runTestFiles.ts' +import runTestSources from './runTestSources.ts' +import TestRunner from './testRunner.ts' + +module.exports = { + runTestFiles: runTestFiles, + runTestSources: runTestSources, + runTest: TestRunner.runTest, + assertLibCode: require('../sol/tests.sol.js') +} diff --git a/remix-tests/src/runTestFiles.ts b/remix-tests/src/runTestFiles.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/remix-tests/src/runTestSources.ts b/remix-tests/src/runTestSources.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/remix-tests/src/testRunner.ts b/remix-tests/src/testRunner.ts new file mode 100644 index 0000000000..e69de29bb2