Virtual alexa or jest

amazon-alexa

#1

hi
is duplicate with jest ?

i wish make regression test offline, and guess if possible with virtual alexa and jovo ?


#2

Hey @Sylvain_P. Jovo offers its own unit testing framework that is based on Jest:

I haven’t played a lot with Virtual Alexa in the last few months, so I can’t really talk much about the differences.


#3

i think, it not need to start server on port 3000 for test and so it very fast


#4

You can use this, then you don’t have to do jovo run:

const conversation = testSuite.conversation({
    runtime: "app"
});

const launchRequest = await testSuite.requestBuilder.launch();

const responseLaunchRequest = await conversation.send(launchRequest);

expect(
  responseLaunchRequest.isAsk('Hello World! What\'s your name?', 'Please tell me your name.')
).toBe(true);

#5

thanks you , it’s work fine.
can you tell me in which case use port(jovo run) for testing ?
it’s seems very slow to build each time


#6

It was the first version of unit testing in the framework. You can use both ways. But as you said, it’s faster with runtime: app :slight_smile: