test(message-parser): decouple parser tests from production helpers#39086
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
WalkthroughIntroduces a new test helpers module at packages/message-parser/tests/helpers.ts and updates ~30 message-parser test files to import helpers locally instead of from production utils; a few tests (timestamp, url) also adjust expectations to use new local factories and explicit node shapes. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/message-parser/tests/timestamp.test.ts`:
- Around line 43-45: Tests contain three identical cases using the same input
string and expected AST (timestampNode('1753178400','R') inside paragraph);
remove the duplicate entries so only one of these identical test vectors
remains, or replace duplicates with distinct cases if additional coverage was
intended; locate the duplicate array entries in timestamp.test.ts (the lines
with timestampNode and paragraph) and delete or modify the extra two so each
test case is unique.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (30)
packages/message-parser/tests/abuse.test.tspackages/message-parser/tests/any.test.tspackages/message-parser/tests/blockquotes.test.tspackages/message-parser/tests/codeFence.test.tspackages/message-parser/tests/color.test.tspackages/message-parser/tests/email.test.tspackages/message-parser/tests/emoji.test.tspackages/message-parser/tests/emoticons.test.tspackages/message-parser/tests/emphasis.test.tspackages/message-parser/tests/emphasisWithEmoticons.test.tspackages/message-parser/tests/escaped.test.tspackages/message-parser/tests/heading.test.tspackages/message-parser/tests/helpers.tspackages/message-parser/tests/image.test.tspackages/message-parser/tests/inlineCode.test.tspackages/message-parser/tests/inlineCodeStrike.test.tspackages/message-parser/tests/katex.test.tspackages/message-parser/tests/lineBreak.test.tspackages/message-parser/tests/link.test.tspackages/message-parser/tests/mention.test.tspackages/message-parser/tests/orderedList.test.tspackages/message-parser/tests/phoneNumber.test.tspackages/message-parser/tests/spoiler.test.tspackages/message-parser/tests/spoilerBlock.test.tspackages/message-parser/tests/strikethrough.test.tspackages/message-parser/tests/strongEmphasis.test.tspackages/message-parser/tests/tasks.test.tspackages/message-parser/tests/timestamp.test.tspackages/message-parser/tests/unorderedList.test.tspackages/message-parser/tests/url.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: 📦 Build Packages
- GitHub Check: cubic · AI code reviewer
- GitHub Check: CodeQL-Build
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
packages/message-parser/tests/strongEmphasis.test.tspackages/message-parser/tests/heading.test.tspackages/message-parser/tests/blockquotes.test.tspackages/message-parser/tests/emoticons.test.tspackages/message-parser/tests/any.test.tspackages/message-parser/tests/link.test.tspackages/message-parser/tests/image.test.tspackages/message-parser/tests/orderedList.test.tspackages/message-parser/tests/emphasisWithEmoticons.test.tspackages/message-parser/tests/mention.test.tspackages/message-parser/tests/timestamp.test.tspackages/message-parser/tests/inlineCode.test.tspackages/message-parser/tests/codeFence.test.tspackages/message-parser/tests/abuse.test.tspackages/message-parser/tests/tasks.test.tspackages/message-parser/tests/spoilerBlock.test.tspackages/message-parser/tests/strikethrough.test.tspackages/message-parser/tests/emphasis.test.tspackages/message-parser/tests/inlineCodeStrike.test.tspackages/message-parser/tests/url.test.tspackages/message-parser/tests/katex.test.tspackages/message-parser/tests/email.test.tspackages/message-parser/tests/escaped.test.tspackages/message-parser/tests/lineBreak.test.tspackages/message-parser/tests/unorderedList.test.tspackages/message-parser/tests/color.test.tspackages/message-parser/tests/spoiler.test.tspackages/message-parser/tests/emoji.test.tspackages/message-parser/tests/phoneNumber.test.tspackages/message-parser/tests/helpers.ts
🧠 Learnings (20)
📓 Common learnings
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/page-objects/fragments/home-content.ts:60-82
Timestamp: 2026-02-24T19:36:55.089Z
Learning: In RocketChat/Rocket.Chat e2e tests (apps/meteor/tests/e2e/page-objects/fragments/home-content.ts), thread message preview listitems do not have aria-roledescription="message", so lastThreadMessagePreview locator cannot be scoped to messageListItems (which filters for aria-roledescription="message"). It should remain scoped to page.getByRole('listitem') or mainMessageList.getByRole('listitem').
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (`test`, `page`, `expect`) for consistency in test files
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Group related tests in the same file
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize existing page objects pattern from `apps/meteor/tests/e2e/page-objects/`
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure tests run reliably in parallel without shared state conflicts
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Maintain test isolation between test cases in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `test.beforeAll()` and `test.afterAll()` for setup/teardown in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `test.step()` for complex test scenarios to improve organization in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,spec.ts} : Store commonly used locators in variables/constants for reuse
📚 Learning: 2025-12-10T21:00:54.909Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37091
File: ee/packages/abac/jest.config.ts:4-7
Timestamp: 2025-12-10T21:00:54.909Z
Learning: Rocket.Chat monorepo: Jest testMatch pattern '<rootDir>/src/**/*.spec.(ts|js|mjs)' is valid in this repo and used across multiple packages (e.g., packages/tools, ee/packages/omnichannel-services). Do not flag it as invalid in future reviews.
Applied to files:
packages/message-parser/tests/strongEmphasis.test.tspackages/message-parser/tests/blockquotes.test.tspackages/message-parser/tests/emoticons.test.tspackages/message-parser/tests/any.test.tspackages/message-parser/tests/link.test.tspackages/message-parser/tests/image.test.tspackages/message-parser/tests/orderedList.test.tspackages/message-parser/tests/emphasisWithEmoticons.test.tspackages/message-parser/tests/mention.test.tspackages/message-parser/tests/inlineCode.test.tspackages/message-parser/tests/codeFence.test.tspackages/message-parser/tests/abuse.test.tspackages/message-parser/tests/tasks.test.tspackages/message-parser/tests/spoilerBlock.test.tspackages/message-parser/tests/strikethrough.test.tspackages/message-parser/tests/emphasis.test.tspackages/message-parser/tests/inlineCodeStrike.test.tspackages/message-parser/tests/url.test.tspackages/message-parser/tests/katex.test.tspackages/message-parser/tests/email.test.tspackages/message-parser/tests/escaped.test.tspackages/message-parser/tests/lineBreak.test.tspackages/message-parser/tests/unorderedList.test.tspackages/message-parser/tests/color.test.tspackages/message-parser/tests/spoiler.test.tspackages/message-parser/tests/emoji.test.tspackages/message-parser/tests/phoneNumber.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (`test`, `page`, `expect`) for consistency in test files
Applied to files:
packages/message-parser/tests/strongEmphasis.test.tspackages/message-parser/tests/heading.test.tspackages/message-parser/tests/blockquotes.test.tspackages/message-parser/tests/any.test.tspackages/message-parser/tests/link.test.tspackages/message-parser/tests/image.test.tspackages/message-parser/tests/orderedList.test.tspackages/message-parser/tests/emphasisWithEmoticons.test.tspackages/message-parser/tests/mention.test.tspackages/message-parser/tests/timestamp.test.tspackages/message-parser/tests/inlineCode.test.tspackages/message-parser/tests/codeFence.test.tspackages/message-parser/tests/abuse.test.tspackages/message-parser/tests/tasks.test.tspackages/message-parser/tests/spoilerBlock.test.tspackages/message-parser/tests/strikethrough.test.tspackages/message-parser/tests/emphasis.test.tspackages/message-parser/tests/inlineCodeStrike.test.tspackages/message-parser/tests/url.test.tspackages/message-parser/tests/katex.test.tspackages/message-parser/tests/email.test.tspackages/message-parser/tests/escaped.test.tspackages/message-parser/tests/lineBreak.test.tspackages/message-parser/tests/unorderedList.test.tspackages/message-parser/tests/color.test.tspackages/message-parser/tests/spoiler.test.tspackages/message-parser/tests/emoji.test.tspackages/message-parser/tests/phoneNumber.test.tspackages/message-parser/tests/helpers.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `expect` matchers for assertions (`toEqual`, `toContain`, `toBeTruthy`, `toHaveLength`, etc.) instead of `assert` statements in Playwright tests
Applied to files:
packages/message-parser/tests/strongEmphasis.test.tspackages/message-parser/tests/heading.test.tspackages/message-parser/tests/blockquotes.test.tspackages/message-parser/tests/any.test.tspackages/message-parser/tests/link.test.tspackages/message-parser/tests/orderedList.test.tspackages/message-parser/tests/emphasisWithEmoticons.test.tspackages/message-parser/tests/timestamp.test.tspackages/message-parser/tests/inlineCode.test.tspackages/message-parser/tests/codeFence.test.tspackages/message-parser/tests/abuse.test.tspackages/message-parser/tests/strikethrough.test.tspackages/message-parser/tests/emphasis.test.tspackages/message-parser/tests/inlineCodeStrike.test.tspackages/message-parser/tests/url.test.tspackages/message-parser/tests/katex.test.tspackages/message-parser/tests/email.test.tspackages/message-parser/tests/lineBreak.test.tspackages/message-parser/tests/unorderedList.test.tspackages/message-parser/tests/color.test.tspackages/message-parser/tests/spoiler.test.tspackages/message-parser/tests/helpers.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure tests run reliably in parallel without shared state conflicts
Applied to files:
packages/message-parser/tests/strongEmphasis.test.tspackages/message-parser/tests/blockquotes.test.tspackages/message-parser/tests/any.test.tspackages/message-parser/tests/link.test.tspackages/message-parser/tests/image.test.tspackages/message-parser/tests/orderedList.test.tspackages/message-parser/tests/emphasisWithEmoticons.test.tspackages/message-parser/tests/mention.test.tspackages/message-parser/tests/timestamp.test.tspackages/message-parser/tests/inlineCode.test.tspackages/message-parser/tests/codeFence.test.tspackages/message-parser/tests/abuse.test.tspackages/message-parser/tests/tasks.test.tspackages/message-parser/tests/spoilerBlock.test.tspackages/message-parser/tests/strikethrough.test.tspackages/message-parser/tests/emphasis.test.tspackages/message-parser/tests/inlineCodeStrike.test.tspackages/message-parser/tests/url.test.tspackages/message-parser/tests/katex.test.tspackages/message-parser/tests/email.test.tspackages/message-parser/tests/lineBreak.test.tspackages/message-parser/tests/unorderedList.test.tspackages/message-parser/tests/color.test.tspackages/message-parser/tests/spoiler.test.tspackages/message-parser/tests/emoji.test.tspackages/message-parser/tests/phoneNumber.test.ts
📚 Learning: 2025-12-16T17:29:45.163Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37834
File: apps/meteor/tests/e2e/page-objects/fragments/admin-flextab-emoji.ts:12-22
Timestamp: 2025-12-16T17:29:45.163Z
Learning: In page object files under `apps/meteor/tests/e2e/page-objects/`, always import `expect` from `../../utils/test` (Playwright's async expect), not from Jest. Jest's `expect` has a synchronous signature and will cause TypeScript errors when used with web-first assertions like `toBeVisible()`.
Applied to files:
packages/message-parser/tests/strongEmphasis.test.tspackages/message-parser/tests/link.test.tspackages/message-parser/tests/mention.test.tspackages/message-parser/tests/timestamp.test.tspackages/message-parser/tests/inlineCode.test.tspackages/message-parser/tests/codeFence.test.tspackages/message-parser/tests/abuse.test.tspackages/message-parser/tests/tasks.test.tspackages/message-parser/tests/spoilerBlock.test.tspackages/message-parser/tests/strikethrough.test.tspackages/message-parser/tests/emphasis.test.tspackages/message-parser/tests/inlineCodeStrike.test.tspackages/message-parser/tests/katex.test.tspackages/message-parser/tests/email.test.tspackages/message-parser/tests/color.test.tspackages/message-parser/tests/spoiler.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `test.step()` for complex test scenarios to improve organization in Playwright tests
Applied to files:
packages/message-parser/tests/strongEmphasis.test.tspackages/message-parser/tests/blockquotes.test.tspackages/message-parser/tests/any.test.tspackages/message-parser/tests/link.test.tspackages/message-parser/tests/orderedList.test.tspackages/message-parser/tests/emphasisWithEmoticons.test.tspackages/message-parser/tests/timestamp.test.tspackages/message-parser/tests/inlineCode.test.tspackages/message-parser/tests/codeFence.test.tspackages/message-parser/tests/abuse.test.tspackages/message-parser/tests/tasks.test.tspackages/message-parser/tests/spoilerBlock.test.tspackages/message-parser/tests/strikethrough.test.tspackages/message-parser/tests/emphasis.test.tspackages/message-parser/tests/inlineCodeStrike.test.tspackages/message-parser/tests/url.test.tspackages/message-parser/tests/email.test.tspackages/message-parser/tests/escaped.test.tspackages/message-parser/tests/lineBreak.test.tspackages/message-parser/tests/unorderedList.test.tspackages/message-parser/tests/color.test.tspackages/message-parser/tests/spoiler.test.tspackages/message-parser/tests/phoneNumber.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to **/*.{ts,tsx,js} : Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Applied to files:
packages/message-parser/tests/strongEmphasis.test.tspackages/message-parser/tests/heading.test.tspackages/message-parser/tests/blockquotes.test.tspackages/message-parser/tests/any.test.tspackages/message-parser/tests/link.test.tspackages/message-parser/tests/orderedList.test.tspackages/message-parser/tests/timestamp.test.tspackages/message-parser/tests/inlineCode.test.tspackages/message-parser/tests/codeFence.test.tspackages/message-parser/tests/tasks.test.tspackages/message-parser/tests/strikethrough.test.tspackages/message-parser/tests/emphasis.test.tspackages/message-parser/tests/inlineCodeStrike.test.tspackages/message-parser/tests/url.test.tspackages/message-parser/tests/escaped.test.tspackages/message-parser/tests/lineBreak.test.tspackages/message-parser/tests/helpers.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Maintain test isolation between test cases in Playwright tests
Applied to files:
packages/message-parser/tests/strongEmphasis.test.tspackages/message-parser/tests/blockquotes.test.tspackages/message-parser/tests/any.test.tspackages/message-parser/tests/link.test.tspackages/message-parser/tests/image.test.tspackages/message-parser/tests/orderedList.test.tspackages/message-parser/tests/emphasisWithEmoticons.test.tspackages/message-parser/tests/mention.test.tspackages/message-parser/tests/timestamp.test.tspackages/message-parser/tests/inlineCode.test.tspackages/message-parser/tests/codeFence.test.tspackages/message-parser/tests/abuse.test.tspackages/message-parser/tests/tasks.test.tspackages/message-parser/tests/spoilerBlock.test.tspackages/message-parser/tests/strikethrough.test.tspackages/message-parser/tests/emphasis.test.tspackages/message-parser/tests/inlineCodeStrike.test.tspackages/message-parser/tests/katex.test.tspackages/message-parser/tests/email.test.tspackages/message-parser/tests/escaped.test.tspackages/message-parser/tests/lineBreak.test.tspackages/message-parser/tests/unorderedList.test.tspackages/message-parser/tests/color.test.tspackages/message-parser/tests/spoiler.test.tspackages/message-parser/tests/emoji.test.tspackages/message-parser/tests/phoneNumber.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Group related tests in the same file
Applied to files:
packages/message-parser/tests/strongEmphasis.test.tspackages/message-parser/tests/heading.test.tspackages/message-parser/tests/blockquotes.test.tspackages/message-parser/tests/any.test.tspackages/message-parser/tests/link.test.tspackages/message-parser/tests/image.test.tspackages/message-parser/tests/orderedList.test.tspackages/message-parser/tests/emphasisWithEmoticons.test.tspackages/message-parser/tests/mention.test.tspackages/message-parser/tests/timestamp.test.tspackages/message-parser/tests/inlineCode.test.tspackages/message-parser/tests/codeFence.test.tspackages/message-parser/tests/abuse.test.tspackages/message-parser/tests/tasks.test.tspackages/message-parser/tests/spoilerBlock.test.tspackages/message-parser/tests/strikethrough.test.tspackages/message-parser/tests/emphasis.test.tspackages/message-parser/tests/inlineCodeStrike.test.tspackages/message-parser/tests/katex.test.tspackages/message-parser/tests/email.test.tspackages/message-parser/tests/lineBreak.test.tspackages/message-parser/tests/unorderedList.test.tspackages/message-parser/tests/color.test.tspackages/message-parser/tests/spoiler.test.tspackages/message-parser/tests/emoji.test.tspackages/message-parser/tests/phoneNumber.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,spec.ts} : Follow Page Object Model pattern consistently in Playwright tests
Applied to files:
packages/message-parser/tests/strongEmphasis.test.tspackages/message-parser/tests/any.test.tspackages/message-parser/tests/link.test.tspackages/message-parser/tests/inlineCode.test.tspackages/message-parser/tests/abuse.test.tspackages/message-parser/tests/tasks.test.tspackages/message-parser/tests/url.test.tspackages/message-parser/tests/lineBreak.test.tspackages/message-parser/tests/color.test.ts
📚 Learning: 2025-11-19T18:20:07.720Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: packages/i18n/src/locales/en.i18n.json:918-921
Timestamp: 2025-11-19T18:20:07.720Z
Learning: Repo: RocketChat/Rocket.Chat — i18n/formatting
Learning: This repository uses a custom message formatting parser in UI blocks/messages; do not assume standard Markdown rules. For keys like Call_ended_bold, Call_not_answered_bold, Call_failed_bold, and Call_transferred_bold in packages/i18n/src/locales/en.i18n.json, retain the existing single-asterisk emphasis unless maintainers request otherwise.
Applied to files:
packages/message-parser/tests/strongEmphasis.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : All test files must be created in `apps/meteor/tests/e2e/` directory
Applied to files:
packages/message-parser/tests/heading.test.tspackages/message-parser/tests/orderedList.test.tspackages/message-parser/tests/codeFence.test.tspackages/message-parser/tests/tasks.test.tspackages/message-parser/tests/inlineCodeStrike.test.tspackages/message-parser/tests/email.test.tspackages/message-parser/tests/lineBreak.test.tspackages/message-parser/tests/unorderedList.test.tspackages/message-parser/tests/emoji.test.ts
📚 Learning: 2025-11-24T17:08:26.531Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/test-cases.mdc:0-0
Timestamp: 2025-11-24T17:08:26.531Z
Learning: Applies to **/*test-case*.md : Write test cases in Markdown format following the standardized template with ALL necessary components: Title, Description, Preconditions, Type, Steps, and Expected Result
Applied to files:
packages/message-parser/tests/heading.test.tspackages/message-parser/tests/orderedList.test.tspackages/message-parser/tests/unorderedList.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize existing page objects pattern from `apps/meteor/tests/e2e/page-objects/`
Applied to files:
packages/message-parser/tests/any.test.tspackages/message-parser/tests/link.test.tspackages/message-parser/tests/mention.test.tspackages/message-parser/tests/codeFence.test.tspackages/message-parser/tests/tasks.test.tspackages/message-parser/tests/emphasis.test.tspackages/message-parser/tests/email.test.tspackages/message-parser/tests/color.test.tspackages/message-parser/tests/phoneNumber.test.tspackages/message-parser/tests/helpers.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to **/*.spec.ts : Use descriptive test names that clearly communicate expected behavior in Playwright tests
Applied to files:
packages/message-parser/tests/any.test.tspackages/message-parser/tests/timestamp.test.tspackages/message-parser/tests/abuse.test.tspackages/message-parser/tests/strikethrough.test.tspackages/message-parser/tests/url.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Prefer web-first assertions (`toBeVisible`, `toHaveText`, etc.) in Playwright tests
Applied to files:
packages/message-parser/tests/timestamp.test.tspackages/message-parser/tests/url.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `test.beforeAll()` and `test.afterAll()` for setup/teardown in Playwright tests
Applied to files:
packages/message-parser/tests/timestamp.test.ts
📚 Learning: 2026-02-24T19:36:55.089Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/page-objects/fragments/home-content.ts:60-82
Timestamp: 2026-02-24T19:36:55.089Z
Learning: In RocketChat/Rocket.Chat e2e tests (apps/meteor/tests/e2e/page-objects/fragments/home-content.ts), thread message preview listitems do not have aria-roledescription="message", so lastThreadMessagePreview locator cannot be scoped to messageListItems (which filters for aria-roledescription="message"). It should remain scoped to page.getByRole('listitem') or mainMessageList.getByRole('listitem').
Applied to files:
packages/message-parser/tests/spoilerBlock.test.tspackages/message-parser/tests/spoiler.test.ts
📚 Learning: 2025-11-24T17:08:26.531Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/test-cases.mdc:0-0
Timestamp: 2025-11-24T17:08:26.531Z
Learning: Applies to **/*test-case*.md : List specific preconditions required before test case execution
Applied to files:
packages/message-parser/tests/unorderedList.test.ts
🧬 Code graph analysis (1)
packages/message-parser/tests/url.test.ts (2)
packages/message-parser/tests/helpers.ts (3)
paragraph(6-6)link(39-42)plain(34-34)packages/message-parser/src/utils.ts (3)
paragraph(27-27)link(78-81)plain(65-65)
🔇 Additional comments (32)
packages/message-parser/tests/helpers.ts (1)
1-102: Solid test-helper extraction with broad token coverage.This helper module cleanly centralizes test AST construction and removes coupling to production utility functions, which is exactly the right direction for regression-safe parser tests.
packages/message-parser/tests/abuse.test.ts (1)
2-2: Correct helper import migration.Using
./helpershere keeps expected AST construction independent from production utility internals.packages/message-parser/tests/tasks.test.ts (1)
2-2: Nice decoupling in task-parser tests.The switch to
./helperspreserves test intent while removing oracle coupling to production helper code.packages/message-parser/tests/escaped.test.ts (1)
2-2: Import refactor looks good.Escaped-sequence expectations now rely on local test helpers instead of production utilities, which improves regression detection quality.
packages/message-parser/tests/katex.test.ts (1)
2-2: Good helper-source switch for KaTeX tests.This keeps parser expectations explicit and independent from production-side utility behavior.
packages/message-parser/tests/heading.test.ts (1)
2-2: Heading tests now correctly use local builders.The import move to
./helpersis clean and maintains expected-output clarity.packages/message-parser/tests/blockquotes.test.ts (1)
2-2: Blockquote test import update is correct.Switching to
./helperskeeps expected AST fixtures test-owned and reduces regression masking risk.packages/message-parser/tests/phoneNumber.test.ts (1)
2-2: Phone-number test migration to local helpers is good.Expected token construction is now test-local, which better protects against helper-induced false positives.
packages/message-parser/tests/any.test.ts (1)
1-10: LGTM!Import source correctly updated to use local test helpers, and test logic remains unchanged. This aligns with the PR objective of decoupling tests from production code.
packages/message-parser/tests/spoilerBlock.test.ts (1)
1-30: LGTM!Import source correctly updated to use local test helpers. The spoiler block test cases remain unchanged and provide good coverage for various spoiler scenarios.
packages/message-parser/tests/emoji.test.ts (1)
1-62: LGTM!Import source correctly updated to use local test helpers. Comprehensive test coverage for both shortcode and unicode emoji parsing remains intact.
packages/message-parser/tests/emphasis.test.ts (1)
1-130: LGTM!Import source correctly updated to use local test helpers. The extensive emphasis parsing test suite remains unchanged with comprehensive edge case coverage.
packages/message-parser/tests/emphasisWithEmoticons.test.ts (1)
1-58: LGTM!Import source correctly updated to use local test helpers. Test cases for emphasis with emoticons interactions remain unchanged.
packages/message-parser/tests/inlineCodeStrike.test.ts (1)
1-14: LGTM!Import source correctly updated to use local test helpers. Test cases for inline code with strikethrough combinations remain unchanged.
packages/message-parser/tests/emoticons.test.ts (1)
1-70: LGTM!Import source correctly updated to use local test helpers. Comprehensive emoticon parsing test suite remains unchanged with good coverage of rendering and non-rendering scenarios.
packages/message-parser/tests/color.test.ts (1)
1-18: LGTM!Import source correctly updated to use local test helpers. Color parsing tests remain unchanged with good coverage of valid and invalid hex color formats.
packages/message-parser/tests/orderedList.test.ts (1)
2-2: Import migration is clean and aligned with the decoupling goal.Using
./helpershere keeps test expectations independent from production utility behavior.packages/message-parser/tests/strikethrough.test.ts (1)
2-2: Good helper import swap for test isolation.This change keeps the strikethrough tests independent from production helper internals.
packages/message-parser/tests/mention.test.ts (1)
2-2: Nice update to local test helpers.The import change supports explicit, test-owned expected structures without altering behavior coverage.
packages/message-parser/tests/codeFence.test.ts (1)
2-2: Import adjustment looks correct.Switching to
./helperskeeps this suite consistent with the new test-only builder pattern.packages/message-parser/tests/inlineCode.test.ts (1)
2-2: Clean helper source migration.This keeps inline-code expectations test-local and avoids coupling with production utility implementations.
packages/message-parser/tests/lineBreak.test.ts (1)
2-2: Looks good—import now points to the test helper module.This is a solid decoupling step with no behavior drift in the suite.
packages/message-parser/tests/email.test.ts (1)
2-2: Good import-path update for helper isolation.The test continues to assert explicit expected nodes while removing dependency on production helpers.
packages/message-parser/tests/image.test.ts (1)
2-2: Change is correct and consistent with the suite-wide refactor.Importing test helpers from
./helpersimproves separation between tests and production utilities.packages/message-parser/tests/strongEmphasis.test.ts (1)
1-2: LGTM!The import source correctly updated to use the local test helpers module. This change aligns with the PR objective of decoupling tests from production utilities.
packages/message-parser/tests/spoiler.test.ts (1)
1-2: LGTM!Import correctly updated to use local test helpers while preserving all test cases and their expectations.
packages/message-parser/tests/link.test.ts (1)
1-2: LGTM!Import correctly updated. The comprehensive test coverage for link parsing remains intact with the new local helpers.
packages/message-parser/tests/unorderedList.test.ts (1)
1-2: LGTM!Import correctly updated to use local test helpers.
packages/message-parser/tests/timestamp.test.ts (2)
3-18: LGTM!Defining helpers inline in this file is appropriate since
timestampNodehas a unique structure (withfallbackproperty) that differs from other token helpers. This approach keeps timestamp-specific test logic self-contained.
53-71: LGTM!Good use of Jest fake timers to test relative hour timestamp parsing with a deterministic system time. The
beforeAll/afterAllhooks properly manage timer state.packages/message-parser/tests/url.test.ts (2)
2-3: LGTM!Good separation of concerns: test helpers imported from
./helpersfor building expected outputs, whileautoLinkis retained from production code specifically for testing its dedicated behavior (lines 153-181). This aligns with the PR's rationale.
137-145: LGTM!Custom domain tests correctly updated to use explicit
link()expectations instead of oracle-derived outputs, ensuring tests will detect regressions if the underlying helper behavior changes.
There was a problem hiding this comment.
1 issue found across 30 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/message-parser/tests/timestamp.test.ts">
<violation number="1" location="packages/message-parser/tests/timestamp.test.ts:3">
P2: Duplicate AST builder helpers are redefined inline instead of importing the shared test helpers, increasing maintenance overhead and contradicting the test-helper reuse guideline.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| import { parse } from '../src'; | ||
| import { bold, paragraph, plain, strike, timestamp, timestampFromHours } from '../src/utils'; | ||
|
|
||
| const plain = (value: string) => ({ type: 'PLAIN_TEXT' as const, value }); |
There was a problem hiding this comment.
P2: Duplicate AST builder helpers are redefined inline instead of importing the shared test helpers, increasing maintenance overhead and contradicting the test-helper reuse guideline.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/message-parser/tests/timestamp.test.ts, line 3:
<comment>Duplicate AST builder helpers are redefined inline instead of importing the shared test helpers, increasing maintenance overhead and contradicting the test-helper reuse guideline.</comment>
<file context>
@@ -1,10 +1,26 @@
import { parse } from '../src';
-import { bold, paragraph, plain, strike, timestamp, timestampFromHours } from '../src/utils';
+
+const plain = (value: string) => ({ type: 'PLAIN_TEXT' as const, value });
+
+const paragraph = (value: Array<Record<string, unknown>>) => ({ type: 'PARAGRAPH' as const, value });
</file context>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/message-parser/tests/timestamp.test.ts (1)
3-18: Prefer shared test builders fromtests/helpers.tsinstead of local duplicates.This file redefines factories that now exist in
packages/message-parser/tests/helpers.ts. Importing shared test builders keeps AST helper semantics centralized and avoids drift across parser tests.Proposed refactor
import { parse } from '../src'; +import { bold, paragraph, plain, strike, timestampNode } from './helpers'; -const plain = (value: string) => ({ type: 'PLAIN_TEXT' as const, value }); - -const paragraph = (value: Array<Record<string, unknown>>) => ({ type: 'PARAGRAPH' as const, value }); - -const bold = (value: Array<Record<string, unknown>>) => ({ type: 'BOLD' as const, value }); - -const strike = (value: Array<Record<string, unknown>>) => ({ type: 'STRIKE' as const, value }); - -const timestampNode = (value: string, format: 't' | 'T' | 'd' | 'D' | 'f' | 'F' | 'R' = 't') => ({ - type: 'TIMESTAMP' as const, - value: { - timestamp: value, - format, - }, - fallback: plain(`<t:${value}:${format}>`), -});🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/message-parser/tests/timestamp.test.ts` around lines 3 - 18, Replace the local factory functions plain, paragraph, bold, strike and timestampNode with the shared test builders from packages/message-parser/tests/helpers.ts: remove the local const declarations for plain, paragraph, bold, strike and timestampNode and add an import for the corresponding helper builders (the exported names for those builders in helpers.ts) at the top of the test file; ensure the test uses the helpers' timestamp builder (with the same signature for timestamp and format) and update any calls to match the helpers' exported names if they differ.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/message-parser/tests/timestamp.test.ts`:
- Around line 3-18: Replace the local factory functions plain, paragraph, bold,
strike and timestampNode with the shared test builders from
packages/message-parser/tests/helpers.ts: remove the local const declarations
for plain, paragraph, bold, strike and timestampNode and add an import for the
corresponding helper builders (the exported names for those builders in
helpers.ts) at the top of the test file; ensure the test uses the helpers'
timestamp builder (with the same signature for timestamp and format) and update
any calls to match the helpers' exported names if they differ.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/message-parser/tests/timestamp.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: 📦 Build Packages
- GitHub Check: CodeQL-Build
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
packages/message-parser/tests/timestamp.test.ts
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (`test`, `page`, `expect`) for consistency in test files
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Group related tests in the same file
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure tests run reliably in parallel without shared state conflicts
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize existing page objects pattern from `apps/meteor/tests/e2e/page-objects/`
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `expect` matchers for assertions (`toEqual`, `toContain`, `toBeTruthy`, `toHaveLength`, etc.) instead of `assert` statements in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `test.beforeAll()` and `test.afterAll()` for setup/teardown in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `test.step()` for complex test scenarios to improve organization in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Maintain test isolation between test cases in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,spec.ts} : Follow Page Object Model pattern consistently in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,spec.ts} : Store commonly used locators in variables/constants for reuse
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (`test`, `page`, `expect`) for consistency in test files
Applied to files:
packages/message-parser/tests/timestamp.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure tests run reliably in parallel without shared state conflicts
Applied to files:
packages/message-parser/tests/timestamp.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `test.step()` for complex test scenarios to improve organization in Playwright tests
Applied to files:
packages/message-parser/tests/timestamp.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `expect` matchers for assertions (`toEqual`, `toContain`, `toBeTruthy`, `toHaveLength`, etc.) instead of `assert` statements in Playwright tests
Applied to files:
packages/message-parser/tests/timestamp.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Maintain test isolation between test cases in Playwright tests
Applied to files:
packages/message-parser/tests/timestamp.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Group related tests in the same file
Applied to files:
packages/message-parser/tests/timestamp.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to **/*.spec.ts : Use descriptive test names that clearly communicate expected behavior in Playwright tests
Applied to files:
packages/message-parser/tests/timestamp.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `test.beforeAll()` and `test.afterAll()` for setup/teardown in Playwright tests
Applied to files:
packages/message-parser/tests/timestamp.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to **/*.{ts,tsx,js} : Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Applied to files:
packages/message-parser/tests/timestamp.test.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Prefer web-first assertions (`toBeVisible`, `toHaveText`, etc.) in Playwright tests
Applied to files:
packages/message-parser/tests/timestamp.test.ts
🔇 Additional comments (2)
packages/message-parser/tests/timestamp.test.ts (2)
51-59: Nice isolation in the relative-hour suite.Using fake timers with explicit setup/teardown here is clean and keeps the new relative parsing cases deterministic.
Also applies to: 61-69
24-25: Acknowledge codebase convention before changing matchers.While
toEqualprovides stricter equality thantoMatchObject, all 28 test files inpackages/message-parser/tests/consistently usetoMatchObject. Changing only this file creates inconsistency. If this change is part of a broader refactor to migrate the entire package to stricter matchers, expand the scope to cover all test files. Otherwise, provide evidence that the parser output contains problematic extra properties that are being masked bytoMatchObject.Likely an incorrect or invalid review comment.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #39086 +/- ##
===========================================
+ Coverage 70.66% 70.71% +0.04%
===========================================
Files 3191 3192 +1
Lines 112965 113064 +99
Branches 20451 20508 +57
===========================================
+ Hits 79829 79951 +122
+ Misses 31088 31068 -20
+ Partials 2048 2045 -3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/jira ARCH-1935 |
Summary
packages/message-parser/tests/helpers.ts../src/utilsautoLinkproduction import only for dedicated helper behavior assertionsWhy
Parser tests were deriving expected output from the same production helpers used by parsing logic (
timestamp*,autoLink), which can mask regressions when helper behavior changes.Validation
yarn workspace '@rocket.chat/message-parser' exec eslint tests/helpers.ts tests/*.test.tsFix #39085
Fix #39295
COMM-144
Summary by CodeRabbit
Tests
Refactor
Task: ARCH-2009