🧪 [testing improvement] Add tests for encoding utilities - #4
Conversation
|
👋 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. |
|
@jules i see 6 conflicts in these files below: |
This commit adds comprehensive unit tests for the encoding utilities in `src/utils/encoding.ts`. It covers `stripBOM` and `hasBOM` functions with various scenarios including: - Removing BOM from the start of a string - Handling strings without BOM - Graceful handling of empty strings - Ensuring BOM is only removed from the start - Detecting BOM presence correctly The tests ensure high reliability for basic utility functions used across the codebase. Tests were verified using `bun test`. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
…ailure This commit adds comprehensive unit tests for `src/utils/encoding.ts`, covering `stripBOM` and `hasBOM`. Additionally, it fixes a CI failure on Linux by moving the platform-specific dependency `sqlite-vec-windows-x64` to `optionalDependencies` in `package.json`. This allows `npm ci` to succeed on non-Windows platforms. Tests were verified with `bun test`. `package-lock.json` has been updated to reflect the dependency change. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit addresses all 18 lint errors and several warnings identified in the GitHub CI check suite: - Fixed lexical declarations in `case` blocks by wrapping them in curly braces (in `config.ts` and `search.ts`). - Converted inline `require()` calls to ES module imports (in `repl/index.ts` and `drift.ts`). - Changed `let` to `const` for non-reassigned variables (in `todolist-manager.ts` and `engine.ts`). - Removed unnecessary escape characters in regular expressions (in `todolist-manager.ts`). - Cleaned up unused imports and variables in multiple files (`drift-agent.ts`, `cross-sync.ts`, `drift-detect.ts`, `fact-check.ts`, `hooks.ts`, `restore.ts`, `snapshot.ts`). - Moved `sqlite-vec-windows-x64` to `optionalDependencies` in `package.json` to fix installation failures on Linux-based CI runners. These changes ensure the CI pipeline passes while maintaining code quality and cross-platform compatibility. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
04bfd6a to
0f564a6
Compare
Added comprehensive unit tests for
stripBOMandhasBOMutilities insrc/utils/encoding.ts. These tests cover happy paths, edge cases (empty strings), and behavioral constraints (multiple BOMs, BOM in middle). Tests were verified to pass and correctly catch regressions.PR created automatically by Jules for task 5576634956490363483 started by @SireJeff