Skip to content

Fix core Messages test after API refactor#6

Merged
mikea merged 1 commit into
masterfrom
codex/fix-tests-after-refactoring
Mar 29, 2026
Merged

Fix core Messages test after API refactor#6
mikea merged 1 commit into
masterfrom
codex/fix-tests-after-refactoring

Conversation

@mikea

@mikea mikea commented Mar 29, 2026

Copy link
Copy Markdown
Owner

Motivation

  • The Messages helper API was refactored to use array-backed construction and pushAll/get() access, which caused the existing test to call removed methods and fail; the test was updated to match the new API while preserving the original behavioral assertions.

Description

  • Updated packages/core/test/messages.test.ts to construct Messages with an initial array and append with pushAll(...) instead of the removed push(...) usage.
  • Replaced the old replace(...)/slice(...) assertions with in-place mutation via messages.get().splice(...) and messages.get().slice(...) to verify the same in-place replacement behavior against the new API.
  • Renamed the test description to reflect the updated approach (replacing the internal array in-place).

Testing

  • Ran pnpm --filter @piccolo/core test and the test suite for @piccolo/core passed (all tests green).
  • Ran the full workspace tests with pnpm -r test and they passed (all projects/tests green).
  • Ran pnpm check (type/lint checks) and it completed successfully.

Codex Task

@mikea mikea merged commit ee2d58c into master Mar 29, 2026
1 check passed
@mikea mikea deleted the codex/fix-tests-after-refactoring branch March 29, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant