-
Notifications
You must be signed in to change notification settings - Fork 85
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
Refactor generateToc tests to use normal project structure #1267
Conversation
...DEFAULT_ARGS, | ||
}, | ||
]); | ||
|
||
expect(toc).toMatchInlineSnapshot(` |
There was a problem hiding this comment.
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
{ | ||
moduleId: "my_quantum_project.another", | ||
title: "dedicated module", | ||
kind: "module", | ||
}, |
There was a problem hiding this comment.
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()
.
isReleaseNotes: true, | ||
}, | ||
], | ||
); | ||
|
||
expect(toc).toMatchInlineSnapshot(` |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
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()`.
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 normalexpect().toEqual()
.