Skip to content

[Repo Assist] test: add unit tests for findFiles and improve extension test suite#66

Merged
soderlind merged 1 commit intomasterfrom
repo-assist/improve-testing-2026-03-09-8e479a9093401311
Mar 9, 2026
Merged

[Repo Assist] test: add unit tests for findFiles and improve extension test suite#66
soderlind merged 1 commit intomasterfrom
repo-assist/improve-testing-2026-03-09-8e479a9093401311

Conversation

@soderlind
Copy link
Copy Markdown
Owner

  • Extract findFiles() from PHPCBF class into lib/utils.js for testability
  • Add test/unit.test.js with 7 unit tests using Node.js built-in test runner covering: exact match, missing file, tree walk-up, deepest match wins, array of names, parent boundary, single-segment directory
  • Add npm script 'test:unit' to run unit tests without VS Code host
  • Improve test/extension.test.js: replace placeholder assertions with real tests for extension presence, activation, and command registration
  • No functional behaviour changes to extension.js

- Extract findFiles() from PHPCBF class into lib/utils.js for testability
- Add test/unit.test.js with 7 unit tests using Node.js built-in test runner
  covering: exact match, missing file, tree walk-up, deepest match wins,
  array of names, parent boundary, single-segment directory
- Add npm script 'test:unit' to run unit tests without VS Code host
- Improve test/extension.test.js: replace placeholder assertions with
  real tests for extension presence, activation, and command registration
- No functional behaviour changes to extension.js

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@soderlind soderlind merged commit 2c4aba7 into master Mar 9, 2026
6 checks passed
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