mirror of https://github.com/status-im/web3.js.git
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
f0da6ef78c
|
@ -50,8 +50,6 @@ For another example see `example/index.html`.
|
|||
|
||||
* Node.js
|
||||
* npm
|
||||
* gulp (build)
|
||||
* mocha (tests)
|
||||
|
||||
```bash
|
||||
sudo apt-get update
|
||||
|
@ -74,10 +72,11 @@ npm test
|
|||
```
|
||||
|
||||
### Testing (karma)
|
||||
Karma allows testing within one or several browser.
|
||||
Karma allows testing within one or several browsers.
|
||||
|
||||
```bash
|
||||
karma start --singleRun=true --browsers="Chrome,Firefox"
|
||||
npm run-script karma # default browsers are Chrome and Firefox
|
||||
npm run-script karma -- --browsers="Chrome,Safari" # custom browsers
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -1558,7 +1558,7 @@ var filterEvents = function (json) {
|
|||
/// TODO: add tests for it!
|
||||
var toEth = function (str) {
|
||||
/*jshint maxcomplexity:7 */
|
||||
var val = typeof str === "string" ? str.indexOf('0x') === 0 ? parseInt(str.substr(2), 16) : parseInt(str) : str;
|
||||
var val = typeof str === "string" ? str.indexOf('0x') === 0 ? parseInt(str.substr(2), 16) : parseInt(str.replace(/,/g,'').replace(/ /g,'')) : str;
|
||||
var unit = 0;
|
||||
var units = c.ETH_UNITS;
|
||||
while (val > 3000 && unit < units.length - 1)
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -12,7 +12,7 @@ module.exports = function (config) {
|
|||
|
||||
// Continuous Integration mode
|
||||
// if true, Karma captures browsers, runs the tests and exits
|
||||
singleRun: false, logLevel: config.LOG_INFO,
|
||||
singleRun: true, logLevel: config.LOG_INFO,
|
||||
//singleRun: true, logLevel: config.LOG_DEBUG,
|
||||
|
||||
// frameworks to use
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
"karma-mocha": "^0.1.10",
|
||||
"karma-safari-launcher": "^0.1.1",
|
||||
"mocha": ">=2.1.0",
|
||||
"mocha-lcov-reporter": "0.0.1",
|
||||
"unreachable-branch-transform": "^0.1.0",
|
||||
"vinyl-source-stream": "^1.0.0"
|
||||
},
|
||||
|
@ -40,8 +39,9 @@
|
|||
"build": "gulp",
|
||||
"watch": "gulp watch",
|
||||
"lint": "gulp lint",
|
||||
"test": "karma start --singleRun --browsers='Chrome,Firefox,Safari'",
|
||||
"test-coveralls": "istanbul cover _mocha -- -R spec && cat coverage/lcov.info | coveralls --verbose"
|
||||
"test": "mocha",
|
||||
"test-coveralls": "istanbul cover _mocha -- -R spec && cat coverage/lcov.info | coveralls --verbose",
|
||||
"karma": "./node_modules/karma/bin/karma start --singleRun=true --browsers=\"Chrome,Firefox\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
Loading…
Reference in New Issue