Skip to content

test: add comprehensive unit test suite for FileTypeSupport#314

Merged
haiphucnguyen merged 1 commit intohaiphucnguyen:mainfrom
miguel-baptista07:fix/add-unit-tests-filetypesupport-273
Apr 14, 2026
Merged

test: add comprehensive unit test suite for FileTypeSupport#314
haiphucnguyen merged 1 commit intohaiphucnguyen:mainfrom
miguel-baptista07:fix/add-unit-tests-filetypesupport-273

Conversation

@miguel-baptista07
Copy link
Copy Markdown
Contributor

Fixes #273

Changes

  • Added CONFIG_EXTENSIONS set with 10 extensionless config files (Dockerfile, Makefile, Jenkinsfile, etc.)
  • Added isConfigFile() method to check extensionless config files
  • Added comprehensive test suite covering:
    • isImageExtension with positive and negative cases
    • isTextExtractable for all categories (TEXT, CODE, DOCUMENT extensions)
    • getExtension edge cases (no extension, double extension .tar.gz, dotfiles)
    • isSupported covering ALL_SUPPORTED_EXTENSIONS
    • isConfigFile covering all CONFIG_EXTENSIONS entries

All tests passing.

@cla-assistant
Copy link
Copy Markdown

cla-assistant bot commented Apr 13, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@miguel-baptista07 miguel-baptista07 force-pushed the fix/add-unit-tests-filetypesupport-273 branch from d5e0da4 to e1cb88b Compare April 13, 2026 12:28
- Add tests for isImageExtension with positive and negative cases
- Add tests for isTextExtractable for all categories
- Add tests for getExtension edge cases (no extension, double extension)
- Add tests for isSupported covering ALL_SUPPORTED_EXTENSIONS
- Add CONFIG_EXTENSIONS set and isConfigFile() method
- Add tests for isConfigFile covering all extensionless config files

Fixes haiphucnguyen#273

Signed-off-by: Miguel <miguelkevlin23@gmail.com>
@miguel-baptista07 miguel-baptista07 force-pushed the fix/add-unit-tests-filetypesupport-273 branch from e1cb88b to 5b8fdd5 Compare April 13, 2026 12:34
@miguel-baptista07
Copy link
Copy Markdown
Contributor Author

Hi @haiphucnguyen, I already signed the CLA for PR #315. Could you recheck it? Thanks!

@haiphucnguyen haiphucnguyen merged commit a3a8cb8 into haiphucnguyen:main Apr 14, 2026
13 of 24 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.

Add a unit test suite for FileTypeSupport

3 participants