[PR #540] [MERGED] Add vitest & cross-platform test support #921

Closed
opened 2026-10-31 22:18:03 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/desktop/pull/540
Author: @webfiltered
Created: 12/19/2024
Status: ✅ Merged
Merged: 12/23/2024
Merged by: @huchenlei

Base: main ← Head: vitest


📝 Commits (8)

  • a2f8f9f Replace jest with vitest - packages
  • f0ed816 Add vitest config
  • 6ccb21f Add vitest run script
  • c79dc83 Convert tests: vitest + cross-platform
  • f215c52 Use temp dir for test temp files
  • 70161d9 Use vitest workspace to explicitly define tests
  • 1acbffd nit - Doc [skip ci]
  • 7dcbfed Merge branch 'main' into vitest

📊 Changes

12 files changed (+544 additions, -1837 deletions)

View changed files

➖ jest.config.cjs (+0 -18)
📝 package.json (+3 -5)
📝 tests/unit/comfyConfigManager.test.ts (+38 -31)
📝 tests/unit/comfyServer.test.ts (+1 -0)
📝 tests/unit/comfyServerConfig.test.ts (+31 -13)
📝 tests/unit/handlers/appinfoHandlers.test.ts (+4 -3)
📝 tests/unit/handlers/pathHandler.test.ts (+4 -3)
📝 tests/unit/main.test.ts (+37 -37)
📝 vite.main.config.ts (+5 -0)
📝 vite.preload.config.ts (+6 -0)
➕ vitest.workspace.ts (+10 -0)
📝 yarn.lock (+405 -1727)

📄 Description

  • Requires #539
  • Makes tests platform-agnostic
  • Replaces jest with vitest
  • Fixes test watch issue - prevents temp files from being created in source directory
  • Minor refactors / linting

┆Issue is synchronized with this Notion page by Unito


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/desktop/pull/540 **Author:** [@webfiltered](https://github.com/webfiltered) **Created:** 12/19/2024 **Status:** ✅ Merged **Merged:** 12/23/2024 **Merged by:** [@huchenlei](https://github.com/huchenlei) **Base:** `main` ← **Head:** `vitest` --- ### 📝 Commits (8) - [`a2f8f9f`](https://github.com/Comfy-Org/desktop/commit/a2f8f9f32d0c90e8f464059271ece50e3b38e66d) Replace jest with vitest - packages - [`f0ed816`](https://github.com/Comfy-Org/desktop/commit/f0ed816c8fe55d14cd528c6fcbbdf8ba60d1fdb4) Add vitest config - [`6ccb21f`](https://github.com/Comfy-Org/desktop/commit/6ccb21f472cbf0582a1f3737c6d2cc4f881eb2e7) Add vitest run script - [`c79dc83`](https://github.com/Comfy-Org/desktop/commit/c79dc83b4d62bf45ea5c68b2a86b8944ccb2a916) Convert tests: vitest + cross-platform - [`f215c52`](https://github.com/Comfy-Org/desktop/commit/f215c524c24033fff01f91d510f99635bd452604) Use temp dir for test temp files - [`70161d9`](https://github.com/Comfy-Org/desktop/commit/70161d921937a1e84553f2c9ac4e978775c70616) Use vitest workspace to explicitly define tests - [`1acbffd`](https://github.com/Comfy-Org/desktop/commit/1acbffda9d19c11bff0f15ec8626955a17e90fc2) nit - Doc [skip ci] - [`7dcbfed`](https://github.com/Comfy-Org/desktop/commit/7dcbfed4f3129ba1ca6b27d9f28c54f43ac327f4) Merge branch 'main' into vitest ### 📊 Changes **12 files changed** (+544 additions, -1837 deletions) <details> <summary>View changed files</summary> ➖ `jest.config.cjs` (+0 -18) 📝 `package.json` (+3 -5) 📝 `tests/unit/comfyConfigManager.test.ts` (+38 -31) 📝 `tests/unit/comfyServer.test.ts` (+1 -0) 📝 `tests/unit/comfyServerConfig.test.ts` (+31 -13) 📝 `tests/unit/handlers/appinfoHandlers.test.ts` (+4 -3) 📝 `tests/unit/handlers/pathHandler.test.ts` (+4 -3) 📝 `tests/unit/main.test.ts` (+37 -37) 📝 `vite.main.config.ts` (+5 -0) 📝 `vite.preload.config.ts` (+6 -0) ➕ `vitest.workspace.ts` (+10 -0) 📝 `yarn.lock` (+405 -1727) </details> ### 📄 Description - Requires #539 - Makes tests platform-agnostic - Replaces `jest` with `vitest` - Fixes test watch issue - prevents temp files from being created in source directory - Minor refactors / linting ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-540-Add-vitest-cross-platform-test-support-1616d73d365081239d00d6f8c031fdf1) by [Unito](https://www.unito.io) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 22:18:03 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/desktop#921
No description provided.