Repository navigation
test(desktop): remove redundant muyajs-engine unit specs (Phase F) - #4422
Merged
Merged
Conversation
These 8 specs import the legacy `muya/lib` (muyajs) alias and exercise
engine-level markdown / slug / word-extraction behavior that @muyajs/core
now owns and covers with its own suites:
- markdown-basic / list-indentation / nested-mixed-lists / export-markdown
-> muya commonmark.spec + gfm.spec + roundTrip.spec conformance
- markdown-footnotes -> muya footnote.spec / footnoteHtml.spec
- markdown-strong-cjk -> muya strongCjkFlanking.spec (#4401)
- slugger -> muya generateGithubSlug (getTOC.spec)
- extract-word -> muya replaceCurrentWord.spec + current-word logic
They test code the app no longer uses (the muyajs engine) and would break
when packages/muyajs is removed in Phase H. Desktop-specific unit specs
(i18n, match-electron-accelerator, native-theme) are kept.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues the desktop → @muyajs/core migration by removing desktop unit specs that exercised the legacy muya/lib (muyajs) engine behavior which is now owned and covered by packages/muya test suites.
Changes:
- Removed desktop unit specs for markdown parsing/round-tripping (basic markdown, list indentation, nested mixed lists).
- Removed desktop unit specs for legacy marked/muya utilities (footnotes lexer, slugger, export-markdown table normalization).
- Removed desktop unit spec for legacy spellchecker word extraction.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/desktop/test/unit/specs/slugger.spec.ts | Removed legacy muya/lib slugger unit spec now covered by @muyajs/core slug/TOC tests. |
| packages/desktop/test/unit/specs/markdown-strong-cjk.spec.ts | Removed legacy inline tokenizer CJK-strong spec now covered by @muyajs/core strong CJK flanking suite. |
| packages/desktop/test/unit/specs/markdown-nested-mixed-lists.spec.ts | Removed legacy nested mixed lists regression spec now covered by @muyajs/core list/state round-trip tests. |
| packages/desktop/test/unit/specs/markdown-list-indentation.spec.ts | Removed legacy list indentation matrix spec now covered by @muyajs/core list serialization tests. |
| packages/desktop/test/unit/specs/markdown-footnotes.spec.ts | Removed legacy footnotes lexer spec now covered by @muyajs/core marked footnote extension + render/state tests. |
| packages/desktop/test/unit/specs/markdown-basic.spec.ts | Removed legacy markdown round-trip specs now covered by @muyajs/core conformance/round-trip suites. |
| packages/desktop/test/unit/specs/extract-word.spec.ts | Removed legacy extractWord spec now covered by @muyajs/core current-word / replaceCurrentWord coverage. |
| packages/desktop/test/unit/specs/export-markdown.spec.ts | Removed legacy ExportMarkdown.normalizeTable spec now covered by @muyajs/core table serialization regression tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Build artifacts for PR #4422: Run: https://github.com/marktext/marktext/actions/runs/27177118768
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What (Phase F1/F3)
Removes 8 desktop unit specs that import the legacy
muya/lib(muyajs) alias and test engine markdown/slug/word behavior @muyajs/core now owns and covers with its own suites:They exercise code the app no longer runs and would break when
packages/muyajsis deleted in Phase H. Desktop-specific specs (i18n,match-electron-accelerator,native-theme) are kept.Phase F status
ag-→mu-selectors): done — no muya-DOMag-selectors remain; the lone.ag-dialog-tableinparagraph-blocks.spec.tsis the desktop's own table dialog (with.el-overlayfallback). Themuya/libmentions incrash-*e2e specs are historical comments only.Part of the muyajs → @muyajs/core migration.