View e2eTestConfigurationFile.json
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
{ | |
"type": "e2e", | |
"findReplace": { | |
"INVOCATION_NAME": "quick list", | |
"INVOCATION_NAME_DEV": "quick list development" | |
}, | |
"homophones": { | |
"is": ["as", "does", "it's"], | |
"two": ["to", "2"], | |
"contestant": ["contested"] |
View e2eTestSimpleExample.yml
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
--- | |
configuration: | |
locale: en-US | |
voiceId: Joanna | |
--- | |
- test: Launch request, no further interaction | |
- tags: NLUTest | |
- <speak>open <phoneme alphabet="ipa" ph="kwɪk lɪst">quick list</phoneme></speak>: "*" |
View unitTestEnvVariableSample.js
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
sessionAttributes.guessNumber = Math.floor(Math.random() * 100); | |
// For testing purposes, force a number to be picked if the UNIT_TEST environment variable is set | |
if (process.env.UNIT_TEST) { | |
sessionAttributes.guessNumber = 50; | |
} |
View unitTestConfigurationFile.json
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
{ | |
"handler": "../../index.js", | |
"trace": "false", | |
"jest": { | |
"silent": true, | |
"collectCoverageFrom": [ | |
"index.js" | |
] | |
}, | |
"include": ["FirstUse"], |
View unitTestComplexExample.yml
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
--- | |
configuration: | |
locale: en-US | |
--- | |
- test: Using succinct syntax to invoke the intent with slots. | |
- tags: FirstUse | |
- LaunchRequest: | |
- response.outputSpeech.ssml: /.*how many people are playing today.*/i | |
- response.shouldEndSession: false |
View unitTestSimpleExample.yml
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
--- | |
configuration: | |
locale: en-US | |
--- | |
- test: Launching and testing intent with slot values | |
- LaunchRequest: Welcome to Pet Match | |
- PetMatchIntent size=small pet=dog: | |
- prompt: | |
- Would you prefer a dog to hang out with kids or to protect you? |