Merge pull request #259 from ryanxcharles/bug/fix-key-tests-for-browser
fix key tests for browser
This commit is contained in:
commit
9ec3af712a
@ -16,21 +16,6 @@ describe('Key', function() {
|
|||||||
var k = new Key();
|
var k = new Key();
|
||||||
should.exist(k);
|
should.exist(k);
|
||||||
});
|
});
|
||||||
it('should not fail when called as Key() without "new"', function() {
|
|
||||||
var key = Key();
|
|
||||||
should.exist(key);
|
|
||||||
});
|
|
||||||
it('should not fail when called as Key() without "new" with some args', function() {
|
|
||||||
var key = Key(1, 2, 3, 4, 5);
|
|
||||||
should.exist(key);
|
|
||||||
});
|
|
||||||
it('should have correct properties when called with Key() without "new"', function() {
|
|
||||||
var key = Key();
|
|
||||||
key.compressed.should.equal(true);
|
|
||||||
should.not.exist(key.public);
|
|
||||||
should.not.exist(key.private);
|
|
||||||
should.exist(key);
|
|
||||||
});
|
|
||||||
it('should be able to generateSync instance', function() {
|
it('should be able to generateSync instance', function() {
|
||||||
var k = Key.generateSync();
|
var k = Key.generateSync();
|
||||||
should.exist(k);
|
should.exist(k);
|
||||||
@ -180,6 +165,25 @@ describe('Key', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('node only Key functionality', function() {
|
||||||
|
it('should not fail when called as Key() without "new"', function() {
|
||||||
|
var key = Key();
|
||||||
|
should.exist(key);
|
||||||
|
});
|
||||||
|
it('should not fail when called as Key() without "new" with some args', function() {
|
||||||
|
var key = Key(1, 2, 3, 4, 5);
|
||||||
|
should.exist(key);
|
||||||
|
});
|
||||||
|
it('should have correct properties when called with Key() without "new"', function() {
|
||||||
|
var key = Key();
|
||||||
|
key.compressed.should.equal(true);
|
||||||
|
should.not.exist(key.public);
|
||||||
|
should.not.exist(key.private);
|
||||||
|
should.exist(key);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user