From fe302c928c65d4d39a640a9ddad74190703bbfd8 Mon Sep 17 00:00:00 2001 From: yoshinorin Date: Wed, 2 Feb 2022 19:15:27 +0900 Subject: [PATCH] test: fix generate coverage report & test failure when not supported language with Prismjs (#271) * test: fix test failure when not supported language with Prismjs * test: fix lcov.info is empty --- .nycrc.yml | 2 ++ test/prism.spec.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .nycrc.yml diff --git a/.nycrc.yml b/.nycrc.yml new file mode 100644 index 00000000..03976439 --- /dev/null +++ b/.nycrc.yml @@ -0,0 +1,2 @@ +# https://github.com/istanbuljs/nyc#common-configuration-options +all: true \ No newline at end of file diff --git a/test/prism.spec.js b/test/prism.spec.js index 2855e888..32055a76 100644 --- a/test/prism.spec.js +++ b/test/prism.spec.js @@ -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, ' ')));