Skip to content
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

Migrate testing suite to Vitest #1242

Merged
merged 1 commit into from
Jun 5, 2024
Merged

Conversation

yeoffrey
Copy link
Contributor

@yeoffrey yeoffrey commented Jun 2, 2024

Closes: #1226

Description

This PR contains the changes nessessary to migrate the current testing suite, which is Mocha to Vitest. This is similar to ciscoheat's PR, except that it only contains Vitest changes.

Note: Vitest automatically finds tests by looking for filenames that end with .test.ts, so I've done this here. This should also help unblock #1224.

Next steps

I believe that the current way which the test suite gathers files from the file system is not ideal. I think theres a better way to organize these tests, but that should be in another PR.

Comment on lines -14 to -21
describe('superstruct', () => {
describe('api', () => {
require('./api/assert')
require('./api/create')
require('./api/is')
require('./api/mask')
require('./api/validate')
})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since these are automatically run by changing the filename to end with .test.ts, I've removed them here.

@arturmuller
Copy link
Collaborator

Hey @yeoffrey -- this is lovely! ❤️

I agree that to make things feel more Vitest-y it should probably be organised differently. PRs on that front extremely welcome!

Merging...

@arturmuller arturmuller merged commit f24c3cd into ianstormtaylor:main Jun 5, 2024
2 checks passed
yeoffrey added a commit to yeoffrey/superstruct that referenced this pull request Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move tests to Vitest
2 participants