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 {
onInternalCompilerLoaded (): void {
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) => {
const missingInputs: 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 @@
},
"scripts": {
"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": {
"type": "git",
......
This diff is collapsed.
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"types": ["node"],
"types": ["node", "jest"],
"module": "commonjs",
"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 @@
},
"dependencies": {
"@remixproject/engine": "^0.2.3",
"@types/jest": "^26.0.5",
"@types/tape": "^4.2.33",
"ansi-gray": "^0.1.1",
"change-case": "^4.1.1",
......@@ -142,11 +143,11 @@
"ethereumjs-tx": "^2.1.2",
"ethereumjs-vm": "4.1.3",
"http-server": "^0.11.1",
"merge": "^1.2.0",
"npm-install-version": "^6.0.2",
"signale": "^1.4.0",
"time-stamp": "^2.2.0",
"winston": "^3.3.3",
"merge": "^1.2.0"
"winston": "^3.3.3"
},
"devDependencies": {
"@babel/core": "^7.4.5",
......
......@@ -358,6 +358,14 @@
"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": {
"builder": "@nrwl/node:package",
"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