mirror of
https://github.com/status-im/web3.js.git
synced 2025-02-23 19:48:13 +00:00
* added sub packages * added lerna monopackage management * check for package is instance * added method, subscription and utils package * moved almost all packages * moved all packages, no umbrella package yet * added extend to packages * made contract pass * made batch tests pass * expose providers * fixed test async * fixed test errors * fixed test event encode decode * fixed test formatter tests * fixed method tests * fixed method utils * fixed some eth methods * fixed some eth methods 2 * bumped version 0.18.3 to republish meteor package * fixed get* tests * fixed subscribe tests * added newBlockHeaders subscription * remove unpublished package from package.json * added sendTransaction test * fixed call test * moved files to done * changed extend * added iban tests * Fixed ALL tests * Fixed lint tests * Fixed contract tests * added method tests * added more method tests to test promiEvents extensively * added confirmation event * improved method confirmation checking
24 lines
1007 B
JavaScript
24 lines
1007 B
JavaScript
var chai = require('chai');
|
|
var Iban = require('../packages/web3-core-iban');
|
|
|
|
var assert = chai.assert;
|
|
|
|
var tests = [
|
|
{ address: '00c5496aee77c1ba1f0854206a26dda82a81d6d8', expected: 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS'},
|
|
{ address: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', expected: 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS'},
|
|
{ address: '0x11c5496aee77c1ba1f0854206a26dda82a81d6d8', expected: 'XE1222Q908LN1QBBU6XUQSO1OHWJIOS46OO'},
|
|
{ address: '0x52dc504a422f0e2a9e7632a34a50f1a82f8224c7', expected: 'XE499OG1EH8ZZI0KXC6N83EKGT1BM97P2O7'},
|
|
{ address: '0x0000a5327eab78357cbf2ae8f3d49fd9d90c7d22', expected: 'XE0600DQK33XDTYUCRI0KYM5ELAKXDWWF6'}
|
|
];
|
|
|
|
describe('lib/web3/iban', function () {
|
|
describe('fromAddress', function () {
|
|
tests.forEach(function (test) {
|
|
it('shoud create indirect iban: ' + test.expected, function () {
|
|
assert.deepEqual(Iban.fromAddress(test.address), new Iban(test.expected));
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|