11import nock from 'nock'
22import { Duffel } from '../index'
33import { MOCK_SEARCH_RESULT } from './mocks'
4+ import { StaysSearchParams } from './StaysTypes'
45
56const duffel = new Duffel ( { token : 'mockToken' } )
67describe ( 'Stays' , ( ) => {
@@ -10,7 +11,7 @@ describe('Stays', () => {
1011
1112 it ( 'should post location params to /stays/search when `search` is called' , async ( ) => {
1213 const mockResponse = { data : { results : [ MOCK_SEARCH_RESULT ] } }
13- const mockSearchParams = {
14+ const mockSearchParams : StaysSearchParams = {
1415 location : {
1516 radius : 5 ,
1617 geographic_coordinates : {
@@ -36,7 +37,7 @@ describe('Stays', () => {
3637
3738 it ( 'should post accommodation params to /stays/search when `search` is called' , async ( ) => {
3839 const mockResponse = { data : { results : [ MOCK_SEARCH_RESULT ] } }
39- const mockSearchParams = {
40+ const mockSearchParams : StaysSearchParams = {
4041 accommodation : {
4142 ids : [ 'acc_12345' ] ,
4243 fetch_rates : true ,
@@ -59,7 +60,7 @@ describe('Stays', () => {
5960
6061 it ( 'should alternatively accept `guests` with `accommodation` as a search criteria and post it to /stays/search' , async ( ) => {
6162 const mockResponse = { data : { results : [ MOCK_SEARCH_RESULT ] } }
62- const mockSearchParams = {
63+ const mockSearchParams : StaysSearchParams = {
6364 accommodation : {
6465 ids : [ 'acc_12345' ] ,
6566 fetch_rates : true ,
@@ -87,7 +88,7 @@ describe('Stays', () => {
8788
8889 it ( 'should alternatively accept `guests` with `location` as a search criteria and post it to /stays/search' , async ( ) => {
8990 const mockResponse = { data : { results : [ MOCK_SEARCH_RESULT ] } }
90- const mockSearchParams = {
91+ const mockSearchParams : StaysSearchParams = {
9192 location : {
9293 radius : 5 ,
9394 geographic_coordinates : {
0 commit comments