tests: use beforeEach for initialization

This commit is contained in:
Daniel Cousens 2015-02-19 08:59:10 +11:00
parent 4bcd169f6d
commit 7a515a14ee

View file

@ -200,8 +200,12 @@ describe('Transaction', function() {
describe('clone', function() { describe('clone', function() {
fixtures.valid.forEach(function(f) { fixtures.valid.forEach(function(f) {
var expected = Transaction.fromHex(f.hex) var actual, expected
var actual = expected.clone()
beforeEach(function() {
expected = Transaction.fromHex(f.hex)
actual = expected.clone()
})
it('should have value equality', function() { it('should have value equality', function() {
assert.deepEqual(actual, expected) assert.deepEqual(actual, expected)