-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand test extensions and fix whitespace checks #1156
Conversation
f2a1638
to
4d6a78f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
* @param {string} expected | ||
* @param {string} actual | ||
* @param {string} filePathName | ||
* @returns {bool} if diff was found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be boolean
for JSDoc types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the review!
If there's no other issues i'll merge this in a while since it affects all PRs
The diffing utilities used for functional tests only check for differences in html files and the siteData json file. Additionally, the diffs are whitespace and newline insensitive, which can cause subtle, unintended changes to go unnoticed. Let's expand the range of files to diff, using the isTextOrBinary package as a first guard against diffing binary files. Let's add additional constants that guard against binary files not recognised by the package, or misrecognised as such. Let's also change the diffing function used to be whitespace and newline sensitive. Since whitespaces and newlines now appear in the diffs, let's also improve the diff printing utilities to account for it.
* 'master' of https://github.com/MarkBind/markbind: (41 commits) Document adding new site content in DG (MarkBind#1153) Add relative date feature (MarkBind#908) Use <br> to separate lines of code block (MarkBind#1176) Parse popovers for footnotes (MarkBind#1155) Resolve comments Expand test extensions and fix whitespace checks (MarkBind#1156) Address comments Upgrade js-beautify and provide option to turn it off (MarkBind#1116) Normalize inline puml line ending before hashing (MarkBind#1174) Update tests (MarkBind#1178) Remove fixed bugs from test\functional\test_site\bugs\index.md` (MarkBind#1148) Fix bug in Search for UG and DG (MarkBind#1147) Add inline puml support (MarkBind#1100) Fix hrefs for headings with angular brackets (MarkBind#1089) Update tests for 2.13.1 (MarkBind#1169) 2.13.1 Update vue-strap version to v2.0.1-markbind.39 Fix fontawsome icons don't show underlines to indicate modal/tooltip (MarkBind#1133) 2.13.0 Update test files ...
The diffing utilities used for functional tests only check for differences in html files and the siteData json file. Additionally, the diffs are whitespace and newline insensitive, which can cause subtle, unintended changes to go unnoticed. Let's expand the range of files to diff, using the isTextOrBinary package as a first guard against diffing binary files. Let's add additional constants that guard against binary files not recognised by the package, or misrecognised as such. Let's also change the diffing function used to be whitespace and newline sensitive. Since whitespaces and newlines now appear in the diffs, let's also improve the diff printing utilities to account for it.
What is the purpose of this pull request? (put "X" next to an item, remove the rest)
• [x] Bug fix
Fixes #1131 - expand test extensions, fix whitespace - newline sensitivity
Fixes #254 - test 'asset files'
What is the rationale for this request?
To fix / improve our functional test utilities.
What changes did you make? (Give an overview)
|-----empty-line-----|
( 50 characters long ):Provide some example code that this change will affect:
Filtering of files to be diffed using
isTextOrBinary
package, followed by a manual blacklist for file types not recognised ( e.g..woff/woff2
) / other files we want to not diff (.log
)Is there anything you'd like reviewers to focus on?
na
Testing instructions:
Proposed commit message: (wrap lines at 72 characters)
Expand test extensions and fix whitespace checks
The diffing utilities used for functional tests only check for
differences in html files and the siteData json file.
Additionally, the diffs are whitespace and newline insensitive, which
can cause subtle, unintended changes to go unnoticed.
Let's expand the range of files to diff, using the isTextOrBinary
package as a first guard against diffing binary files.
Let's add additional constants that guard against binary files not
recognised by the package, or misrecognised as such.
Let's also change the diffing function used to be whitespace and
newline sensitive.
Since whitespaces and newlines now appear in the diffs, let's also
improve the diff printing utilities to account for it.