Skip to content

Commit

Permalink
added test cases for max_post_count
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamkrishnar committed Aug 16, 2024
1 parent ba49e65 commit ccb6032
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/max-post-count.js
Original file line number Diff line number Diff line change
@@ -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);
});
});
8 changes: 8 additions & 0 deletions test/snapshots/Readme.maxPostCount.md.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Readme test
Post list example:
<!-- BLOG-POST-LIST:START -->
- [God Mode in browsers: document.designMode = &quot;on&quot;](https://dev.to/gautamkrishnar/god-mode-in-browsers-document-designmode-on-2pmo)
<!-- BLOG-POST-LIST:END -->

# Other contents
Test content

0 comments on commit ccb6032

Please sign in to comment.