Skip to content
This repository has been archived by the owner on May 14, 2020. It is now read-only.

Test all article list content #281

Merged
merged 2 commits into from
Mar 13, 2020

Conversation

thewilkybarkid
Copy link
Contributor

Makes sure that all quads in the article list are tested.

Found in #167.

@thewilkybarkid thewilkybarkid added the 🚨 Tests Adding missing tests or correcting existing tests label Mar 13, 2020
@thewilkybarkid thewilkybarkid requested a review from a team as a code owner March 13, 2020 11:56
expect(dataset).toBeRdfDatasetMatching({ subject: id, predicate: hydra.manages });
expect(dataset).toBeRdfDatasetMatching({ subject: id, predicate: hydra.totalItems, object: toRdf(0) });

const [{ object: manages }] = dataset.match(id, hydra.manages);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the predicate is manages (namespaces notwithstanding), is the object manages too? Maybe managed?

This comment was marked as off-topic.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assume if 2 articles suddenly come out the API, the [{...}] destructuring fails?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wait, this only describes the type of the items, not their content

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's assigning an alias to a property on an object that is the first item in the array. Complicated syntax...

Destructuring is fine if there's more than one, others are ignored.

@thewilkybarkid thewilkybarkid merged commit 44f5dba into libero:master Mar 13, 2020
@thewilkybarkid thewilkybarkid deleted the article-list-tests branch March 13, 2020 14:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🚨 Tests Adding missing tests or correcting existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants