We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What would be tests needed to support BigNumber comparison in power-assert? BigNumber is userful in cryptography, finance and blockchain.
Currently comparing BigNumbers works if you stringify them first
assert(supply.toString() == TOKEN_1ST_TOTAL_SUPPLY.toString());
But this comparison of BigNumber objects fails
assert(supply == TOKEN_1ST_TOTAL_SUPPLY);
Output:
AssertionError [ERR_ASSERTION]: # Token.spec.ts:11 assert(supply == TOKEN_1ST_TOTAL_SUPPLY) | | | | | BN{negative:0,words:#Array#,length:4,red:null} | false BN{negative:0,words:#Array#,length:4,red:null} [BN] TOKEN_1ST_TOTAL_SUPPLY => BN{negative:0,words:#Array#,length:4,red:null} [BN] supply => BN{negative:0,words:#Array#,length:4,red:null}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What would be tests needed to support BigNumber comparison in power-assert? BigNumber is userful in cryptography, finance and blockchain.
Currently comparing BigNumbers works if you stringify them first
But this comparison of BigNumber objects fails
Output:
The text was updated successfully, but these errors were encountered: