Skip to content

test(developer): add coverage tests for warning messages in kmc-analyze/AnalyzeOskCharacterUse#15021

Merged
mcdurdin merged 5 commits intokeymanapp:masterfrom
cvosoft:test/add-osk-character-use-warnings
Oct 27, 2025
Merged

test(developer): add coverage tests for warning messages in kmc-analyze/AnalyzeOskCharacterUse#15021
mcdurdin merged 5 commits intokeymanapp:masterfrom
cvosoft:test/add-osk-character-use-warnings

Conversation

@cvosoft
Copy link
Copy Markdown
Contributor

@cvosoft cvosoft commented Oct 24, 2025

Summary

Adds two new unit tests covering the warning cases
Warn_PreviousMapDidNotIncludeCounts and
Warn_PreviousMapDidIncludeCounts in AnalyzeOskCharacterUse.

These tests increase branch coverage for kmc-analyze.

@github-project-automation github-project-automation bot moved this to Todo in Keyman Oct 24, 2025
@keymanapp-test-bot keymanapp-test-bot bot added the user-test-missing User tests have not yet been defined for the PR label Oct 24, 2025
@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot bot commented Oct 24, 2025

User Test Results

Test specification and instructions

User tests are not required

@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S14 milestone Oct 24, 2025
@keyman-server
Copy link
Copy Markdown
Collaborator

This pull request is from an external repo and will not automatically be built. The build must still be passed before it can be merged. Ask one of the team members to make a manual build of this PR.

@darcywong00 darcywong00 modified the milestones: A19S14, A19S15 Oct 24, 2025
@mcdurdin mcdurdin changed the title test(kmc-analyze): add coverage tests for warning messages in AnalyzeOskCharacterUse test(developer): add coverage tests for warning messages in kmc-analyze/AnalyzeOskCharacterUse Oct 25, 2025
@mcdurdin mcdurdin added developer/ test Any acceptance test issue labels Oct 25, 2025
@mcdurdin
Copy link
Copy Markdown
Member

Test-bot: skip

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-missing User tests have not yet been defined for the PR label Oct 25, 2025
Copy link
Copy Markdown
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR! It's looking good. I have some changes requested but they are basically cleanup.

@cvosoft
Copy link
Copy Markdown
Contributor Author

cvosoft commented Oct 25, 2025

I’ve addressed all the review comments (file rename, fixture move, setup pattern).
Please let me know if there’s anything I might have missed or if you’d prefer further adjustments before merge.

Thanks again for the detailed review and explanations — very helpful for learning the Keyman conventions!

Copy link
Copy Markdown
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just two small assertions to add to the tests, for completeness. Approving this with those two changes.

Greatly appreciate your contribution 😁

@cvosoft
Copy link
Copy Markdown
Contributor Author

cvosoft commented Oct 27, 2025

Looks great! Just two small assertions to add to the tests, for completeness. Approving this with those two changes.

Greatly appreciate your contribution 😁

Thanks! I've added the two assertions as suggested — everything should be covered now. 😊

Comment on lines +6 to +8
import { AnalyzeOskCharacterUse } from './osk-character-use/index.js';
import { TestCompilerCallbacks } from '@keymanapp/developer-test-helpers';
import { AnalyzerMessages } from './analyzer-messages.js';
Copy link
Copy Markdown
Member

@mcdurdin mcdurdin Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds failed; looks like import paths need adjustment (VSCode sometimes doesn't get these quite right automatically):

Suggested change
import { AnalyzeOskCharacterUse } from './osk-character-use/index.js';
import { TestCompilerCallbacks } from '@keymanapp/developer-test-helpers';
import { AnalyzerMessages } from './analyzer-messages.js';
import { TestCompilerCallbacks } from '@keymanapp/developer-test-helpers';
import { AnalyzeOskCharacterUse } from '../src/osk-character-use/index.js';
import { AnalyzerMessages } from '../src/analyzer-messages.js';

(reordered per our style guide suggestion, not important though)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! The test now runs successfully locally after fixing the import paths.
(I initially thought the issue was due to an outdated Docker image.)

@mcdurdin mcdurdin merged commit 4a685ba into keymanapp:master Oct 27, 2025
6 of 7 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Oct 27, 2025
@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 19.0.146-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

developer/ test Any acceptance test issue

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants