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.
I'm not sure what's happening. In the file
validator.paradisec.spec.jsI've added two logging statements in the block between lines 102 and 110 as follows:When I log the rootDataset,
conformsTois an object (other stuff removed for clarity).But when I log
rootDataset.conformsToI get an array (see following):And the test subsequently fails.