Importer: Add unit tests
- Dominant language
- JavaScript
- Stars
- 23
- Forks
- 62
- Avg merge
- 24m
- Merged PRs (30d)
- 1
Description
This is a very important piece of the search process and it is not covered by any unit tests. Setting up a test environment for this is quite complex which is way it was put off in the past.
Proposal:
- mock out collect btr data function (removes need for btr db setup)
- mock out collect colin data function (removes need for colin db setup)
- mock out collect lear data function (removes need for lear db setup)
- mock out solr connection for reindex prep
- mock out token call and bor-api import call
Tests will secure that the records are being parsed correctly from what we expect to receive from the db. There is complex logic involved here so these will be very valuable tests even though the db data collection is mocked
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the importer and its existing test setup, then trace the collect btr data, collect colin data, and collect lear data functions. Mock those collectors plus the Solr connection, token call, and bor-api import call; done means tests verify records are parsed correctly without the three database setups.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100