Use mocharc

This commit is contained in:
dapplion 2021-04-04 23:00:37 +02:00
parent e0799decc6
commit e81764f710
2 changed files with 6 additions and 4 deletions

2
.mocharc.yml Normal file
View File

@ -0,0 +1,2 @@
colors: true
require: ts-node/register

View File

@ -31,9 +31,9 @@
"lint:fix": "yarn run lint --fix", "lint:fix": "yarn run lint --fix",
"prepublishOnly": "yarn build", "prepublishOnly": "yarn build",
"test:web": "karma start", "test:web": "karma start",
"test:unit": "mocha --colors -r ts-node/register 'test/unit/**/*.test.ts'", "test:unit": "mocha 'test/unit/**/*.test.ts'",
"test:coverage": "nyc --cache-dir .nyc_output/.cache -r lcov -e .ts mocha --colors -r ts-node/register 'test/unit/**/*.test.ts' && nyc report", "test:coverage": "nyc --cache-dir .nyc_output/.cache -r lcov -e .ts mocha 'test/unit/**/*.test.ts' && nyc report",
"test:spec": "mocha --colors -r ts-node/register 'test/spec/**/*.test.ts'", "test:spec": "mocha 'test/spec/**/*.test.ts'",
"test": "yarn run test:unit && yarn run test:spec", "test": "yarn run test:unit && yarn run test:spec",
"download-test-cases": "ts-node test/downloadSpecTests.ts", "download-test-cases": "ts-node test/downloadSpecTests.ts",
"coverage": "codecov -F bls", "coverage": "codecov -F bls",
@ -47,7 +47,7 @@
}, },
"devDependencies": { "devDependencies": {
"@chainsafe/blst": "^0.1.6", "@chainsafe/blst": "^0.1.6",
"@chainsafe/lodestar-spec-test-util": "^0.12.0", "@chainsafe/lodestar-spec-test-util": "^0.18.0",
"@types/chai": "^4.2.9", "@types/chai": "^4.2.9",
"@types/mocha": "^8.0.4", "@types/mocha": "^8.0.4",
"@types/randombytes": "^2.0.0", "@types/randombytes": "^2.0.0",