Skip to content

Commit

Permalink
Merge pull request #189 from o-a-hudson/truffle
Browse files Browse the repository at this point in the history
Enforces use of local ganache for truffle testing
  • Loading branch information
mirathewhite committed Aug 8, 2018
2 parents 9dd31cf + 6e39eb5 commit ecf9729
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ install project npm dependencies:
```npm install```

# Testing
ganache-cli (Ethereum RPC client) must be running first
```ganache-cli --defaultBalanceEther 1000000 --deterministic --a 15```

then run the tests via truffle:
```truffle test```
All tests are run with:
```npm run truffle-test```

or run a specific file of tests with:
```truffle test [file]```
```npm run truffle-test -- [file]```

to generate test coverage run:
to generate test coverage on all tests run:
```npm test```


Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"scripts": {
"dev": "lite-server",
"truffle-test": "scripts/start-ganache.sh && truffle test",
"test": "scripts/start-ganache.sh && truffle test scripts/buildTransactionDataTest.js && ./node_modules/.bin/solidity-coverage"
},
"repository": {
Expand All @@ -28,7 +29,7 @@
"ethereumjs-abi": "^0.6.5",
"ethereumjs-tx": "1.3.1",
"g": "^2.0.1",
"ganache-cli": "^6.1.0",
"ganache-cli": "6.1.0",
"lodash": "^4.17.10",
"npm": "^6.2.0",
"openzeppelin-solidity": "1.11.0",
Expand Down
7 changes: 4 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2539,11 +2539,12 @@ g@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/g/-/g-2.0.1.tgz#0b5963ebd0ca70e3bc8c6766934a021821c8b857"

ganache-cli@^6.1.0:
version "6.1.6"
resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.1.6.tgz#99b500a25f571271a6978ef3f9c9c53e1a3854f0"
ganache-cli@6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.1.0.tgz#486c846497204b644166b5f0f74c9b41d02bdc25"
dependencies:
source-map-support "^0.5.3"
webpack-cli "^2.0.9"

gauge@~2.7.3:
version "2.7.4"
Expand Down

0 comments on commit ecf9729

Please sign in to comment.