From 81e805fcb9df4e9c425e4e51ec28884142ac2720 Mon Sep 17 00:00:00 2001 From: wltsmrz Date: Fri, 15 Aug 2014 20:18:47 -0700 Subject: [PATCH] Fix typo in invalid MemoData error --- src/js/ripple/transaction.js | 2 +- test/transaction-test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/ripple/transaction.js b/src/js/ripple/transaction.js index cbb0b018..a4d0b524 100644 --- a/src/js/ripple/transaction.js +++ b/src/js/ripple/transaction.js @@ -612,7 +612,7 @@ Transaction.prototype.addMemo = function(type, data) { } if (!/(undefined|string)/.test(typeof data)) { - throw new Error('MemoData must be string'); + throw new Error('MemoData must be a string'); } function toHex(str) { diff --git a/test/transaction-test.js b/test/transaction-test.js index df7aae62..35ba628b 100644 --- a/test/transaction-test.js +++ b/test/transaction-test.js @@ -1050,7 +1050,7 @@ describe('Transaction', function() { assert.throws(function() { transaction.addMemo(1); - }, 'MemoType must be a string'); + }, /^Error: MemoType must be a string$/); }); it('Add Memo - invalid MemoData', function() { @@ -1059,7 +1059,7 @@ describe('Transaction', function() { assert.throws(function() { transaction.addMemo('key', 1); - }, 'MemoData must be a string'); + }, /^Error: MemoData must be a string$/); }); it('Construct AccountSet transaction', function() {