-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# https://github.com/istanbuljs/nyc#common-configuration-options | ||
all: true | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,8 +77,8 @@ describe('prismHighlight', () => { | |
'}' | ||
].join('\n'); | ||
|
||
// 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 commentThe 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 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. |
||
|
||
result.should.contains(escapeHTML(input.replace(/\t/g, ' '))); | ||
|
||
|
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 specifyall : true
.