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

Bug with storesAttributes using Strict/Reference Equality instead of Lenient/Normal Equality #12

Open
bluu1993 opened this issue Jul 16, 2019 · 0 comments

Comments

@bluu1993
Copy link

Description

The validation for validating the stored/persistence attributes with storesAttributes uses reference equality when it should use normal equality (similar to how SessionAttributeValidator works).

Steps to Reproduce

  1. Write a Skill Lambda that persists attributes where one of the root attributes stores another object.

e.g.

{  
   "field1": "value1",
   "field2": {
      "field3": "value3",
      "field4": "value4"
   }
}
  1. Write a test case with the SDK to validate that it stores the given attributes.

e.g.

alexaTest.test([
    {
        request: ...,
        says: ...,
        reprompts: ...,
        storesAttributes: {  
           "field1": "value1",
           "field2": {
              "field3": "value3",
              "field4": "value4"
           }
        }
    }
]);
  1. Run test and it will fail.

Expected behavior:

Test case to pass and lenient/normal equality to be used.

Actual behavior:

Test case will fail because it uses strict/reference equality.

Environment

NodeJS-Version:

v8.12.0

TypeScript-Version:

N/A

OS:

MAC OS X

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