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

How to test nested Object #23

Open
xuanzhaopeng opened this issue May 25, 2020 · 1 comment
Open

How to test nested Object #23

xuanzhaopeng opened this issue May 25, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@xuanzhaopeng
Copy link

xuanzhaopeng commented May 25, 2020

Describe the bug
Given we have this structured data:

{
   Product: [
        { name: "p1",  "offers": [ {"@type": "Offer", "name": "p1o1"}, {"@type": "Offer", "name": "p1o2"} ]  },
       { name: "p2",  "offers": [ {"@type": "Offer", "name": "p2o1"}, {"@type": "Offer", "name": "p2o2"} ]  },
   ]
}

Question:
How can I define the preset for testing Product[*].offers[*].name are exist for all

For example the schema: https://schema.org/offers

@xuanzhaopeng xuanzhaopeng added the bug Something isn't working label May 25, 2020
@iaincollins
Copy link
Owner

Thanks! I don't have an answer for you right now and it will be probably be a little while before there is one, but use cases like this are helpful.

There is some work on going for more complex models and all examples of things that are not caught yet (but should be) will be added as tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants