Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pubDate to createFront and expand content collection test #185

Conversation

goblinfactory
Copy link
Contributor

  • Added pubDate to createFront so that the content-collection test can actually assert on a collection with different dates to prove that the collection is being returned "newest" first based on RFC 822 pubDate value.
  • Test changed to use a manual inline snapshot so that the test can also serve as useful reference.

function createFront(title) {
return ['---', `title: ${title}`, '---'].join('\n')
function createFront(title, pubDate) {
return ['---', `title: ${title}`, `pubDate: ${pubDate ?? '2020-01-20'}`, '---'].join('\n')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return ['---', `title: ${title}`, `pubDate: ${pubDate ?? '2020-01-20'}`, '---'].join('\n')
return ['---', `title: ${title}`, `pubDate: ${pubDate ?? '2020-01-20'}`, '---'].join('\n')

@tipiirai tipiirai merged commit cafe934 into nuejs:master Feb 5, 2024
0 of 3 checks passed
@tipiirai
Copy link
Contributor

tipiirai commented Feb 5, 2024

Thank you!

fritx added a commit to fritx/nue that referenced this pull request Feb 5, 2024
fritx added a commit to fritx/nue that referenced this pull request Feb 5, 2024
fritx added a commit to fritx/nue that referenced this pull request Feb 5, 2024
fritx added a commit to fritx/nue that referenced this pull request Feb 5, 2024
@goblinfactory goblinfactory deleted the test/content-collection-sort-order branch February 5, 2024 16:48
tipiirai added a commit that referenced this pull request Feb 9, 2024
Fix failed test with createFront, fix #185
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants