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

No test with nested IDs. #120

Open
Zegnat opened this issue Sep 13, 2020 · 1 comment
Open

No test with nested IDs. #120

Zegnat opened this issue Sep 13, 2020 · 1 comment
Assignees

Comments

@Zegnat
Copy link
Member

Zegnat commented Sep 13, 2020

Just a drive-by issue while I am doing work on a microformats2 JSON schema. There was a problem with my schema that was not caught by any JSON files in the test suite:

<div id="a" class="h-a"><div id="b" class="p-z h-b"></div><div id="c" class="h-c"></div></div>
{
  "rels": {},
  "rel-urls": {},
  "items": [
    {
      "type": [
        "h-a"
      ],
      "properties": {
        "z": [
          {
            "type": [
              "h-b"
            ],
            "properties": {
              "name": [
                ""
              ]
            },
            "id": "b",
            "value": ""
          }
        ]
      },
      "id": "a",
      "children": [
        {
          "type": [
            "h-c"
          ],
          "properties": {
            "name": [
              ""
            ]
          },
          "id": "c"
        }
      ]
    }
  ]
}

(Output taken from the great and fast in-browser TypeScript parser.)

Microformats within items collections, children collections, and when detected on properties, can all have an id object member with a string value. My schema was getting this wrong and there was no occurrence of this within the test suite to catch it.

We needs tests for this now that microformats/microformats2-parsing#44 has landed in the parsing specification, and has been there since December 2018.

I will probably look into adding a more complete example later.

@jgarber623 jgarber623 self-assigned this Nov 8, 2020
jgarber623 added a commit to jgarber623/microformats-test-suite that referenced this issue Nov 8, 2020
@jgarber623
Copy link
Member

@Zegnat Just PR'ed this in #121.

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

2 participants