diff options
| author | Gokulnath Reddy <[email protected]> | 2017-06-19 22:43:15 +1000 |
|---|---|---|
| committer | Gokulnath Reddy <[email protected]> | 2017-06-19 22:43:49 +1000 |
| commit | 97a479b62e02764befaf3ba27a2abcb80216b8bd (patch) | |
| tree | 3dc9baaab95f97fad37d5468f2a9d191ac9630ae /test | |
| parent | df296352d46730b2e79a05506c2e416e5fce2c9d (diff) | |
| download | faker-97a479b62e02764befaf3ba27a2abcb80216b8bd.tar.xz faker-97a479b62e02764befaf3ba27a2abcb80216b8bd.zip | |
Generate an ethereum address
Diffstat (limited to 'test')
| -rw-r--r-- | test/finance.unit.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/finance.unit.js b/test/finance.unit.js index 3593ce72..61ae7b6c 100644 --- a/test/finance.unit.js +++ b/test/finance.unit.js @@ -227,6 +227,14 @@ describe('finance.js', function () { }); }); + describe("ethereumAddress()", function(){ + it("returns a random ethereum address", function(){ + var ethereumAddress = faker.finance.ethereumAddress(); + + assert.ok(ethereumAddress.match(/^(0x)[0-9a-f]{40}$/i)); + }); + }); + describe("iban()", function () { var ibanLib = require('../lib/iban'); it("returns a random yet formally correct IBAN number", function () { |
