From ccb6032125dc5032b8b4f70a355479a3d76902f4 Mon Sep 17 00:00:00 2001 From: Gautam Krishna R Date: Sat, 17 Aug 2024 04:47:45 +0530 Subject: [PATCH] added test cases for `max_post_count` --- test/max-post-count.js | 12 ++++++++++++ test/snapshots/Readme.maxPostCount.md.snap | 8 ++++++++ 2 files changed, 20 insertions(+) create mode 100644 test/max-post-count.js create mode 100644 test/snapshots/Readme.maxPostCount.md.snap diff --git a/test/max-post-count.js b/test/max-post-count.js new file mode 100644 index 0000000..516f375 --- /dev/null +++ b/test/max-post-count.js @@ -0,0 +1,12 @@ +const {DEFAULT_TEST_ENV} = require('./testUtils/default-env'); +const {runAndCompareSnap} = require('./testUtils/testUtils'); +describe('Generated readme with max post count', function () { + it('should match the snapshot', async function () { + const envObj = { + ...process.env, + ...DEFAULT_TEST_ENV, + INPUT_MAX_POST_COUNT: '1' + }; + await runAndCompareSnap('Readme.maxPostCount.md', envObj); + }); +}); diff --git a/test/snapshots/Readme.maxPostCount.md.snap b/test/snapshots/Readme.maxPostCount.md.snap new file mode 100644 index 0000000..22f7d4c --- /dev/null +++ b/test/snapshots/Readme.maxPostCount.md.snap @@ -0,0 +1,8 @@ +# Readme test +Post list example: + +- [God Mode in browsers: document.designMode = "on"](https://dev.to/gautamkrishnar/god-mode-in-browsers-document-designmode-on-2pmo) + + +# Other contents +Test content