From c8c95b4bd2e57be11bd250c652babbad9d6ffd35 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 21 Nov 2017 13:09:23 -0600 Subject: Add postFormatter for logs --- packages/0x.js/test/token_wrapper_test.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages/0x.js/test') diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts index b30762e8c..07276877d 100644 --- a/packages/0x.js/test/token_wrapper_test.ts +++ b/packages/0x.js/test/token_wrapper_test.ts @@ -361,6 +361,8 @@ describe('TokenWrapper', () => { (async () => { const callback = (err: Error, logEvent: DecodedLogEvent) => { expect(logEvent).to.not.be.undefined(); + expect(logEvent.logIndex).to.be.equal(0); + expect(logEvent.transactionIndex).to.be.equal(0); const args = logEvent.args; expect(args._from).to.be.equal(coinbase); expect(args._to).to.be.equal(addressWithoutFunds); -- cgit v1.2.3 From 0747e162fa41a281d1fdce60cad494e265d09bb0 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 21 Nov 2017 13:18:29 -0600 Subject: Add instanceOf assertion --- packages/0x.js/test/token_wrapper_test.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'packages/0x.js/test') diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts index 07276877d..c32c528e6 100644 --- a/packages/0x.js/test/token_wrapper_test.ts +++ b/packages/0x.js/test/token_wrapper_test.ts @@ -363,6 +363,7 @@ describe('TokenWrapper', () => { expect(logEvent).to.not.be.undefined(); expect(logEvent.logIndex).to.be.equal(0); expect(logEvent.transactionIndex).to.be.equal(0); + expect(logEvent.blockNumber).to.be.instanceOf(Number); const args = logEvent.args; expect(args._from).to.be.equal(coinbase); expect(args._to).to.be.equal(addressWithoutFunds); -- cgit v1.2.3 From 66750f7349435dbcdb783a214e21800466ec3ac1 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 21 Nov 2017 14:03:32 -0600 Subject: Fix tests --- packages/0x.js/test/token_wrapper_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/0x.js/test') diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts index c32c528e6..1a7cb9e40 100644 --- a/packages/0x.js/test/token_wrapper_test.ts +++ b/packages/0x.js/test/token_wrapper_test.ts @@ -363,7 +363,7 @@ describe('TokenWrapper', () => { expect(logEvent).to.not.be.undefined(); expect(logEvent.logIndex).to.be.equal(0); expect(logEvent.transactionIndex).to.be.equal(0); - expect(logEvent.blockNumber).to.be.instanceOf(Number); + expect(logEvent.blockNumber).to.be.a('number'); const args = logEvent.args; expect(args._from).to.be.equal(coinbase); expect(args._to).to.be.equal(addressWithoutFunds); -- cgit v1.2.3