Added test for empty result set

This commit is contained in:
Rodel 2021-11-10 22:58:04 +08:00
parent ee3b315eaa
commit 988618056d
1 changed files with 8 additions and 0 deletions

View File

@ -65,4 +65,12 @@ describe( 'Order Search API tests', () => {
expect( body ).toHaveLength( 1 );
expect( body[ 0 ].id ).toEqual( order.id );
} );
it( 'can return an empty result set when no matches were found', async () => {
const { body } = await ordersApi.listAll.orders( {
search: 'Chauncey Smith Kunde',
} );
expect( body ).toEqual( [] );
} );
} );