Skip to content

Updating visual tests docs for 2.x versions #7827

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 6 commits into
base: dev-2.0
Choose a base branch
from

Conversation

perminder-17
Copy link
Collaborator

@perminder-17 perminder-17 commented May 17, 2025

Fixing docs for unit/visual testings.

@perminder-17 perminder-17 marked this pull request as ready for review June 2, 2025 21:45
@perminder-17
Copy link
Collaborator Author

Hi @davepagurek @ksen0, while reviewing unit_testing.md I noticed it still says we “use Mocha” and that we “import Chai for assertions.” In the dev-2.0 branch the runner is now Vitest, which exposes Mocha-style globals and bundles Chai internally. Is my docs technically correct for that part? I was little confused with it. Thanks :)

@perminder-17 perminder-17 requested review from davepagurek and ksen0 June 2, 2025 21:57
@@ -217,13 +224,11 @@ visualTest('2D objects maintain correct size', function(p5, screenshot) {
});
```

If you need to add a new test file, add it to that folder, then add the filename to the list in `test/visual/visualTestList.js`. Additionally, if you want that file to be run automatically as part of continuous integration on every pull request, add the filename to the `visual` list in `test/unit/spec.js`.
No manual registration necessary. Any file placed in `test/unit/visual/cases` is auto-discovered by Vitest.
Copy link
Member

Choose a reason for hiding this comment

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

Minor: "To add a new test file, place it into test/unit/visual/cases. This will be auto-discovered by Vitest - no manual registration needed."

@perminder-17 perminder-17 linked an issue Jun 3, 2025 that may be closed by this pull request
17 tasks
@perminder-17
Copy link
Collaborator Author

Thanks @ksen0 , I can work on your suggestion asap. :)

@perminder-17 perminder-17 requested a review from ksen0 June 7, 2025 02:43
Copy link
Member

@ksen0 ksen0 left a comment

Choose a reason for hiding this comment

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

This looks great, thank you @perminder-17 !

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Visual Testing Documentation Mismatch
2 participants