Skip to content

Move tests to Vitest #1226

@arturmuller

Description

@arturmuller

Superstruct tests are currently written in Mocha, which is starting to show its age. It would be great if we could move to something like Vitest. This has two goals:

  1. Unblock NodeNext Compat #1224 (Mocha is currently failing because it is not compatible with the new config)
  2. Make the lib more comfortable to contribute/work with for new contributors — I doubt there are many people who would choose Mocha over Vitest in 2024.

@ciscoheat — I saw that you already got started on this in #1211 , but when I try to run it locally it didn't actually run most of the tests. If you were willing to look into this again, with the sole focus being moving to Vitest, it would be massively appreciated. 🙌

So that goal is:

  1. Making sure that all tests run
  2. (stretch goal) Refactoring the tests so that they seem familiar to a person who has only ever worked with Vitest. (The current implementation is not how I would expect anyone to write Vitest tests).

Metadata

Metadata

Assignees

No one assigned

    Labels

    ♥ help pleaseIssues that we'd love help solving

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions