test: add more tests for `FitPlugin.fit` by tbouffard · Pull Request #888 · maxGraph/maxGraph · GitHub
Skip to content

test: add more tests for FitPlugin.fit#888

Merged
tbouffard merged 4 commits into
mainfrom
test/more_fit_tests
Jul 28, 2025
Merged

test: add more tests for FitPlugin.fit#888
tbouffard merged 4 commits into
mainfrom
test/more_fit_tests

Conversation

@tbouffard

@tbouffard tbouffard commented Jul 25, 2025

Copy link
Copy Markdown
Member

Test options: border, ignore height, ignore width, keepOrigin, margin

Summary by CodeRabbit

  • Tests
    • Improved clarity in test variable naming for better readability.
    • Added new test cases covering scale limits, ignoring dimensions, special cases, and options like border, keep origin, and margin when fitting content.
  • Refactor
    • Simplified fit method with early returns and clearer control flow without changing core functionality.

Test options: border, keepOrigin, margin
@tbouffard tbouffard added the chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...) label Jul 25, 2025
@coderabbitai

coderabbitai Bot commented Jul 25, 2025

Copy link
Copy Markdown

Comment thread packages/core/__tests__/view/plugins/FitPlugin.test.ts Outdated
Comment thread packages/core/__tests__/view/plugins/FitPlugin.test.ts Outdated
@tbouffard tbouffard changed the title test: add tests for FitPlugin.fit test: add moe tests for FitPlugin.fit Jul 27, 2025
@tbouffard tbouffard changed the title test: add moe tests for FitPlugin.fit test: add more tests for FitPlugin.fit Jul 27, 2025
@sonarqubecloud

Copy link
Copy Markdown

@tbouffard tbouffard merged commit 95cdbc8 into main Jul 28, 2025
7 checks passed
@tbouffard tbouffard deleted the test/more_fit_tests branch July 28, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant