sourcefuse / sourcefuse/loopback4-microservice-catalog
Incorrect Redis Data Source Naming and Test Helper Generation in CLI
- Dominant language
- TypeScript
- Stars
- 297
- Forks
- 78
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 4
Description
Describe the bug
The CLI currently has multiple issues related to Redis data source handling and test configuration:
-
Incorrect Redis Name in Test Helper:
The test-helper.ts file generated by the CLI includes an incorrect or default Redis data source name, which leads to broken test setup or runtime errors. -
Improper Redis Data Source Name:
The Redis data source name used in the generated files is either missing or not following the expected naming convention, causing inconsistencies in the codebase. -
Incorrect .nycrc File Generation:
The generated .nycrc file is either missing required fields or is incorrectly formatted, which impacts test coverage reporting. -
Datasource Name Missing or Incorrect:
The actual data source files do not have the correct or expected Redis data source name injected, affecting application behavior and bootstrapping.
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CLI generation path for test-helper.ts, the generated .nycrc file, and the datasource files described in the report. Reproduce generation with a Redis datasource and compare the emitted datasource name and coverage configuration against the expected naming convention and required fields. Done means generated test helpers, .nycrc, and datasource files use the correct Redis name and support the test setup without runtime errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, redis, typescript
- Domain
- backend, cli, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100