1. Add TxProposals to mocha test page

2. The jshint tool found some instances where var was declared twice within a function. Seemed to originate from copy/paste-style coding. Most were unambiguously intended for a single block within the function. In a few cases, two declarations were consumed by one later reference. In those cases, I removed the duplicate var or I refactored slightly.
This commit is contained in:
Gregg Zigler 2014-08-06 17:07:01 -04:00
commit c8c7a57416
6 changed files with 16 additions and 12 deletions

View file

@ -225,14 +225,15 @@ describe('PublicKeyRing model', function() {
it('should merge backup', function() {
var w = getCachedW().w;
var hasChanged;
w.copayersBackup = ["a", "b"];
var hasChanged = w.mergeBackups(["b", "c"]);
hasChanged = w.mergeBackups(["b", "c"]);
w.copayersBackup.length.should.equal(3);
hasChanged.should.equal(true);
w.copayersBackup = ["a", "b", "c"];
var hasChanged = w.mergeBackups(["b", "c"]);
hasChanged = w.mergeBackups(["b", "c"]);
w.copayersBackup.length.should.equal(3);
hasChanged.should.equal(false);
});
@ -348,9 +349,10 @@ describe('PublicKeyRing model', function() {
var config = {
networkName: 'livenet',
};
var copayers;
var w = new PublicKeyRing(config);
should.exist(w);
var copayers = [];
copayers = [];
for (var i = 0; i < 2; i++) {
w.isComplete().should.equal(false);
w.addCopayer(getNewEpk());
@ -361,7 +363,7 @@ describe('PublicKeyRing model', function() {
id: w.id,
});
should.exist(w);
var copayers = [];
copayers = [];
for (var i = 0; i < 3; i++) {
w2.isComplete().should.equal(false);
w2.addCopayer(getNewEpk());