Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
test: approve snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSnow committed Apr 12, 2024
1 parent 8b31719 commit 8b7c492
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports[`mockTypesenseArticle 1`] = `
"blurb": "This is a mock article",
"cover": {
"alt": null,
"caption": "<p>Photo by <a href=\\"https://unsplash.com/@kz29?utm_source=Storipress&utm_medium=referral&utm_campaign=api-credit?utm_source=storipress&utm_medium=referral&utm_campaign=api-credit\\">Keith Zhang</a> / <a href=\\"https://unsplash.com/?utm_source=storipress&utm_medium=referral&utm_campaign=api-credit\\">Unsplash</a></p>",
"caption": "<p>Photo by <a href="https://unsplash.com/@kz29?utm_source=Storipress&utm_medium=referral&utm_campaign=api-credit?utm_source=storipress&utm_medium=referral&utm_campaign=api-credit">Keith Zhang</a> / <a href="https://unsplash.com/?utm_source=storipress&utm_medium=referral&utm_campaign=api-credit">Unsplash</a></p>",
"crop": {
"height": 0,
"key": "",
Expand Down Expand Up @@ -99,7 +99,7 @@ exports[`mockTypesenseArticle 2`] = `
"content_blocks": [],
"cover": {
"alt": null,
"caption": "<p>Photo by <a href=\\"https://unsplash.com/@kz29?utm_source=Storipress&utm_medium=referral&utm_campaign=api-credit?utm_source=storipress&utm_medium=referral&utm_campaign=api-credit\\">Keith Zhang</a> / <a href=\\"https://unsplash.com/?utm_source=storipress&utm_medium=referral&utm_campaign=api-credit\\">Unsplash</a></p>",
"caption": "<p>Photo by <a href="https://unsplash.com/@kz29?utm_source=Storipress&utm_medium=referral&utm_campaign=api-credit?utm_source=storipress&utm_medium=referral&utm_campaign=api-credit">Keith Zhang</a> / <a href="https://unsplash.com/?utm_source=storipress&utm_medium=referral&utm_campaign=api-credit">Unsplash</a></p>",
"crop": {
"height": 0,
"key": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,16 @@ describe('preconditon validation', () => {
it('usePagination throw when limit is 0', () => {
expect(() => {
usePagination(ref([]), 0)
}).toThrowErrorMatchingInlineSnapshot('"Invariant failed: `limit` must not be negative or 0"')
}).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: \`limit\` must not be negative or 0]`)
})

it('usePagination throw when limit is < 0', () => {
expect(() => {
usePagination(ref([]), -1)
}).toThrowErrorMatchingInlineSnapshot('"Invariant failed: `limit` must not be negative or 0"')
}).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: \`limit\` must not be negative or 0]`)

expect(() => {
usePagination(ref([]), -2)
}).toThrowErrorMatchingInlineSnapshot('"Invariant failed: `limit` must not be negative or 0"')
}).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: \`limit\` must not be negative or 0]`)
})
})

0 comments on commit 8b7c492

Please sign in to comment.