DAVFoundation / dav-js

Enable integration of JavaScript, TypeScript, and Node.js code with the DAV Network
https://developers.dav.network/
MIT License
75 stars 50 forks source link

Issue #50 DAVFoundation/dav-js/issues/50 #56

Closed davarie closed 6 years ago

davarie commented 6 years ago

Description

Removing the assignment of BidParams so that it is just defined but not assigned.

Related Issue

https://github.com/DAVFoundation/dav-js/issues/50

Motivation and Context

In src/Bid.test.ts when bidParams is defined it was given a value (a new BidParams object). But that value was immediately being overwritten in the beforeEach function.

How Has This Been Tested?

I tested this with npm run jest

Output: PASS src/Bid.test.ts (12.583s) Bid class requestCommitment method ✓ should return confirmation for already confirmed bid (349ms) ✓ should return confirmation after bidder had confirmed the bid (280ms) ✓ should return confirmation after bidder had confirmed the bid, and another bid confirmation was filtered (507ms) ✓ should throw due to kafka error in sendParams (420ms) ○ skipped 1 test accept method ✓ should not throw any errors when get valid input and no errors (81ms) ✓ should throw due to topic creation failure (74ms) ✓ should throw to due to unconfirmed bid (72ms) ○ skipped 1 test missions method ○ skipped 3 tests messages method ✓ should get one message when get valid input and no errors (75ms) ○ skipped 1 test sendMessage method ✓ should success and call relevant function (73ms) ✓ should throw because topic id == selfId (74ms) commitmentRequests method ✓ should return valid commitment requests when there are no kafka errors (73ms) ✓ should throw error due to kafka error (76ms)

Test Suites: 17 passed, 17 total Tests: 21 skipped, 100 passed, 121 total Snapshots: 0 total Time: 18.412s Ran all test suites. [13:27:21] Finished 'jest' after 19 s

Screenshots (if appropriate):

Types of changes

Checklist: