Skip to content

Expand functional test extensions and check for whitespace #1131

@ang-zeyu

Description

@ang-zeyu

Is your request related to a problem?

  1. Our current testutils for functional tests aren't comparing diffs for anything other than .html files and siteData.json.
  2. The diff also ignores whitespace, which should not be the case as it can be an indicator of subtle, unintended changes.

Describe the solution you'd like

Expand the diffing to all text files, followed with an appropriate blacklist ( e.g. for .log files ).
We can use something like https://www.npmjs.com/package/istextorbinary for the first part of this check.

Describe alternatives you've considered

Manually add extensions ( e.g. .css, .js )

  • Problem: We would need to add extensions to account for all these cases as more types are encountered ( e.g. future plugin file extensions )

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions