Skip to content

Commit

Permalink
Fix code formatting for prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Subash Pradhan committed Oct 21, 2024
1 parent 3789c46 commit dc9253b
Showing 1 changed file with 75 additions and 79 deletions.
154 changes: 75 additions & 79 deletions tests/resources/configurations.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ describe('Configurations', () => {
identifier: 'grant123',
overrides: {
apiUri: 'https://test.api.nylas.com',
headers: { override: 'foobar' }
}
})
headers: { override: 'foobar' },
},
});

expect(apiClient.request).toHaveBeenCalledWith({
method: 'GET',
path: '/v3/grants/grant123/scheduling/configurations',
overrides: {
apiUri: 'https://test.api.nylas.com',
headers: { override: 'foobar' }
}
})
})
})
headers: { override: 'foobar' },
},
});
});
});

describe('find', () => {
it('should call apiClient.request with correct params', async () => {
Expand All @@ -46,87 +46,83 @@ describe('Configurations', () => {
configurationId: 'configuration123',
overrides: {
apiUri: 'https://test.api.nylas.com',
headers: { override: 'foobar' }
}
})
headers: { override: 'foobar' },
},
});

expect(apiClient.request).toHaveBeenCalledWith({
method: 'GET',
path: '/v3/grants/grant123/scheduling/configurations/configuration123',
overrides: {
apiUri: 'https://test.api.nylas.com',
headers: { override: 'foobar' }
}
})
})
})
headers: { override: 'foobar' },
},
});
});
});

describe('create', () => {
it('should call apiClient.request with correct params', async () => {
await configurations.create({
identifier: 'grant123',
requestBody: {
"requiresSessionAuth": false,
"participants": [
requiresSessionAuth: false,
participants: [
{
"name": "Test",
"email": "[email protected]",
"availability": {
"calendarIds": [
"primary"
]
name: 'Test',
email: '[email protected]',
availability: {
calendarIds: ['primary'],
},
"booking": {
"calendarId": "primary"
}
}
booking: {
calendarId: 'primary',
},
},
],
"availability": {
"durationMinutes": 30
availability: {
durationMinutes: 30,
},
eventBooking: {
title: 'My test event',
},
"eventBooking": {
"title": "My test event"
}
},
overrides: {
apiUri: 'https://test.api.nylas.com',
headers: { override: 'foobar' }
}
})
headers: { override: 'foobar' },
},
});

expect(apiClient.request).toHaveBeenCalledWith({
method: 'POST',
path: '/v3/grants/grant123/scheduling/configurations',
body: {
"requiresSessionAuth": false,
"participants": [
requiresSessionAuth: false,
participants: [
{
"name": "Test",
"email": "[email protected]",
"availability": {
"calendarIds": [
"primary"
]
name: 'Test',
email: '[email protected]',
availability: {
calendarIds: ['primary'],
},
booking: {
calendarId: 'primary',
},
"booking": {
"calendarId": "primary"
}
}
},
],
"availability": {
"durationMinutes": 30
availability: {
durationMinutes: 30,
},
eventBooking: {
title: 'My test event',
},
"eventBooking": {
"title": "My test event"
}
},
overrides: {
apiUri: 'https://test.api.nylas.com',
headers: { override: 'foobar' }
}
})
})
})
headers: { override: 'foobar' },
},
});
});
});

describe('update', () => {
it('should call apiClient.request with the correct params', async () => {
Expand All @@ -135,30 +131,30 @@ describe('Configurations', () => {
configurationId: 'configuration123',
requestBody: {
eventBooking: {
title: "Changed Title"
}
title: 'Changed Title',
},
},
overrides: {
apiUri: 'https://test.api.nylas.com',
headers: { override: 'foobar' }
}
})
headers: { override: 'foobar' },
},
});

expect(apiClient.request).toHaveBeenCalledWith({
method: 'PUT',
path: '/v3/grants/grant123/scheduling/configurations/configuration123',
body: {
eventBooking: {
title: "Changed Title"
}
title: 'Changed Title',
},
},
overrides: {
apiUri: 'https://test.api.nylas.com',
headers: { override: 'foobar' }
}
})
})
})
headers: { override: 'foobar' },
},
});
});
});

describe('destroy', () => {
it('should call apiClient.request with the correct params', async () => {
Expand All @@ -167,18 +163,18 @@ describe('Configurations', () => {
configurationId: 'configuration123',
overrides: {
apiUri: 'https://test.api.nylas.com',
headers: { override: 'foobar' }
}
})
headers: { override: 'foobar' },
},
});

expect(apiClient.request).toHaveBeenCalledWith({
method: 'DELETE',
path: '/v3/grants/grant123/scheduling/configurations/configuration123',
overrides: {
apiUri: 'https://test.api.nylas.com',
headers: { override: 'foobar' }
}
})
})
})
})
headers: { override: 'foobar' },
},
});
});
});
});

0 comments on commit dc9253b

Please sign in to comment.