Skip to content

Refactor, fix boolean cookie attributes, and add test coverage#13

Merged
iamgergo merged 3 commits into
masterfrom
copilot/discover-refactoring-options-and-bugs
Mar 27, 2026
Merged

Refactor, fix boolean cookie attributes, and add test coverage#13
iamgergo merged 3 commits into
masterfrom
copilot/discover-refactoring-options-and-bugs

Conversation

Copilot AI commented Mar 27, 2026

Copy link
Copy Markdown
Contributor
  • Fix bug: boolean cookie attributes (Secure: true) emitted Secure=true instead of the spec-correct Secure; false values now correctly omit the attribute
  • Refactor: extract _getCookiePattern(key) to eliminate duplicated regex construction in get() and isset()
  • Simplify set() cookie string builder — replace reduce+initialValue with clean filter+map
  • Add Vitest + jsdom test infrastructure (vitest.config.js, devDependencies, updated package.json test script)
  • Add 32 comprehensive tests covering all public methods, namespace support, _qualify(), and _getCookiePattern()
  • Add GitHub Actions workflow (.github/workflows/test.yml) that runs tests on every push and pull request

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Agent-Logs-Url: https://github.com/conedevelopment/qkie/sessions/b0cee0f1-8158-43c4-b960-72e48a5a1b8a

Co-authored-by: iamgergo <6567179+iamgergo@users.noreply.github.com>
Copilot AI changed the title [WIP] Explore refactoring options and add test coverage Refactor, fix boolean cookie attributes, and add test coverage Mar 27, 2026
Copilot AI requested a review from iamgergo March 27, 2026 06:50
@iamgergo

Copy link
Copy Markdown
Member

@copilot Could you add a GH action as well that runs the tests?

Agent-Logs-Url: https://github.com/conedevelopment/qkie/sessions/2bc628d7-cfbb-4bf6-a0fc-e08c3280cfbf

Co-authored-by: iamgergo <6567179+iamgergo@users.noreply.github.com>

Copilot AI commented Mar 27, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Could you add a GH action as well that runs the tests?

Added .github/workflows/test.yml in commit 41c0fa6. It triggers on every push and pull request, runs npm ci then npm test.

@iamgergo iamgergo marked this pull request as ready for review March 27, 2026 07:13
@iamgergo iamgergo merged commit 407bb56 into master Mar 27, 2026
2 checks passed
@iamgergo iamgergo deleted the copilot/discover-refactoring-options-and-bugs branch March 27, 2026 07:13
Copilot stopped work on behalf of iamgergo due to an error March 27, 2026 07:13
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.

2 participants