zowe / zowe/zowe-cli-sample-plugin
Tests fails when mocking fs.readFileSync
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 15
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 6
Description
The test failure has been address in the CLI repo by properly mocking fs.readFileSync but allowing yargs to use the real implementation.
See https://github.com/zowe/zowe-cli/blob/master/__mocks__/fs.ts#L52-L55
Originally posted by @zFernand0 in https://github.com/zowe/zowe-cli-sample-plugin/pull/53#issuecomment-713636640
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 by comparing the plugin's test mocking setup with mocks/fs.ts lines 52-55 in the referenced zowe-cli repository, focusing on how yargs uses the real implementation. Run the failing tests and consider the issue done when the fs.readFileSync mock works without breaking yargs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100