Closed sebsto closed 6 years ago
Hi @sebsto, thank you so much for pointing it out. We had a fix for this issue released this morning. Can you check in your side? Feel free to ask any question!
Just tested using 2.0.10 and I confirm problem is fixed. Thank you for the quick turnaround.
I'm submitting a...
TL;DR
SkillEnabledEvents
andSkillDisabledEvent
type definitions are not aligned with real life skill enabled | disabled events sent to a live skill.This is a real event received by the skill.
Issues :
context:System
has noDevice
attribute => it should be marked optionalrequest
has nolocale
=> it should be marked optionaleventCreationTime
andeventPublishingTime
=> they must be addedNotice that the tech doc at https://developer.amazon.com/docs/smapi/skill-events-in-alexa-skills.html#skill-enabled-event also misses the latter two attributes.
The below diff fixes the type definition.
Expected Behavior
Code like the below should compile and execute.
with
tsconfig.json
Current Behavior
Code like the above crashes at runtime when executed from mocha, using
./node_modules/mocha/bin/mocha -r ts-node/register/type-check test/SkillEnabledTest.ts
Possible Solution
Modify
index.d.ts
fromask-sdk-model
as this :Steps to Reproduce (for bugs)
Write a Mocha unit test with
and execute with
./node_modules/mocha/bin/mocha -r ts-node/register/type-check test/SkillEnabledTest.ts
(somehow
tsc
does not catch the error, whiletype-check
does)Context
Unable to run my unit test.
Your Environment
Node.js and NPM Info