Skip to content

Conversation

@Eric-Arellano
Copy link
Collaborator

This is to unblock #1249. We now use the project folder that Pkg.mock().outputDir() would use.

This also removes inline snapshots. They can't be updated via npm test -- -u due to Prettier, so it's more helpful to use a normal expect().toEqual().

},
]);

expect(toc).toMatchInlineSnapshot(`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Only the page names and URLs changed in this diff

Comment on lines +185 to +189
{
moduleId: "my_quantum_project.another",
title: "dedicated module",
kind: "module",
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a new test because once we have #1249, we couldn't be confident that putting the API index page in the title came from our grouping code rather than the new ensureIndexPage().

],
);

expect(toc).toMatchInlineSnapshot(`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No changes made other than URLs and page titles

Copy link
Member

@frankharkins frankharkins left a comment

Choose a reason for hiding this comment

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

Thanks!

@Eric-Arellano Eric-Arellano added this pull request to the merge queue May 1, 2024
Merged via the queue into main with commit 7b9a194 May 1, 2024
@Eric-Arellano Eric-Arellano deleted the EA/refactor-toc-tests branch May 1, 2024 15:24
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
This is to unblock Qiskit#1249.
We now use the project folder that `Pkg.mock().outputDir()` would use.

This also removes inline snapshots. They can't be updated via `npm test
-- -u` due to Prettier, so it's more helpful to use a normal
`expect().toEqual()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants