@0x/contracts-staking
: All tests but rewards_test
working.
This commit is contained in:
committed by
Lawrence Forman
parent
54ac1c284b
commit
b43fa88606
@@ -94,7 +94,10 @@ export function assertRoughlyEquals(actual: Numberish, expected: Numberish, prec
|
||||
* Asserts that two numbers are equal with up to `maxError` difference between them.
|
||||
*/
|
||||
export function assertIntegerRoughlyEquals(actual: Numberish, expected: Numberish, maxError: number = 1): void {
|
||||
const diff = new BigNumber(actual).minus(expected).abs().toNumber();
|
||||
const diff = new BigNumber(actual)
|
||||
.minus(expected)
|
||||
.abs()
|
||||
.toNumber();
|
||||
if (diff <= maxError) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user