mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
UT: Initial check in unit tests for amount.js.
This commit is contained in:
committed by
Stefan Thomas
parent
5425ac4bfb
commit
566833f702
@@ -12,7 +12,7 @@ var UInt160 = function () {
|
||||
// XXX Should standardize on 'i' format or 20 format.
|
||||
};
|
||||
|
||||
UInt160.prototype.from_json = function (j) {
|
||||
UInt160.from_json = function (j) {
|
||||
var u = new UInt160();
|
||||
|
||||
return u.parse_json(j);
|
||||
|
||||
13
test/amount-test.js
Normal file
13
test/amount-test.js
Normal file
@@ -0,0 +1,13 @@
|
||||
var buster = require("buster");
|
||||
|
||||
var amount = require("../js/amount.js");
|
||||
|
||||
buster.testCase("Amount", {
|
||||
"UInt160" : {
|
||||
"Parse 0" : function () {
|
||||
buster.assert.equals(0, amount.UInt160.from_json("0").value);
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
// vim:sw=2:sts=2:ts=8
|
||||
Reference in New Issue
Block a user