fix #1210: update mocha to use RC file config (#1417)

This commit is contained in:
Antonio Campos
2021-06-01 17:56:07 -05:00
committed by GitHub
parent bb44598e32
commit 3fdc56ab90
3 changed files with 22 additions and 7 deletions

View File

@@ -73,7 +73,7 @@
"doctoc": "doctoc docs/index.md --title '# RippleAPI Reference' --github --maxlevel 2",
"docgen": "node --harmony scripts/build_docs.js",
"prepublish": "yarn clean && yarn build",
"test": "TS_NODE_PROJECT=src/tsconfig.json nyc mocha --exit",
"test": "TS_NODE_PROJECT=src/tsconfig.json nyc mocha --config=test/.mocharc.json --exit",
"test:watch": "TS_NODE_PROJECT=src/tsconfig.json mocha --watch --reporter dot",
"format": "prettier --write '{src,test}/**/*.ts'",
"lint": "eslint 'src/**/*.ts' 'test/*-test.{ts,js}'",

21
test/.mocharc.json Normal file
View File

@@ -0,0 +1,21 @@
{
"diff": true,
"spec": ["./test/*.ts"],
"extension": ["ts"],
"package": "../package.json",
"require": "ts-node/register",
"reporter": "spec",
"slow": 500,
"timeout": 5000,
"recursive": true,
"file": [],
"ui": "bdd",
"watch-files": [
"src/**/*.ts",
"test/**/*.ts"
],
"watch-ignore": [
"test/node_modules/**/*",
"test/vendor/**/*"
]
}

View File

@@ -1,6 +0,0 @@
--reporter spec
--timeout 5000
--slow 500
--require ts-node/register
--watch-extensions ts
./test/*.{ts,js}