From 7a515a14ee71c7093347cbf8bed7d848af4c2bf4 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Thu, 19 Feb 2015 08:59:10 +1100 Subject: [PATCH] tests: use beforeEach for initialization --- test/transaction.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/transaction.js b/test/transaction.js index b54185e..56e5ab5 100644 --- a/test/transaction.js +++ b/test/transaction.js @@ -200,8 +200,12 @@ describe('Transaction', function() { describe('clone', function() { fixtures.valid.forEach(function(f) { - var expected = Transaction.fromHex(f.hex) - var actual = expected.clone() + var actual, expected + + beforeEach(function() { + expected = Transaction.fromHex(f.hex) + actual = expected.clone() + }) it('should have value equality', function() { assert.deepEqual(actual, expected)