dfinity / vscode-motoko

Motoko language support for VS Code.
Apache License 2.0
42 stars 15 forks source link

Add user interface for running unit tests #170

Closed rvanasa closed 1 year ago

rvanasa commented 1 year ago

Integrates a Motoko unit test runner directly into the VS Code extension.

Screenshot 2023-02-15 at 5 30 35 PM

This workflow is compatible with testing libraries such as Motoko Matchers and supports running test files via the moc interpreter or as a WASI module.

It's also worth noting that this works completely out of the box using moc.js and Wasmer, both of which are bundled with the extension. As a result, it's no longer necessary to install wasmtime (or even dfx) to locally run the base library unit tests.

Progress:

Next steps:

Feedback is welcome!

rvanasa commented 1 year ago

Corresponding base library PR: https://github.com/dfinity/motoko-base/pull/527