diff --git a/package.json b/package.json index 733d16fd..fcf92f25 100644 --- a/package.json +++ b/package.json @@ -26,18 +26,19 @@ "release": "release-it --non-interactive", "changelog": "auto-changelog -p", "prepublishOnly": "npm run build", - "test:ss": "TS_NODE_PROJECT='./test/unit/tsconfig.json' mocha --require ts-node/register --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/pools/ssContracts/SideStaking.test.ts'", - "test:fixed": "TS_NODE_PROJECT='./test/unit/tsconfig.json' mocha --require ts-node/register --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/pools/fixedRate/FixedRateExchange.test.ts'", - "test:pool": "TS_NODE_PROJECT='./test/unit/tsconfig.json' mocha --require ts-node/register --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/pools/balancer/Pool.test.ts'", - "test:dispenser": "TS_NODE_PROJECT='./test/unit/tsconfig.json' mocha --require ts-node/register --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/pools/dispenser/Dispenser.test.ts'", - "test:dt": "TS_NODE_PROJECT='./test/unit/tsconfig.json' mocha --require ts-node/register --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/tokens/Datatoken.test.ts'", - "test:nftDt": "TS_NODE_PROJECT='./test/unit/tsconfig.json' mocha --require ts-node/register --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/Nft.test.ts'", - "test:factory": "TS_NODE_PROJECT='./test/unit/tsconfig.json' mocha --require ts-node/register --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/NftFactory.test.ts'", - "test:router": "TS_NODE_PROJECT='./test/unit/tsconfig.json' mocha --require ts-node/register --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/pools/Router.test.ts'", - "test:publishAll": "TS_NODE_PROJECT='./test/integration/tsconfig.json' mocha --require ts-node/register --config=test/integration/.mocharc.json --node-env=test --exit 'test/integration/PublishFlows.test.ts'", - "test:unit": "TS_NODE_PROJECT='./test/unit/tsconfig.json' mocha --require ts-node/register --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/**/*.test.ts'", + "mocha": "TS_NODE_PROJECT='./test/tsconfig.json' mocha --config=test/.mocharc.json --node-env=test --exit", + "test:ss": "npm run mocha -- 'test/unit/pools/ssContracts/SideStaking.test.ts'", + "test:fixed": "npm run mocha -- 'test/unit/pools/fixedRate/FixedRateExchange.test.ts'", + "test:pool": "npm run mocha -- 'test/unit/pools/balancer/Pool.test.ts'", + "test:dispenser": "npm run mocha -- 'test/unit/pools/dispenser/Dispenser.test.ts'", + "test:dt": "npm run mocha -- 'test/unit/tokens/Datatoken.test.ts'", + "test:nftDt": "npm run mocha -- 'test/unit/Nft.test.ts'", + "test:factory": "npm run mocha -- 'test/unit/NftFactory.test.ts'", + "test:router": "npm run mocha -- 'test/unit/pools/Router.test.ts'", + "test:publishAll": "npm run mocha -- 'test/integration/PublishFlows.test.ts'", + "test:unit": "npm run mocha -- 'test/unit/**/*.test.ts'", "test:unit:cover": "nyc --report-dir coverage/unit npm run test:unit", - "test:integration": "TS_NODE_PROJECT='./test/integration/tsconfig.json' mocha --require ts-node/register --config=test/integration/.mocharc.json --node-env=test --exit 'test/integration/**/*.test.ts'", + "test:integration": "npm run mocha -- 'test/integration/**/*.test.ts'", "test:integration:cover": "nyc --report-dir coverage/integration --no-clean npm run test:integration" }, "repository": { diff --git a/test/integration/.mocharc.json b/test/.mocharc.json similarity index 77% rename from test/integration/.mocharc.json rename to test/.mocharc.json index 860f598d..91cf7afa 100644 --- a/test/integration/.mocharc.json +++ b/test/.mocharc.json @@ -1,6 +1,7 @@ { "require": ["ts-node/register", "source-map-support/register", "mock-local-storage"], "full-trace": true, + "bail": true, "exit": true, - "timeout": "300000" + "timeout": "20000" } diff --git a/test/integration/tsconfig.json b/test/integration/tsconfig.json deleted file mode 100644 index be3cb20f..00000000 --- a/test/integration/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "resolveJsonModule": true, - "lib": ["es6", "es7"], - "module": "CommonJS", - "target": "ES5", - "noUnusedLocals": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true - } -} diff --git a/test/unit/tsconfig.json b/test/tsconfig.json similarity index 100% rename from test/unit/tsconfig.json rename to test/tsconfig.json diff --git a/test/unit/.mocharc.json b/test/unit/.mocharc.json deleted file mode 100644 index ae76f6db..00000000 --- a/test/unit/.mocharc.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "require": [ - "ts-node/register", - "source-map-support/register", - "mock-local-storage" - ], - "full-trace": true, - "bail": true, - "exit": true, - "timeout": "20000" - } \ No newline at end of file