mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 03:17:11 +00:00
fix: expect normal throw
This commit is contained in:
parent
589571319f
commit
7135f60a73
@ -41,9 +41,8 @@ describe('sortConnectArray', () => {
|
|||||||
test("error if position doesn't exist", () => {
|
test("error if position doesn't exist", () => {
|
||||||
const sortConnect = () => sortConnectArray([{ id: 1, position: { after: 2 } }]);
|
const sortConnect = () => sortConnectArray([{ id: 1, position: { after: 2 } }]);
|
||||||
|
|
||||||
expect(sortConnect).toThrowErrorMatchingSnapshot(
|
expect(sortConnect).toThrowError(
|
||||||
'"There was a problem connecting relation with id 1 at position' +
|
'There was a problem connecting relation with id 1 at position {"after":2}. The relation with id 2 needs to be connected first.'
|
||||||
'{"after":2}. The relation with id 2 needs to be connected first."'
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user