Skip to content
This repository has been archived by the owner on Jun 7, 2019. It is now read-only.

Commit

Permalink
♻️ Update signature test and test format
Browse files Browse the repository at this point in the history
  • Loading branch information
shuse2 committed Apr 17, 2018
1 parent ac98258 commit 39ffc5b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions test/transactions/create_signature_object.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ describe('#createSignatureObject', () => {
publicKey:
'87696cfc48f5f5bd4ec2473615ac1618ffedfdc20005ae71a3d0dba209471c04',
};
const generatedSignature =
'8222dc7c26cc0ed649af71ebef5d292deb6ad029dadec0cf061b40e2ea9572d1b691e92302ac8cb64e5ea5f8fd846410c8fa033236c8930203ae3b7f3c6bd30c';

describe('when invalid transaction is used', () => {
it('should throw an Error when sender public key is mutated', () => {
Expand Down Expand Up @@ -81,7 +83,7 @@ describe('#createSignatureObject', () => {
let signatureObject;
beforeEach(() => {
signatureObject = createSignatureObject(transaction, account.passphrase);
return Promise.resolve(true);
return Promise.resolve();
});

it('should have the same transaction id as the input', () => {
Expand All @@ -93,8 +95,7 @@ describe('#createSignatureObject', () => {
});

it('should have non-empty hex string signature', () => {
expect(signatureObject.signature).not.to.be.empty;
return expect(signatureObject.signature).to.be.hexString;
return expect(signatureObject.signature).to.equal(generatedSignature);
});
});
});
2 changes: 1 addition & 1 deletion test/transactions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
import transaction from 'transactions';

describe('expect(transaction)s', () => {
describe('transaction', () => {
describe('exports', () => {
it('should have #transfer', () => {
return expect(transaction)
Expand Down

0 comments on commit 39ffc5b

Please sign in to comment.