Skip to content

Commit

Permalink
get rid of warnings in solidity and bash, add comment clarifying runn…
Browse files Browse the repository at this point in the history
…ing typechain in tests
  • Loading branch information
krzkaczor committed Aug 17, 2018
1 parent ff54b71 commit fe3ba9a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -68,8 +68,8 @@
"test": "yarn lint && ./scripts/test.sh",
"test:coverage": "yarn lint && ./scripts/test.sh COVERAGE",
"test:fix": "yarn lint:fix && ./scripts/test.sh",
"test:mocha": "NODE_ENV=test mocha --require ts-node/register.js --require test/setup-chai.ts --require 'test/integration/before.spec.ts' 'test/integration/web3.ts' 'test/**/*.spec.ts'",
"test:mocha:coverage": "NODE_ENV=test nyc mocha --require ts-node/register.js --require source-map-support/register --require test/setup-chai.ts --require 'test/integration/before.spec.ts' 'test/integration/web3.ts' 'test/**/*.spec.ts'",
"test:mocha": "NODE_ENV=test mocha --require ts-node/register.js --require test/setup-chai.ts --require 'test/integration/before.ts' 'test/integration/web3.ts' 'test/**/*.spec.ts'",
"test:mocha:coverage": "NODE_ENV=test nyc mocha --require ts-node/register.js --require source-map-support/register --require test/setup-chai.ts --require 'test/integration/before.ts' 'test/integration/web3.ts' 'test/**/*.spec.ts'",
"coveralls": "nyc report --reporter=text-lcov | coveralls"
},
"main": "./dist/generateTypeChainWrappers.js",
Expand Down
4 changes: 2 additions & 2 deletions scripts/test.sh
Expand Up @@ -18,7 +18,7 @@ mkdir $ABI_TMP_DIR
echo "Generating ABIs for sample contracts"
../../../node_modules/.bin/solcjs --abi ./* --bin -o $ABI_DIR

if [ $mode = "COVERAGE" ]; then
if [ "$mode" = "COVERAGE" ]; then
yarn test:mocha:coverage
else
yarn test:mocha
Expand All @@ -28,6 +28,6 @@ echo "Testing if there are no complication problems with generated wrappers"
yarn tsc

echo "Sending coverage report"
if [ $mode = "COVERAGE" ]; then
if [ "$mode" = "COVERAGE" ]; then
yarn coveralls
fi
Expand Up @@ -3,6 +3,11 @@ var prepare = require("mocha-prepare");
import { generateTypeChainWrappers } from "../../lib/generateTypeChainWrappers";
import { join } from "path";

/**
* NOTE: this is done here only to easily count code coverage.
* Normally you would run typechain in separate build step, before running your tests.
*/

prepare(async (done: any) => {
await generateTypeChainWrappers({
glob: "**/*.abi",
Expand Down
2 changes: 1 addition & 1 deletion test/integration/contracts/DumbContract.sol
Expand Up @@ -8,7 +8,7 @@ contract DumbContract {
uint public arrayParamLength;
bytes32 public byteArray;

function DumbContract() public {
constructor() public {
counter = 0;
someAddress = msg.sender;
}
Expand Down

0 comments on commit fe3ba9a

Please sign in to comment.