test: fix generate coverage report & test failure when not supported language with Prismjs#271
Merged
yoshinorin merged 2 commits intomasterfrom Feb 2, 2022
Merged
test: fix generate coverage report & test failure when not supported language with Prismjs#271yoshinorin merged 2 commits intomasterfrom
yoshinorin merged 2 commits intomasterfrom
Conversation
yoshinorin
commented
Jan 31, 2022
| // Use language: 'plain' to simplify the test | ||
| const result = prismHighlight(input, { tab: ' ', lang: 'plain' }); | ||
| // Use language: 'plain-text' for not supported language with Prism | ||
| const result = prismHighlight(input, { tab: ' ', lang: 'plain-text' }); |
Member
Author
There was a problem hiding this comment.
I assume this test-case seems to test for not supported language with Prism. But, if we specify lang: 'plain the prismHighlight function will return Prism.highlight result.
So, we want to pass through return escapeHTML(code); in this test-case, but current test code pass through return Prism.highlight(code, Prism.languages[language], language);.
I think it happened before, not recently.
Member
Author
|
Hmm... coverage report sent failure when node 14.x 🤔 |
yoshinorin
commented
Feb 1, 2022
| @@ -0,0 +1,2 @@ | |||
| # https://github.com/istanbuljs/nyc#common-configuration-options | |||
| all: true No newline at end of file | |||
Member
Author
There was a problem hiding this comment.
The generated coverage report file (lcov.info) is empty if we do not specify all : true.
tomap
approved these changes
Feb 1, 2022
nevilm-lt
pushed a commit
to nevilm-lt/hexo-util
that referenced
this pull request
Apr 22, 2022
…language with Prismjs (hexojs#271) * test: fix test failure when not supported language with Prismjs * test: fix lcov.info is empty
nevilm-lt
pushed a commit
to nevilm-lt/hexo-util
that referenced
this pull request
Apr 22, 2022
…language with Prismjs (hexojs#271) * test: fix test failure when not supported language with Prismjs * test: fix lcov.info is empty
nevilm-lt
pushed a commit
to nevilm-lt/hexo-util
that referenced
this pull request
Apr 22, 2022
…language with Prismjs (hexojs#271) * test: fix test failure when not supported language with Prismjs * test: fix lcov.info is empty
nevilm-lt
pushed a commit
to nevilm-lt/hexo-util
that referenced
this pull request
Apr 22, 2022
…language with Prismjs (hexojs#271) * test: fix test failure when not supported language with Prismjs * test: fix lcov.info is empty
himanshiLt
pushed a commit
to himanshiLt/hexo-util
that referenced
this pull request
Apr 25, 2022
…language with Prismjs (hexojs#271) * test: fix test failure when not supported language with Prismjs * test: fix lcov.info is empty
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.
Add comment for review.