Skip to content

Task: Replace mocha with vitest for SVelte tests #1659

@stricklandrbls

Description

@stricklandrbls

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

Metadata

Metadata

Labels

CIIssues related to CI workflowsTDMLIssues related to TDMLbuildIssues related to building of the codeconfigurationissues related to configurationdata editorIssues related to the Data Editor capabilitydebuggerIssues related to the DFDL debugger capabilitydependenciesPull requests that update a dependency filedocumentationImprovements or additions to documentationextensionIssues releated to the VSCode ExtensiontestingUpdates to test suite

Type

No fields configured for Task.

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions