Closed (fixed)
Project:
Markdown
Version:
3.0.x-dev
Component:
Code
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
11 May 2020 at 07:37 UTC
Updated:
27 Nov 2025 at 18:29 UTC
Jump to comment: Most recent
Currently, there are absolutely no tests for this project.
This is/was, in part, due to time constraints and the need to get a stable release out the door.
It is also in part due to the requirements of external libraries and PECL extensions that will make setting up DrupalCI... challenging (the latter not, yet, supported #2949210: Drupalci Roadmap).
We can, however, start to implement tests for the Drupal side of things (i.e. plugin managers, plugins, etc.).
Split out areas where tests are needed and create sub-tasks for implementing them.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #6
megachrizA useful first start would be to specify all possible libraries that the Markdown module can work with as dev dependencies. These can be listed in the "require-dev" section in the composer.json file. These dependencies are then only downloaded by the testbot, not when requiring the module using the command "require drupal/markdown".
See the issue branch for this change. I based it on the 8.x-2.x branch for now, because it looks like that one is ahead of 3.0.x.
Note: in #3222716: Error: Call to a member function getId() on bool in markdown_preprocess_installable_library() (line 179 of markdown.module) I added a base class for Markdown kernel tests.
Comment #9
megachrizI've written a few tests to render a text with each markdown parser. Only for the CommonMark PECL parser I marked the test as incomplete because that one requires a PECL extension. Without the
markTestIncomplete()call, the fails with the errorCall to undefined function CommonMark\Parse().Comment #11
megachrizI think that we have enough tests to start with.
Comment #13
joelpittetThanks @megachriz for taking this on. I am committing this to the dev branch.
Comment #16
megachriz@joelpittet
Ah, thanks for merging! That work project that I talked with you about on Slack last week has been demanding all my work time in the past 6+ months, so I wasn't able to continue with Markdown during office hours.
Comment #17
megachrizFor your interest, in 3135359-temp I made an attempt to run tests for both CommonMark v1 and v2, so that we could get test coverage for #3283349: Add support for Commonmark v2. Since the tests weren't merged before, I temporarily experimented with it in this issue instead.
So ideally, the commits from that temp branch that are worth it, should move to #3283349: Add support for Commonmark v2.
Comment #18
joelpittetThanks @megachriz I will try to move the commits over there.