1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

make mocha pick up individual tsconfig, compile test files

This commit is contained in:
Matthias Kretschmann 2022-01-11 17:17:53 +00:00
parent 24425fcf8b
commit 8776c1bb91
3 changed files with 31 additions and 27 deletions

View File

@ -26,18 +26,18 @@
"release": "release-it --non-interactive", "release": "release-it --non-interactive",
"changelog": "auto-changelog -p", "changelog": "auto-changelog -p",
"prepublishOnly": "npm run build", "prepublishOnly": "npm run build",
"test:ss": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/pools/ssContracts/SideStaking.test.ts'", "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": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/pools/fixedRate/FixedRateExchange.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": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/pools/balancer/Pool.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": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/pools/dispenser/Dispenser.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": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/tokens/Datatoken.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": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/Nft.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": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/NftFactory.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": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/pools/Router.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": "mocha --config=test/integration/.mocharc.json --node-env=test --exit 'test/integration/PublishFlows.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": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/**/*.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'",
"test:unit:cover": "nyc --report-dir coverage/unit npm run test:unit", "test:unit:cover": "nyc --report-dir coverage/unit npm run test:unit",
"test:integration": "mocha --config=test/integration/.mocharc.json --node-env=test --exit 'test/integration/**/*.test.ts'", "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:cover": "nyc --report-dir coverage/integration --no-clean npm run test:integration" "test:integration:cover": "nyc --report-dir coverage/integration --no-clean npm run test:integration"
}, },
"repository": { "repository": {

View File

@ -1,9 +1,11 @@
{ {
"compilerOptions": { "compilerOptions": {
"resolveJsonModule": true, "resolveJsonModule": true,
"lib": ["es6", "es7"], "lib": ["es6", "es7"],
"noUnusedLocals": true, "module": "CommonJS",
"esModuleInterop": true, "target": "ES5",
"allowSyntheticDefaultImports": true "noUnusedLocals": true,
} "esModuleInterop": true,
} "allowSyntheticDefaultImports": true
}
}

View File

@ -1,9 +1,11 @@
{ {
"compilerOptions": { "compilerOptions": {
"resolveJsonModule": true, "resolveJsonModule": true,
"lib": ["es6", "es7"], "lib": ["es6", "es7"],
"noUnusedLocals": false, "module": "CommonJS",
"esModuleInterop": true, "target": "ES5",
"allowSyntheticDefaultImports": true "noUnusedLocals": false,
} "esModuleInterop": true,
} "allowSyntheticDefaultImports": true
}
}