Skip to content

Commit

Permalink
[FAB-16622] - remove to.be.ok
Browse files Browse the repository at this point in the history
Signed-off-by: lesleyannj <lesleyannj@hotmail.com>
Change-Id: I4a89187176a692239ac91f5f9f17fec79f5af5b1
  • Loading branch information
lesleyannjordan committed Oct 10, 2019
1 parent cfac81f commit 2ccc9db
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions libraries/fabric-shim/test/unit/iterators.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ describe('Iterator', () => {
const result = await ci.close();

expect(result).to.deep.equal('some resolution');
expect(mockHandler.handleQueryStateClose.calledOnce).to.be.ok;

expect(mockHandler.handleQueryStateClose.calledOnce).to.be.true;
expect(mockHandler.handleQueryStateClose.firstCall.args).to.deep.equal([mockResponse.id, channel_id, txID]);
});
});
Expand Down Expand Up @@ -112,7 +113,7 @@ describe('Iterator', () => {

const result = ci._createAndEmitResult();

expect(getResultFromBytesStub.calledOnce).to.be.ok;
expect(getResultFromBytesStub.calledOnce).to.be.true;
expect(getResultFromBytesStub.firstCall.args).to.deep.equal(['some result bytes']);
expect(result).to.deep.equal({
value: 'some result',
Expand All @@ -126,7 +127,7 @@ describe('Iterator', () => {

const result = ci._createAndEmitResult();

expect(getResultFromBytesStub.calledOnce).to.be.ok;
expect(getResultFromBytesStub.calledOnce).to.be.true;
expect(getResultFromBytesStub.firstCall.args).to.deep.equal(['some result bytes']);
expect(ci.currentLoc).to.deep.equal(1);
expect(result).to.deep.equal({
Expand All @@ -141,7 +142,7 @@ describe('Iterator', () => {

const result = ci._createAndEmitResult();

expect(getResultFromBytesStub.calledOnce).to.be.ok;
expect(getResultFromBytesStub.calledOnce).to.be.true;
expect(getResultFromBytesStub.firstCall.args).to.deep.equal(['some result bytes']);
expect(ci.currentLoc).to.deep.equal(1);
expect(result).to.deep.equal({
Expand All @@ -156,7 +157,7 @@ describe('Iterator', () => {

const result = ci._createAndEmitResult();

expect(getResultFromBytesStub.calledOnce).to.be.ok;
expect(getResultFromBytesStub.calledOnce).to.be.true;
expect(getResultFromBytesStub.firstCall.args).to.deep.equal(['some result bytes']);
expect(ci.currentLoc).to.deep.equal(1);
expect(result).to.deep.equal({
Expand All @@ -173,7 +174,7 @@ describe('Iterator', () => {

const result = ci._createAndEmitResult();

expect(getResultFromBytesStub.calledOnce).to.be.ok;
expect(getResultFromBytesStub.calledOnce).to.be.true;
expect(getResultFromBytesStub.firstCall.args).to.deep.equal(['some more result bytes']);
expect(ci.currentLoc).to.deep.equal(2);
expect(result).to.deep.equal({
Expand All @@ -193,7 +194,7 @@ describe('Iterator', () => {

const result = ci._createAndEmitResult();

expect(getResultFromBytesStub.calledOnce).to.be.ok;
expect(getResultFromBytesStub.calledOnce).to.be.true;
expect(getResultFromBytesStub.firstCall.args).to.deep.equal(['some result bytes']);
expect(ci.currentLoc).to.deep.equal(1);
expect(result).to.deep.equal(expectedResult);
Expand Down Expand Up @@ -281,7 +282,7 @@ describe('Iterator', () => {
const result = ci.next();

await expect(result).to.eventually.be.rejected;
expect(createAndEmitResultStub.notCalled).to.be.ok;
expect(createAndEmitResultStub.notCalled).to.be.true;
});

it ('should return done if response does not has_more and listenerCount for end > 0', async () => {
Expand Down Expand Up @@ -310,7 +311,7 @@ describe('Iterator', () => {
it ('should extend CommonIterator using QUERY for type', () => {
const sqi = new StateQueryIterator(mockHandler, channel_id, txID, mockResponse);

expect(sqi instanceof Iterator.__get__('CommonIterator')).to.be.ok;
expect(sqi instanceof Iterator.__get__('CommonIterator')).to.be.true;
expect(sqi.type).to.deep.equal('QUERY');
});
});
Expand All @@ -319,7 +320,7 @@ describe('Iterator', () => {
it ('should extend CommonIterator using HISTORY for type', () => {
const hqi = new HistoryQueryIterator(mockHandler, channel_id, txID, mockResponse);

expect(hqi instanceof Iterator.__get__('CommonIterator')).to.be.ok;
expect(hqi instanceof Iterator.__get__('CommonIterator')).to.be.true;
expect(hqi.type).to.deep.equal('HISTORY');
});
});
Expand Down

0 comments on commit 2ccc9db

Please sign in to comment.