Skip to content

Reorganize test suite for better maintainability#753

Merged
theoephraim merged 2 commits into
mainfrom
refactor/reorganize-test-suite
Feb 14, 2026
Merged

Reorganize test suite for better maintainability#753
theoephraim merged 2 commits into
mainfrom
refactor/reorganize-test-suite

Conversation

@theoephraim
Copy link
Copy Markdown
Owner

Summary

Reorganizes the test suite for better maintainability and clarity by grouping related tests together and splitting large test files into focused units.

Changes

Test File Reorganization

  • Merged cell-formatting.test.ts into cells.test.ts: Cell formatting tests now live alongside other cell operations
  • Trimmed manage.test.ts: Now focused solely on document and sheet lifecycle operations
  • Created worksheet-operations.test.ts: Contains all data manipulation operations (paste, sort, trim, etc.)
  • Created worksheet-features.test.ts: Contains worksheet features like filters, conditional formatting, banding, and developer metadata

Type Fix

  • Fixed updateDimensionProperties to accept Partial<WorksheetDimensionProperties> instead of requiring all properties
  • This matches the actual API behavior (partial updates with field masks) and improves the developer experience

Files Changed

  • src/lib/GoogleSpreadsheetWorksheet.ts - Type fix for updateDimensionProperties
  • src/test/cells.test.ts - Now includes cell formatting tests
  • src/test/manage.test.ts - Trimmed to doc/sheet lifecycle only
  • src/test/worksheet-operations.test.ts - New file with data operations
  • src/test/worksheet-features.test.ts - New file with worksheet features
  • Deleted: src/test/cell-formatting.test.ts

Verification

  • ✅ Linting passes
  • ✅ Tests pass (verified with utils.test.ts sanity check)
  • ✅ No TypeScript errors

🤖 Generated with Claude Code

- Merge cell-formatting.test.ts into cells.test.ts
- Split manage.test.ts into focused files:
  - manage.test.ts: doc & sheet lifecycle only
  - worksheet-operations.test.ts: data manipulation operations
  - worksheet-features.test.ts: worksheet features (filters, formatting, metadata)
- Fix WorksheetDimensionProperties type to accept Partial for updateDimensionProperties

This reorganization makes the test suite more maintainable by grouping related tests together and splitting the large manage.test.ts file into logical units.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 14, 2026

⚠️ No Changeset found

Latest commit: 2c7d056

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

- Google API omits properties with 0 values (green/blue in backgroundColor)
- textRotation is a oneof field - can only set angle OR vertical, not both
- Just verify textRotation is set without checking specific angle value

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@theoephraim theoephraim merged commit c9f917c into main Feb 14, 2026
2 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