apache / apache/daffodil-vscode

Task: Replace `mocha` with `vitest` for SVelte tests

Open
#1,659 0 comments 0 reactions 1 assignee Claimed by @stricklandrbls View on GitHub
build CI configuration data editor debugger dependencies documentation extension TDML testing
Dominant language
TypeScript
Stars
18
Forks
33
Avg merge
3d 6h
Merged PRs (30d)
7

Description

# Task: Replace `mocha` with `vitest` for Svelte Tests

## Description  

`mocha` as the testsuite is no longer compatible for executing tests when the updated Svelte 5 _runes_ exist within a testable source.

Using `vitest` would be a complete, and compatible, solution as it is used alongside `vite`. I feel that this would be the best solution given that `vite` is now being used as a packaging dependency.

## Acceptance Criteria  

`vitest` is successfully replaced for `mocha`/`chai` and all of the SVelte tests that exist and can execute while accurately reporting test case results.

## Additional Information

~~I have tested this locally and all of the test files execute with `vitest`, even the non Svelte files.~~
**Update**
I originally had all tests executing and reporting correct results but upon inspecting under the hood of the native VSCode Test Explorer I found that it was smart enough to pull in mocha to run those tests within the `./src/tests/` directory.

`vitest` does not have to capability to provide the VSCode API due runtime dependency issues. `mocha` will still have to be used for those tests

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.