diff --git a/examples/identity.js b/examples/identity.js deleted file mode 100644 index c17bc21..0000000 --- a/examples/identity.js +++ /dev/null @@ -1,20 +0,0 @@ -var Identity = require('../lib/identity'); -var KeyPair = require('../lib/keypair'); -var Hash = require('../lib/hash'); - -var keypair = new KeyPair().fromRandom(); - -console.log( 'keypair:' , keypair ); -console.log( 'private key:' , keypair.privkey.toString('hex') ); -console.log( 'public key:' , keypair.pubkey.toString('hex') ); -console.log( 'public hash:' , Hash.sha256ripemd160( keypair.pubkey.toBuffer() ).toString('hex') ); - - -var identity = new Identity().fromPubkey( keypair.pubkey ); - -keypair.pubkey.compressed = false; -var identityComp = new Identity().fromPubkey( keypair.pubkey ); - -console.log( 'identity:' , identity ); -console.log( 'identity string:' , identity.toString() ); -console.log( 'identity string, compressed:' , identityComp.toString() ); diff --git a/test/examples.js b/test/examples.js index 4216361..8591026 100644 --- a/test/examples.js +++ b/test/examples.js @@ -1,4 +1,6 @@ -if (process.browser) +'use strict'; + +if (process.browser || true) // no examples yet return; //examples are loaded from files, which doesn't work in the browser var should = require('chai').should(); @@ -9,11 +11,8 @@ describe('Examples', function() { var filenames = fs.readdirSync(__dirname + '/../examples/'); filenames.forEach(function(filename) { - if (filename.slice(filename.length - 3) === '.js') { - describe(filename, function() { - it('should not throw any errors', function() { (function() { var save = console.log; @@ -22,11 +21,7 @@ describe('Examples', function() { console.log = save; }).should.not.throw(); }); - }); - } - }); - });