Skip to content

Add tests and intra-site validation for custom file types generated in MarkBind #2765

@gerteck

Description

@gerteck

Please confirm that you have searched existing issues in the repo

Yes, I have searched the existing issues

Any related issues?

Issue: #2761, Refer to PR for implementation: #2762

What is the area that this feature belongs to?

Author usability, code quality

Is your feature request related to a problem? Please describe.

After adding support for generating custom file types, there are some optimizations that can be done:

Consider adding comprehensive test cases to ensure robust handling of these scenarios:

  • Smoke test for other file types to be generated, such as ".xml", ".yaml", and invalid file extensions (e.g., empty string, missing dot prefix, special characters).
    • Add actual testcases for these file types if useful. the fileExtension property. Important scenarios that should be tested include:
    • Add testcases for edge cases like generating files with unusual extensions, behavior when combining fileExtension with other properties like layout (which shouldn't work together as documented)

Handle error scenarios such as file system write failures for non-HTML files.

  • Add some extra error handling

At the same time, to make it more polished, can add support for intra-site link validation. Because with this, even if you add a link to the resource, it will be flagged as invalid as it doesn't recognize non .md or .html links.

Describe the solution you'd like

Add testcases, add intra-site link validation of the custom file type generated (as now it only supports and recognizes .html / .md links, and gives a false positive of an invalid link).

Update documentation to reflect this.

Describe alternatives you've considered

No response

Additional context

nice to have

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions