-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
test: fix generate coverage report & test failure when not supported language with Prismjs #271
Conversation
// 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' }); |
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.
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.
Hmm... coverage report sent failure when node 14.x 🤔 |
@@ -0,0 +1,2 @@ | |||
# https://github.com/istanbuljs/nyc#common-configuration-options | |||
all: true |
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.
The generated coverage report file (lcov.info
) is empty if we do not specify all : true
.
…language with Prismjs (hexojs#271) * test: fix test failure when not supported language with Prismjs * test: fix lcov.info is empty
…language with Prismjs (hexojs#271) * test: fix test failure when not supported language with Prismjs * test: fix lcov.info is empty
…language with Prismjs (hexojs#271) * test: fix test failure when not supported language with Prismjs * test: fix lcov.info is empty
…language with Prismjs (hexojs#271) * test: fix test failure when not supported language with Prismjs * test: fix lcov.info is empty
…language with Prismjs (hexojs#271) * test: fix test failure when not supported language with Prismjs * test: fix lcov.info is empty
Add comment for review.