From 72f8d713bcfcf33821ee5683bb70453335031437 Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Mon, 16 Oct 2017 14:36:31 +0300 Subject: [PATCH] Assert the new improved error message --- src/util/routes.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/routes.test.js b/src/util/routes.test.js index f36be4db..e316bd24 100644 --- a/src/util/routes.test.js +++ b/src/util/routes.test.js @@ -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', () => {