Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/desktop-electron/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opencode-ai/desktop-electron",
"private": true,
"version": "2026.5.17",
"version": "2026.5.18",
"type": "module",
"license": "Apache-2.0",
"homepage": "https://pawwork.ai",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from "./renderer-diagnostics"

let roots: string[] = []
const posixPermissionsTest = process.platform === "win32" ? test.skip : test

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This custom alias can be removed in favor of using Bun's built-in test.if() modifier directly on the test case. This is more idiomatic and avoids the need for manual wrapping of test functions, ensuring consistency with modifiers like .only and .skip.

References
  1. When wrapping test functions to apply custom timeouts or configurations (e.g., for platform-specific stability), ensure that modifiers like .only and .skip are also wrapped to maintain consistent behavior across all test variants and avoid surprises during debugging.


async function tempRoot() {
const root = await mkdtemp(join(tmpdir(), "pawwork-renderer-diagnostics-"))
Expand Down Expand Up @@ -170,7 +171,7 @@ describe("renderer diagnostics recorder", () => {
expect(content).toContain("msg_11")
})

test("retention keeps the log intact when the existing file cannot be read", async () => {
posixPermissionsTest("retention keeps the log intact when the existing file cannot be read", async () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Instead of using a custom alias, leverage Bun's built-in test.if() modifier. This approach is more idiomatic and ensures that other test modifiers (such as .only or .skip) behave consistently across all platforms, which aligns with the repository rule regarding test function wrappers.

Suggested change
posixPermissionsTest("retention keeps the log intact when the existing file cannot be read", async () => {
test.if(process.platform !== "win32")("retention keeps the log intact when the existing file cannot be read", async () => {
References
  1. When wrapping test functions to apply custom timeouts or configurations (e.g., for platform-specific stability), ensure that modifiers like .only and .skip are also wrapped to maintain consistent behavior across all test variants and avoid surprises during debugging.

const root = await tempRoot()
const recorder = createRendererDiagnosticsRecorder({
root,
Expand Down
Loading