test: improve coverage for toDatasetAttrs by refactoring to html-utils#52
test: improve coverage for toDatasetAttrs by refactoring to html-utils#52
Conversation
- Refactored `toDatasetAttrs`, `toBoolString`, and `toDashCase` from `src/helpers.ts` to a new `src/html-utils.ts` module to remove dependency on `vscode` module during testing. - Added comprehensive unit tests in `tests/unit/html-utils.test.ts`. - Updated `src/helpers.ts` to re-export the utilities to maintain backward compatibility. - Updated `package-lock.json` to match `package.json` version (1.2.7). Co-authored-by: zknpr <96851588+zknpr@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Merged as part of v1.3.0 release in PR #65 |
Acknowledged. Glad to see the improvements included in the release! |
This PR addresses a testing gap for the
toDatasetAttrsfunction insrc/helpers.ts.Previously,
src/helpers.tsimportedvscodeat the top level, making it difficult to unit test pure functions within it using the Node.js test runner.Changes:
toDatasetAttrs,toBoolString, and internaltoDashCasehelper to a new filesrc/html-utils.ts. This file has no dependencies onvscode.tests/unit/html-utils.test.tswith 100% coverage for the extracted functions.src/helpers.tsnow re-exports these functions, ensuring no breaking changes for existing consumers.package-lock.jsonwas updated to sync withpackage.jsonversion 1.2.7.Tests passed:
tests/unit/html-utils.test.ts: 10/10 tests passed.PR created automatically by Jules for task 5188204892513283198 started by @zknpr