bespoken / virtual-alexa

:robot: Easily test and debug Alexa skills programmatically

Home Page:https://bespoken.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sdk.emit(":tell", ...) doesn't end the session

iamkoch opened this issue · comments

Description:

According to the specification, or from what I have read online, at least, issuing a :tell command should end the session. When I run my tests, the session seems to persist across tests. Returning endSession() kills the entire thing, so I can't see a way to succinctly end the session in a beforeEach or afterEach. I am using the giftionary codebase as the basis for my app.

Environment:

  • Version: 0.66
  • OS: [e.g. Windows 10] OSX 10.5
  • Node version: 10.11

Steps To Reproduce

Steps to reproduce the behavior:

  1. issue a sdk.emit(":tell" command in a test suite and notice how other tests inherit the state

Expected behavior

Session should end. Other tests should be treated as new sessions

Actual behavior

Tests are all considered in the same session

Issuing a tell should include a shouldEndSession flag equal to true. This causes virtual alexa to erase the session attributes that are passed back and forth, and create a new session id for subsequent calls. Are you seeing something different from this?

I'll see if I can draw up a small example. Essentially I had one test file containing 3 tests - 1 for one intent, 2 for another. The second tests were invoked with the session open and the current intent marked as the old intent from the previous tests.

Closed pending more detailed reproduction steps