Skip to content

Please explain this behaviour #2

@marcolarosa

Description

@marcolarosa

I'm not sure what's happening. In the file validator.paradisec.spec.js I've added two logging statements in the block between lines 102 and 110 as follows:

    const crate = new ROCrate(
      JSON.parse(
        fs.readFileSync(
          'examples/paradisec/item/NT1-001/ro-crate-metadata.json'
        )
      ),
      opt
    );
    console.log(crate.rootDataset);
    console.log(crate.rootDataset.conformsTo);
    var result = LdacProfile.validate(crate);
    return;

When I log the rootDataset, conformsTo is an object (other stuff removed for clarity).

  RepositoryObject
<ref *1> Node {
  '@type': [ 'Dataset', 'RepositoryObject' ],
  conformsTo: {
    '@id': 'https://purl.archive.org/language-data-commons/profile#Object'
  },
  ...
}

But when I log rootDataset.conformsTo I get an array (see following):

[
  {
    '@id': 'https://purl.archive.org/language-data-commons/profile#Object'
  }
]

And the test subsequently fails.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions