Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'/' in regex needs to be escaped #18

Open
dtmilano opened this issue Feb 11, 2018 · 0 comments
Open

'/' in regex needs to be escaped #18

dtmilano opened this issue Feb 11, 2018 · 0 comments

Comments

@dtmilano
Copy link

I think there's a problem in the example:

      .shouldMatch(/<say>(Hello|Bye)</say>/)
      .shouldNotMatch(/<say>Wrong answer</say>/)

should be

      .shouldMatch(/<say>(Hello|Bye)<\/say>/)
      .shouldNotMatch(/<say>Wrong answer<\/say>/)

or you'll get

SyntaxError: Invalid regular expression flags

I'm also working on a similar framework to test Skills with a strong focus on conversations and handling theDialog.Delegate directive: lex-bot-tester

I think the main difference between the projects is that lex-bot-texter actually sends the requests to Alexa to handle the dialogs. Some background and examples can be found at Testing Alexa Skills - The grail quest if you are interested.

As both projects have a similar objective I think we can benefit with ideas from each other, that's the beauty of Open Source after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant