-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use @talkyjs/ssml instead of ask-utils
- Loading branch information
Hidetaka Okamoto
committed
Dec 24, 2020
1 parent
4a35e64
commit d806147
Showing
15 changed files
with
6,046 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
lambda/src/HelpIntent/tests/__snapshots__/HelpIntent.router.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`HelpIntentRouter canHandle should return false when given a not IntentRequest 1`] = `true`; | ||
|
||
exports[`HelpIntentRouter handle should match snapshot 1`] = ` | ||
Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>Hello! It's a nice development. How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
"reprompt": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
}, | ||
"shouldEndSession": false, | ||
} | ||
`; |
17 changes: 17 additions & 0 deletions
17
lambda/src/HelpIntent/tests/__snapshots__/HelpIntent.speech.spec.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`HelpIntentScript should return false when given a not IntentRequest 1`] = ` | ||
Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>Hello! It's a nice development. How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
"reprompt": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
}, | ||
"shouldEndSession": false, | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
lambda/src/LaunchRequest/tests/__snapshots__/LaunchRequest.router.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`LaunchRequestRouter canHandle should return false when given a not IntentRequest 1`] = `false`; | ||
|
||
exports[`LaunchRequestRouter handle should match snapshot 1`] = ` | ||
Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p><amazon:emotion name=\\"excited\\" intensity=\\"high\\">Hello!</amazon:emotion>It's a nice development. How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
"reprompt": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
}, | ||
"shouldEndSession": false, | ||
} | ||
`; |
17 changes: 17 additions & 0 deletions
17
lambda/src/LaunchRequest/tests/__snapshots__/LaunchRequest.speech.spec.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`LaunchRequestScript should return false when given a not IntentRequest 1`] = ` | ||
Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p><amazon:emotion name=\\"excited\\" intensity=\\"high\\">Hello!</amazon:emotion>It's a nice development. How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
"reprompt": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
}, | ||
"shouldEndSession": false, | ||
} | ||
`; |
7 changes: 2 additions & 5 deletions
7
lambda/src/StopAndCancelAndNoIntent/StopAndCancelAndNoIntent.speech.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...StopAndCancelAndNoIntent/tests/__snapshots__/StopAndCancelAndNoIntent.router.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`StopAndCancelAndNoIntentRouter canHandle should match the snapshot of the "AMAZON.CancelIntent" IntentRequest 1`] = `true`; | ||
|
||
exports[`StopAndCancelAndNoIntentRouter canHandle should match the snapshot of the "AMAZON.NoIntent" IntentRequest 1`] = `true`; | ||
|
||
exports[`StopAndCancelAndNoIntentRouter canHandle should match the snapshot of the "AMAZON.StopIntent" IntentRequest 1`] = `true`; | ||
|
||
exports[`StopAndCancelAndNoIntentRouter handle should match snapshot 1`] = ` | ||
Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>Good-bye!</p></speak>", | ||
"type": "SSML", | ||
}, | ||
} | ||
`; |
28 changes: 28 additions & 0 deletions
28
...topAndCancelAndNoIntent/tests/__snapshots__/StopAndCancelAndNoIntent.speech.spec.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`StopAndCancelAndNoIntentScript should match the snapshot of the "AMAZON.CancelIntent" IntentRequest 1`] = ` | ||
Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>Good-bye!</p></speak>", | ||
"type": "SSML", | ||
}, | ||
} | ||
`; | ||
|
||
exports[`StopAndCancelAndNoIntentScript should match the snapshot of the "AMAZON.NoIntent" IntentRequest 1`] = ` | ||
Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>Good-bye!</p></speak>", | ||
"type": "SSML", | ||
}, | ||
} | ||
`; | ||
|
||
exports[`StopAndCancelAndNoIntentScript should match the snapshot of the "AMAZON.StopIntent" IntentRequest 1`] = ` | ||
Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>Good-bye!</p></speak>", | ||
"type": "SSML", | ||
}, | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Skill handler should match the snapshot of the "AMAZON.CancelIntent" IntentRequest 1`] = ` | ||
Object { | ||
"response": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>Good-bye!</p></speak>", | ||
"type": "SSML", | ||
}, | ||
}, | ||
"sessionAttributes": Object { | ||
"__talkyjs": Object { | ||
"sessionSituation": Object { | ||
"invocationNumber": 0, | ||
"turnCount": 1, | ||
}, | ||
}, | ||
}, | ||
"userAgent": "ask-node/2.10.1 Node/v12.14.1", | ||
"version": "1.0", | ||
} | ||
`; | ||
|
||
exports[`Skill handler should match the snapshot of the "AMAZON.HelpIntent" IntentRequest 1`] = ` | ||
Object { | ||
"response": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>Hello! It's a nice development. How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
"reprompt": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
}, | ||
"shouldEndSession": false, | ||
}, | ||
"sessionAttributes": Object { | ||
"__talkyjs": Object { | ||
"recordedResponse": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>Hello! It's a nice development. How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
"reprompt": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
}, | ||
"shouldEndSession": false, | ||
}, | ||
"sessionSituation": Object { | ||
"invocationNumber": 0, | ||
"turnCount": 1, | ||
}, | ||
}, | ||
}, | ||
"userAgent": "ask-node/2.10.1 Node/v12.14.1", | ||
"version": "1.0", | ||
} | ||
`; | ||
|
||
exports[`Skill handler should match the snapshot of the "AMAZON.NoIntent" IntentRequest 1`] = ` | ||
Object { | ||
"response": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>Good-bye!</p></speak>", | ||
"type": "SSML", | ||
}, | ||
}, | ||
"sessionAttributes": Object { | ||
"__talkyjs": Object { | ||
"sessionSituation": Object { | ||
"invocationNumber": 0, | ||
"turnCount": 1, | ||
}, | ||
}, | ||
}, | ||
"userAgent": "ask-node/2.10.1 Node/v12.14.1", | ||
"version": "1.0", | ||
} | ||
`; | ||
|
||
exports[`Skill handler should match the snapshot of the "AMAZON.StopIntent" IntentRequest 1`] = ` | ||
Object { | ||
"response": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>Good-bye!</p></speak>", | ||
"type": "SSML", | ||
}, | ||
}, | ||
"sessionAttributes": Object { | ||
"__talkyjs": Object { | ||
"sessionSituation": Object { | ||
"invocationNumber": 0, | ||
"turnCount": 1, | ||
}, | ||
}, | ||
}, | ||
"userAgent": "ask-node/2.10.1 Node/v12.14.1", | ||
"version": "1.0", | ||
} | ||
`; | ||
|
||
exports[`Skill handler should return false when given a not LaunchRequest 1`] = ` | ||
Object { | ||
"response": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p><amazon:emotion name=\\"excited\\" intensity=\\"high\\">Hello!</amazon:emotion>It's a nice development. How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
"reprompt": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
}, | ||
"shouldEndSession": false, | ||
}, | ||
"sessionAttributes": Object { | ||
"__talkyjs": Object { | ||
"recordedResponse": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p><amazon:emotion name=\\"excited\\" intensity=\\"high\\">Hello!</amazon:emotion>It's a nice development. How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
"reprompt": Object { | ||
"outputSpeech": Object { | ||
"ssml": "<speak><p>How are you?</p></speak>", | ||
"type": "SSML", | ||
}, | ||
}, | ||
"shouldEndSession": false, | ||
}, | ||
"sessionSituation": Object { | ||
"invocationNumber": 0, | ||
"turnCount": 1, | ||
}, | ||
}, | ||
}, | ||
"userAgent": "ask-node/2.10.1 Node/v12.14.1", | ||
"version": "1.0", | ||
} | ||
`; | ||
|
||
exports[`Skill handler should return false when given a not SessionEndedRequest 1`] = ` | ||
Object { | ||
"response": Object {}, | ||
"sessionAttributes": Object { | ||
"__talkyjs": Object { | ||
"sessionSituation": Object { | ||
"invocationNumber": 0, | ||
"turnCount": 1, | ||
}, | ||
}, | ||
}, | ||
"userAgent": "ask-node/2.10.1 Node/v12.14.1", | ||
"version": "1.0", | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.