Skip to content

Commit

Permalink
test: fix generate coverage report & test failure when not supported …
Browse files Browse the repository at this point in the history
…language with Prismjs (hexojs#271)

* test: fix test failure when not supported language with Prismjs

* test: fix lcov.info is empty
  • Loading branch information
yoshinorin authored and nevilm-lt committed Apr 22, 2022
1 parent f701ba5 commit e996470
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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
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' });

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

Expand Down

0 comments on commit e996470

Please sign in to comment.