Skip to content

Commit

Permalink
Adds checksum isAddress() test cases (#1224)
Browse files Browse the repository at this point in the history
  • Loading branch information
uzyn authored and frozeman committed Dec 21, 2017
1 parent fb5ff9f commit 27b047e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/utils.isAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ var tests = [
{ value: 'function', is: false},
{ value: {}, is: false},
{ value: '0xc6d9d2cd449a754c494264e1809c50e34d64562b', is: true },
{ value: 'c6d9d2cd449a754c494264e1809c50e34d64562b', is: true }
{ value: 'c6d9d2cd449a754c494264e1809c50e34d64562b', is: true },
{ value: '0xE247A45c287191d435A8a5D72A7C8dc030451E9F', is: true },
{ value: '0xE247a45c287191d435A8a5D72A7C8dc030451E9F', is: false },
{ value: '0xe247a45c287191d435a8a5d72a7c8dc030451e9f', is: true },
{ value: '0XE247A45C287191D435A8A5D72A7C8DC030451E9F', is: false },
{ value: '0xE247A45C287191D435A8A5D72A7C8DC030451E9F', is: true }
];

describe('lib/utils/utils', function () {
Expand All @@ -17,7 +22,6 @@ describe('lib/utils/utils', function () {
it('shoud test if value ' + test.value + ' is address: ' + test.is, function () {
assert.equal(utils.isAddress(test.value), test.is);
});
});
});
});
});

0 comments on commit 27b047e

Please sign in to comment.