testing failure

This commit is contained in:
Abhinav Adduri 2017-07-17 10:38:19 -07:00
parent d287f67ac0
commit e0847e08c3
2 changed files with 5 additions and 12 deletions

View File

@ -78,12 +78,8 @@ class FileReceiver extends EventEmitter {
resolve(decrypted); resolve(decrypted);
}) })
}), }),
new Promise((resolve, reject) => { fdata.filename,
resolve(fdata.filename); hexToArray(fdata.aad)
}),
new Promise((resolve, reject) => {
resolve(hexToArray(fdata.aad));
})
]); ]);
}).then(([decrypted, fname, proposedHash]) => { }).then(([decrypted, fname, proposedHash]) => {
this.emit('hashing', true); this.emit('hashing', true);
@ -96,12 +92,8 @@ class FileReceiver extends EventEmitter {
} else { } else {
this.emit('safe', true); this.emit('safe', true);
return Promise.all([ return Promise.all([
new Promise((resolve, reject) => { decrypted,
resolve(decrypted); fname
}),
new Promise((resolve, reject) => {
resolve(fname);
})
]); ]);
} }
}) })

View File

@ -40,6 +40,7 @@ describe('File Sender', function() {
}) })
it('Should get a loading event emission', function() { it('Should get a loading event emission', function() {
assert.fail();
const file = new FakeFile('hello_world.txt', ['This is some data.']) const file = new FakeFile('hello_world.txt', ['This is some data.'])
const fs = new FileSender(file); const fs = new FileSender(file);
let testLoading = true; let testLoading = true;