mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Assert the new improved error message
This commit is contained in:
parent
d56195b417
commit
72f8d713bc
1 changed files with 3 additions and 3 deletions
|
|
@ -22,14 +22,14 @@ describe('util/routes.js', () => {
|
|||
createResourceLocatorString('ListingPage', routes, { id: '1234', slug: 'nice-listing' }, {})
|
||||
).toEqual('/l/nice-listing/1234');
|
||||
expect(() => createResourceLocatorString('ListingPage', routes, {}, {})).toThrowError(
|
||||
TypeError('Expected "slug" to be defined')
|
||||
TypeError('Expected "slug" to be a string')
|
||||
);
|
||||
expect(() =>
|
||||
createResourceLocatorString('ListingPage', routes, { id: '1234' }, {})
|
||||
).toThrowError(TypeError('Expected "slug" to be defined'));
|
||||
).toThrowError(TypeError('Expected "slug" to be a string'));
|
||||
expect(() =>
|
||||
createResourceLocatorString('ListingPage', routes, { slug: 'nice-listing' }, {})
|
||||
).toThrowError(TypeError('Expected "id" to be defined'));
|
||||
).toThrowError(TypeError('Expected "id" to be a string'));
|
||||
});
|
||||
|
||||
it('should return meaningful strings with search parameters', () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue