Cleanup test output, add separate coverage test command (#669)

This commit is contained in:
HenryNguyen5 2017-12-26 11:06:31 -05:00 committed by Daniel Ternyak
parent d279733fd7
commit a660ba94d8
4 changed files with 4 additions and 5 deletions

View File

@ -72,7 +72,6 @@ export function* estimateGas(): SagaIterator {
yield put(estimateGasSucceeded());
} catch (e) {
yield put(estimateGasFailed());
console.error(e);
// fallback for estimating locally
const tx = yield call(makeTransaction, payload);
const gasLimit = yield apply(tx, tx.getBaseFee);

View File

@ -73,7 +73,6 @@ export function* updateTokenBalances(): SagaIterator {
}
yield put(setTokenBalancesPending());
const tokenBalances: TokenBalanceLookup = yield call(getTokenBalances, wallet, tokens);
console.log(tokenBalances);
yield put(setTokenBalancesFulfilled(tokenBalances));
} catch (error) {
console.error('Failed to get token balances', error);

View File

@ -9,9 +9,9 @@ export function loadState<T>(): T | undefined {
if (serializedState === null) {
return undefined;
}
return JSON.parse(serializedState || '');
return JSON.parse(serializedState || '{}');
} catch (err) {
console.warn(' Warning: corrupted local storage');
console.warn(' Warning: corrupted local storage', err);
}
}

View File

@ -120,7 +120,8 @@
"prebuild": "check-node-version --package",
"build:demo": "BUILD_GH_PAGES=true webpack --config webpack_config/webpack.prod.js",
"prebuild:demo": "check-node-version --package",
"test": "jest --config=jest_config/jest.config.json --coverage",
"test:coverage": "jest --config=jest_config/jest.config.json --coverage",
"test": "jest --config=jest_config/jest.config.json",
"test:unit": "jest --config=jest_config/jest.config.json --coverage",
"test:int": "jest --config=jest_config/jest.int.config.json --coverage",
"updateSnapshot": "jest --config=jest_config/jest.config.json --updateSnapshot",