Skip to content

Migrate testing suite to Vitest#1242

Merged
arturmuller merged 1 commit intoianstormtaylor:mainfrom
yeoffrey:vitest
Jun 5, 2024
Merged

Migrate testing suite to Vitest#1242
arturmuller merged 1 commit intoianstormtaylor:mainfrom
yeoffrey:vitest

Conversation

@yeoffrey
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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