Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .nycrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# https://github.com/istanbuljs/nyc#common-configuration-options
all: true
Copy link
Member Author

@yoshinorin yoshinorin Feb 1, 2022

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.

4 changes: 2 additions & 2 deletions test/prism.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
Copy link
Member Author

@yoshinorin yoshinorin Jan 31, 2022

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.


result.should.contains(escapeHTML(input.replace(/\t/g, ' ')));

Expand Down