Migrate from Jest to node:test #115
No reviewers
Labels
No labels
bug
dependencies
docker
documentation
duplicate
enhancement
good first issue
help wanted
invalid
javascript
question
rust
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: andras/vault-link#115
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "asch/node-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There's no reason to use Jest as https://nodejs.org/api/test.html#test-runner is a modern alternative to do TS testing
Pull Request Overview
This PR migrates the test framework from Jest to Node.js's built-in test runner (
node:test). The migration replaces Jest-specific assertions and mocking APIs with their Node.js equivalents across all test files in the frontend packages.Key changes:
tsx --testcommand for running TypeScript testsnode:testimports andnode:assertassertionsReviewed Changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@ -74,0 +73,4 @@formData.append("content",new Blob([new Uint8Array(contentBytes)]));The
new Uint8Array(contentBytes)wrapper appears unnecessary ifcontentBytesis already a Uint8Array or compatible type. Consider checking if this conversion is actually needed, as it may create an unnecessary copy of the data.@ -25,3 +25,4 @@export class SyncClient {private static readonly MINIMUM_SAVE_INTERVAL_MS = 1000;private hasStartedOfflineSync = false;private hasFinishedOfflineSync = false;[nitpick] The new
hasStartedOfflineSyncproperty should be declared beforehasFinishedOfflineSyncto maintain logical ordering, as the start operation precedes the finish operation.