test: Add comprehensive tests for Language::extensions#160
Draft
test: Add comprehensive tests for Language::extensions#160
Conversation
Co-authored-by: jade-codes <9397730+jade-codes@users.noreply.github.com>
Co-authored-by: jade-codes <9397730+jade-codes@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add comprehensive tests for the language-language module
test: Add comprehensive tests for Language::extensions
Jan 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #54 requested test coverage for the
Language::extensionsmethod, which returns file extensions for each supported language.Changes
Added 5 test functions to
crates/mother-core/src/scanner/tests/tests_language.rs:test_language_extensions- Verifies all language variants return correct extensionstest_extensions_consistency_with_from_extension- Validates bidirectional consistency betweenextensions()andfrom_extension()test_extensions_are_not_empty- Ensures every language has at least one extensiontest_extensions_multiple_for_typescript- Validates TypeScript's dual extensions (.ts,.tsx)test_extensions_multiple_for_javascript- Validates JavaScript's four extensions (.js,.jsx,.mjs,.cjs)Example
The consistency test ensures that
extensions()andfrom_extension()remain synchronized as new extensions are added.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
192.168.1.100/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 ceyf2aem98s7aqgbxg9x3v2s.0zkg3qp.rcgu.o csjiu7eotfqkwlkq6ex4jg0z.0zkg3qp.rcgu.o jk03xox3lff7u1d7hpf7970k.0zkg3qp.rcgu.o kn3qemt1bv0lihu8a5118inn.0zkg3qp.rcgu.o mma15qabx0kkg2rr3t4bgfgc.0zkg3qp.rcgu.o nexhi3i74gcmhw8i50tfqkpv.0zkg3qp.rcgu.o nrkz536hqv555qrcqsztow2g.0zkg3qp.rcgu.o nsk9d1gcjhbhhiqxf3u2d0ui.0zkg3qp.rcgu.o nskb05xauadln0tvcttxwnli.0zkg3qp.rcgu.o o1lbzzvolx1njb7c8ypu72fv.0zkg3qp.rcgu.o rn6xn95ih96oowwjxznl1uk8.0zkg3qp.rcgu.o wxcj�� zn6dendar8cfixi4mtdgdrbb.0zkg3qp.rcgu.o 3iha0r1drgjqvxwh0a8p69xq.0zkg3qp.rcgu.o ndor/bin/as it2 217e8a4ca5-crede--norc(packet block)/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no certs-0.7.3/src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp target/debug/bui--detach ld/libgit2-sys-6/home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.c--crate-name known-linux-gnu//home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.cthread_local e -I pointer cc(packet block)invalid-host/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 ceyf2aem98s7aqgbxg9x3v2s.0zkg3qp.rcgu.o csjiu7eotfqkwlkq6ex4jg0z.0zkg3qp.rcgu.o jk03xox3lff7u1d7hpf7970k.0zkg3qp.rcgu.o kn3qemt1bv0lihu8a5118inn.0zkg3qp.rcgu.o mma15qabx0kkg2rr3t4bgfgc.0zkg3qp.rcgu.o nexhi3i74gcmhw8i50tfqkpv.0zkg3qp.rcgu.o nrkz536hqv555qrcqsztow2g.0zkg3qp.rcgu.o nsk9d1gcjhbhhiqxf3u2d0ui.0zkg3qp.rcgu.o nskb05xauadln0tvcttxwnli.0zkg3qp.rcgu.o o1lbzzvolx1njb7c8ypu72fv.0zkg3qp.rcgu.o rn6xn95ih96oowwjxznl1uk8.0zkg3qp.rcgu.o wxcj�� zn6dendar8cfixi4mtdgdrbb.0zkg3qp.rcgu.o 3iha0r1drgjqvxwh0a8p69xq.0zkg3qp.rcgu.o ndor/bin/as it2 217e8a4ca5-crede--norc(dns block)/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no certs-0.7.3/src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp target/debug/bui--detach ld/libgit2-sys-6/home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.c--crate-name known-linux-gnu//home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.cthread_local e -I pointer cc(dns block)invalid-uri/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 ceyf2aem98s7aqgbxg9x3v2s.0zkg3qp.rcgu.o csjiu7eotfqkwlkq6ex4jg0z.0zkg3qp.rcgu.o jk03xox3lff7u1d7hpf7970k.0zkg3qp.rcgu.o kn3qemt1bv0lihu8a5118inn.0zkg3qp.rcgu.o mma15qabx0kkg2rr3t4bgfgc.0zkg3qp.rcgu.o nexhi3i74gcmhw8i50tfqkpv.0zkg3qp.rcgu.o nrkz536hqv555qrcqsztow2g.0zkg3qp.rcgu.o nsk9d1gcjhbhhiqxf3u2d0ui.0zkg3qp.rcgu.o nskb05xauadln0tvcttxwnli.0zkg3qp.rcgu.o o1lbzzvolx1njb7c8ypu72fv.0zkg3qp.rcgu.o rn6xn95ih96oowwjxznl1uk8.0zkg3qp.rcgu.o wxcj�� zn6dendar8cfixi4mtdgdrbb.0zkg3qp.rcgu.o 3iha0r1drgjqvxwh0a8p69xq.0zkg3qp.rcgu.o ndor/bin/as it2 217e8a4ca5-crede--norc(dns block)/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no certs-0.7.3/src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp target/debug/bui--detach ld/libgit2-sys-6/home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.c--crate-name known-linux-gnu//home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.cthread_local e -I pointer cc(dns block)neo4j.example.com/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 ceyf2aem98s7aqgbxg9x3v2s.0zkg3qp.rcgu.o csjiu7eotfqkwlkq6ex4jg0z.0zkg3qp.rcgu.o jk03xox3lff7u1d7hpf7970k.0zkg3qp.rcgu.o kn3qemt1bv0lihu8a5118inn.0zkg3qp.rcgu.o mma15qabx0kkg2rr3t4bgfgc.0zkg3qp.rcgu.o nexhi3i74gcmhw8i50tfqkpv.0zkg3qp.rcgu.o nrkz536hqv555qrcqsztow2g.0zkg3qp.rcgu.o nsk9d1gcjhbhhiqxf3u2d0ui.0zkg3qp.rcgu.o nskb05xauadln0tvcttxwnli.0zkg3qp.rcgu.o o1lbzzvolx1njb7c8ypu72fv.0zkg3qp.rcgu.o rn6xn95ih96oowwjxznl1uk8.0zkg3qp.rcgu.o wxcj�� zn6dendar8cfixi4mtdgdrbb.0zkg3qp.rcgu.o 3iha0r1drgjqvxwh0a8p69xq.0zkg3qp.rcgu.o ndor/bin/as it2 217e8a4ca5-crede--norc(dns block)/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no certs-0.7.3/src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp target/debug/bui--detach ld/libgit2-sys-6/home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.c--crate-name known-linux-gnu//home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.cthread_local e -I pointer cc(dns block)neo4j.production.example.com/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 ceyf2aem98s7aqgbxg9x3v2s.0zkg3qp.rcgu.o csjiu7eotfqkwlkq6ex4jg0z.0zkg3qp.rcgu.o jk03xox3lff7u1d7hpf7970k.0zkg3qp.rcgu.o kn3qemt1bv0lihu8a5118inn.0zkg3qp.rcgu.o mma15qabx0kkg2rr3t4bgfgc.0zkg3qp.rcgu.o nexhi3i74gcmhw8i50tfqkpv.0zkg3qp.rcgu.o nrkz536hqv555qrcqsztow2g.0zkg3qp.rcgu.o nsk9d1gcjhbhhiqxf3u2d0ui.0zkg3qp.rcgu.o nskb05xauadln0tvcttxwnli.0zkg3qp.rcgu.o o1lbzzvolx1njb7c8ypu72fv.0zkg3qp.rcgu.o rn6xn95ih96oowwjxznl1uk8.0zkg3qp.rcgu.o wxcj�� zn6dendar8cfixi4mtdgdrbb.0zkg3qp.rcgu.o 3iha0r1drgjqvxwh0a8p69xq.0zkg3qp.rcgu.o ndor/bin/as it2 217e8a4ca5-crede--norc(dns block)/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no certs-0.7.3/src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp target/debug/bui--detach ld/libgit2-sys-6/home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.c--crate-name known-linux-gnu//home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.cthread_local e -I pointer cc(dns block)nonexistent.host.that.does.not.exist/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 ceyf2aem98s7aqgbxg9x3v2s.0zkg3qp.rcgu.o csjiu7eotfqkwlkq6ex4jg0z.0zkg3qp.rcgu.o jk03xox3lff7u1d7hpf7970k.0zkg3qp.rcgu.o kn3qemt1bv0lihu8a5118inn.0zkg3qp.rcgu.o mma15qabx0kkg2rr3t4bgfgc.0zkg3qp.rcgu.o nexhi3i74gcmhw8i50tfqkpv.0zkg3qp.rcgu.o nrkz536hqv555qrcqsztow2g.0zkg3qp.rcgu.o nsk9d1gcjhbhhiqxf3u2d0ui.0zkg3qp.rcgu.o nskb05xauadln0tvcttxwnli.0zkg3qp.rcgu.o o1lbzzvolx1njb7c8ypu72fv.0zkg3qp.rcgu.o rn6xn95ih96oowwjxznl1uk8.0zkg3qp.rcgu.o wxcj�� zn6dendar8cfixi4mtdgdrbb.0zkg3qp.rcgu.o 3iha0r1drgjqvxwh0a8p69xq.0zkg3qp.rcgu.o ndor/bin/as it2 217e8a4ca5-crede--norc(dns block)/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no certs-0.7.3/src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp target/debug/bui--detach ld/libgit2-sys-6/home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.c--crate-name known-linux-gnu//home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.cthread_local e -I pointer cc(dns block)not-a-valid-uri/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 ceyf2aem98s7aqgbxg9x3v2s.0zkg3qp.rcgu.o csjiu7eotfqkwlkq6ex4jg0z.0zkg3qp.rcgu.o jk03xox3lff7u1d7hpf7970k.0zkg3qp.rcgu.o kn3qemt1bv0lihu8a5118inn.0zkg3qp.rcgu.o mma15qabx0kkg2rr3t4bgfgc.0zkg3qp.rcgu.o nexhi3i74gcmhw8i50tfqkpv.0zkg3qp.rcgu.o nrkz536hqv555qrcqsztow2g.0zkg3qp.rcgu.o nsk9d1gcjhbhhiqxf3u2d0ui.0zkg3qp.rcgu.o nskb05xauadln0tvcttxwnli.0zkg3qp.rcgu.o o1lbzzvolx1njb7c8ypu72fv.0zkg3qp.rcgu.o rn6xn95ih96oowwjxznl1uk8.0zkg3qp.rcgu.o wxcj�� zn6dendar8cfixi4mtdgdrbb.0zkg3qp.rcgu.o 3iha0r1drgjqvxwh0a8p69xq.0zkg3qp.rcgu.o ndor/bin/as it2 217e8a4ca5-crede--norc(dns block)/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no certs-0.7.3/src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp target/debug/bui--detach ld/libgit2-sys-6/home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.c--crate-name known-linux-gnu//home/REDACTED/work/mother/mother/target/debug/deps/clap_derive-3c563882b6a5a922.cthread_local e -I pointer cc(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.