Skip to content

🧪 [testing improvement] Add tests for encoding utilities - #4

Merged
SireJeff merged 3 commits into
mainfrom
testing-improvement-encoding-utils-5576634956490363483
Feb 23, 2026
Merged

SireJeff merged 3 commits into
mainfrom
testing-improvement-encoding-utils-5576634956490363483

Conversation

@SireJeff

Copy link
Copy Markdown
Owner

Added comprehensive unit tests for stripBOM and hasBOM utilities in src/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

@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@SireJeff

Copy link
Copy Markdown
Owner Author

@jules i see 6 conflicts in these files below:
src/agent-system/todolist-manager.ts
src/agents/drift-agent.ts
src/cli/commands/cross-sync.ts
src/cli/commands/restore.ts
src/cli/repl/tui/panels/drift.ts
src/template-sync/engine.ts

SireJeff and others added 3 commits February 23, 2026 09:55
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>
@SireJeff
SireJeff force-pushed the testing-improvement-encoding-utils-5576634956490363483 branch from 04bfd6a to 0f564a6 Compare February 23, 2026 06:28
@SireJeff
SireJeff merged commit 76d69e3 into main Feb 23, 2026
1 of 3 checks passed
@SireJeff
SireJeff deleted the testing-improvement-encoding-utils-5576634956490363483 branch February 23, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant