Skip to content

Commit

Permalink
test(import): fix test failure caused by error message update in node…
Browse files Browse the repository at this point in the history
… v20 (#4918)
  • Loading branch information
bjoerge committed Sep 12, 2023
1 parent 3153954 commit 2f08a79
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/@sanity/import/test/import.test.js
Expand Up @@ -39,10 +39,9 @@ test('rejects on invalid input type (non-array)', async () => {

test('rejects on invalid JSON', async () => {
expect.assertions(1)
await expect(importer(getFixtureStream('invalid-json'), importOptions)).rejects.toHaveProperty(
'message',
'Failed to parse line #3: Unexpected token _ in JSON at position 1',
)
await expect(importer(getFixtureStream('invalid-json'), importOptions)).rejects.toMatchObject({
message: /Failed to parse line #3:.+/,
})
})

test('rejects on invalid `_id` property', async () => {
Expand Down

2 comments on commit 2f08a79

@vercel
Copy link

@vercel vercel bot commented on 2f08a79 Sep 12, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

performance-studio – ./

performance-studio.sanity.build
performance-studio-git-next.sanity.build

@vercel
Copy link

@vercel vercel bot commented on 2f08a79 Sep 12, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

test-studio – ./

test-studio-git-next.sanity.build
test-studio.sanity.build

Please sign in to comment.