Commit ea2afe98 authored by aniket-engg's avatar aniket-engg Committed by Aniket

jest for remix-tests tests

parent 4be69a0f
...@@ -99,7 +99,7 @@ export class Compiler { ...@@ -99,7 +99,7 @@ export class Compiler {
onInternalCompilerLoaded (): void { onInternalCompilerLoaded (): void {
if (this.state.worker === null) { if (this.state.worker === null) {
const compiler: any = typeof (window) === 'undefined' ? require('solc') : require('solc/wrapper')(window['Module']) const compiler: any = typeof (window) !== 'undefined' && window['Module'] ? require('solc/wrapper')(window['Module']) : require('solc')
this.state.compileJSON = (source: SourceWithTarget) => { this.state.compileJSON = (source: SourceWithTarget) => {
const missingInputs: string[] = [] const missingInputs: string[] = []
const missingInputsCallback = (path: string) => { const missingInputsCallback = (path: string) => {
......
module.exports = {
name: 'remix-tests',
preset: '../../jest.config.js',
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html', 'json', 'sol'],
coverageDirectory: '../../coverage/libs/remix-tests',
};
\ No newline at end of file
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
}, },
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"test": "./../../node_modules/.bin/mocha --require ts-node/register --require tsconfig-paths/register tests/*.ts -t 300000" "test": "./../../node_modules/.bin/mocha --require ts-node/register --require tsconfig-paths/register tests/testRunner.ts -t 300000"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
......
This diff is collapsed.
{ {
"extends": "../../tsconfig.json", "extends": "../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"types": ["node"], "types": ["node", "jest"],
"module": "commonjs", "module": "commonjs",
"esModuleInterop": true "esModuleInterop": true
}, },
......
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"include": [
"**/*.sol",
"**/*.spec.ts",
"**/*.spec.tsx",
"**/*.spec.js",
"**/*.spec.jsx",
"**/*.d.ts"
]
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
}, },
"dependencies": { "dependencies": {
"@remixproject/engine": "^0.2.3", "@remixproject/engine": "^0.2.3",
"@types/jest": "^26.0.5",
"@types/tape": "^4.2.33", "@types/tape": "^4.2.33",
"ansi-gray": "^0.1.1", "ansi-gray": "^0.1.1",
"change-case": "^4.1.1", "change-case": "^4.1.1",
...@@ -142,11 +143,11 @@ ...@@ -142,11 +143,11 @@
"ethereumjs-tx": "^2.1.2", "ethereumjs-tx": "^2.1.2",
"ethereumjs-vm": "4.1.3", "ethereumjs-vm": "4.1.3",
"http-server": "^0.11.1", "http-server": "^0.11.1",
"merge": "^1.2.0",
"npm-install-version": "^6.0.2", "npm-install-version": "^6.0.2",
"signale": "^1.4.0", "signale": "^1.4.0",
"time-stamp": "^2.2.0", "time-stamp": "^2.2.0",
"winston": "^3.3.3", "winston": "^3.3.3"
"merge": "^1.2.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.4.5", "@babel/core": "^7.4.5",
......
...@@ -358,6 +358,14 @@ ...@@ -358,6 +358,14 @@
"cwd": "libs/remix-tests" "cwd": "libs/remix-tests"
} }
}, },
"test2": {
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "libs/remix-tests/jest.config.js",
"tsConfig": "libs/remix-tests/tsconfig.spec.json",
"passWithNoTests": true
}
},
"build": { "build": {
"builder": "@nrwl/node:package", "builder": "@nrwl/node:package",
"options": { "options": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment