Closed westlakem closed 5 years ago
If you set the access token on the context, it will emulate a user who has linked their account:
virtualAlexa.context().setAccessToken(testSuite.accessToken);
We do not have builtin mocks for the profile API, but you we have them for the Address API - a similar approach using Nock (a great mocking tool) will work for the Profile API: https://github.com/bespoken/virtual-alexa/blob/master/src/external/AddressAPI.ts#L67
Ok, I was looking for mocks of the profile api.
Is your feature request related to a problem? Please describe. We are trying to unit test a feature that requires account linking.
Describe the solution you'd like A way to simulate an account linked device that is able to hit Amazon's profile APIs (we need to hit their APIs once "account linked"