Browse Source

Merge pull request #786 from maraoz/remove/outdated-test

Remove outdated test and update .jshintrc
patch-2
Braydon Fuller 10 years ago
parent
commit
158ed98e71
  1. 2
      .jshintrc
  2. 15
      test/crypto/ecdsa.js

2
.jshintrc

@ -10,7 +10,7 @@
"immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"indent": 2, // Specify indentation spacing
"latedef": true, // Prohibit variable use before definition.
"newcap": false, // Require capitalization of all constructor functions e.g. `new F()`.
"newcap": true, // Require capitalization of all constructor functions e.g. `new F()`.
"noarg": true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment.
"noempty": true, // Prohibit use of empty blocks.

15
test/crypto/ecdsa.js

@ -23,7 +23,9 @@ describe("ECDSA", function() {
describe('#set', function() {
it('should set hashbuf', function() {
should.exist(ECDSA().set({hashbuf: ecdsa.hashbuf}).hashbuf);
should.exist(ECDSA().set({
hashbuf: ecdsa.hashbuf
}).hashbuf);
});
});
@ -44,7 +46,10 @@ describe("ECDSA", function() {
var ecdsa = new ECDSA({
privkey: Privkey(BN().fromBuffer(Hash.sha256(new Buffer('test')))),
hashbuf: hashbuf,
sig: new Signature({r: r, s: s})
sig: new Signature({
r: r,
s: s
})
});
ecdsa.calci();
@ -151,12 +156,6 @@ describe("ECDSA", function() {
ecdsa.sigError().should.equal('hashbuf must be a 32 byte buffer');
});
it.skip('should return an error if the pubkey is invalid', function() {
var ecdsa = new ECDSA();
ecdsa.hashbuf = Hash.sha256(new Buffer('test'));
ecdsa.sigError().indexOf("Invalid pubkey").should.equal(0);
});
it('should return an error if r, s are invalid', function() {
var ecdsa = new ECDSA();
ecdsa.hashbuf = Hash.sha256(new Buffer('test'));

Loading…
Cancel
Save