virtualization-service / vir_ranker

This component is part of service virtualization system and it's core responsibility it to create a ranking object which is used later in the virtualization process to determine the most accurate response
0 stars 0 forks source link

[feature] code coverage #3

Open pratik73 opened 4 years ago

pratik73 commented 4 years ago

as of today the ranker only has unit tests for the core logic and about 70% code is not tested.

let's see how we can everything in ranker, and probably replace Jasmine with Jest for testing framework

pratik73 commented 4 years ago

let's use Jest as our testing framework as opposed to Raw Jasmine, here is an article on how to setup Jest - https://www.robinwieruch.de/node-js-jest

the expectations of this task is,

  1. setup Jest to run test cases and generate coverage reports
  2. Increase code coverage by writing unit tests for all lines of code
  3. we may need to use Mocking feature from Jest to mimic RabbitMq calls and DB responses 3.1. refer to the following url for mocking - https://jestjs.io/docs/en/mock-function-api