This sample is based on the Jovo Template: Hello World.
Created with jovo new
. Than edit to use User Data in the Unit Tests.
- Node v12
- Jovo CLI Version: 3.0.15
Works again with new Jovo version:
Jovo packages of current project:
jovo-core: 3.0.17
jovo-db-filedb: 3.0.18
jovo-framework: 3.0.19
jovo-platform-alexa: 3.0.22
jovo-platform-dialogflow: 3.0.17
jovo-platform-googleassistant: 3.0.19
jovo-plugin-debugger: 3.0.17
Just run jovo update
to get new version.
-
Change Directory:
$ cd helloworld
-
Install Dependencies:
$ npm install
-
Run Tests:
$ npm test
Console Log:
FAIL test/sample.test.js
PLATFORM: Alexa INTENTS
✓ test flag should be true (214 ms)
✓ test flag should be false (4 ms)
PLATFORM: GoogleAssistant INTENTS
✕ test flag should be true (8 ms)
✕ test flag should be false (3 ms)
● PLATFORM: GoogleAssistant INTENTS › test flag should be true
expect(received).toMatch(expected)
Expected substring: "test_flag is true"
Received string: "test_flag is undefined"
● PLATFORM: GoogleAssistant INTENTS › test flag should be false
expect(received).toMatch(expected)
Expected substring: "test_flag is false"
Received string: "test_flag is undefined"
Test Suites: 1 failed, 1 total
Tests: 2 failed, 2 passed, 4 total
As you can see in the console log, the this.$user.$data.test_flag
in the unit tests for Google Assistants are undefined
.
In the tests for Alexa the values are correct.
Additional a db
folder gets generated in the directory above the project.