Skip to content
Source
Docs
Explore
Skills
MCP servers
For agents
Search or jump to…
Sign in
Sign up
pingdotgg
/
t3code
Pull requests
pingdotgg
t3code
Public
Synced with GitHub
Popular #1
Fork
0
0
0
0
1
2
3
4
5
6
7
8
9
Code
Architecture
Issues
Pull requests
Community
Assets
CI
Agents
Settings
fix(desktop): report update install failure on the first click
#24633
Send to my agent
Closed
juliusmarminge
wants to merge 3 commits into
main
from
takeover/pr-15386
·
opened
last month
View on GitHub
Conversation
4
Commits
3
Files changed
2
Impact
Showing
2 changed files
with
122 additions
and
12 deletions
.
x
0 of 2 viewed, 2 left
Files
Hide whitespace
Unified
Split
89 additions and 0 deletions
+89
-0
apps/desktop/src/electron/ElectronUpdater.test.ts
Added
Diff
Before/After
Viewed
apps/desktop/src/electron/ElectronUpdater.test.ts
View file
@@ -0,0 +1,89 @@
1
+
import
{ assert, describe, it }
from
"@effect/vitest"
;
2
+
import
*
as
Effect
from
"effect/Effect"
;
3
+
import
*
as
Option
from
"effect/Option"
;
4
+
import
*
as
Result
from
"effect/Result"
;
5
+
import
*
as
NodeEvents
from
"node:events"
;
6
+
import
{ beforeEach, vi }
from
"vite-plus/test"
;
7
+
8
+
const
{ autoUpdaterMock } = vi.
hoisted
(() => ({
9
+
autoUpdaterMock
: {
10
+
channel
:
"latest"
,
11
+
events
:
undefined
as
unknown
as
NodeEvents
.
EventEmitter
,
12
+
quitAndInstall
: vi.
fn
(),
13
+
},
14
+
}));
15
+
16
+
vi.
mock
(
"electron-updater"
, () => ({
17
+
autoUpdater
:
new
Proxy
(autoUpdaterMock, {
18
+
// electron-updater's autoUpdater is an EventEmitter; forward emitter methods.
19
+
get
: (target, property) => {
20
+
if
(property
in
target)
return
target[property
as
keyof
typeof
target];
21
+
const
value =
Reflect
.
get
(target.
events
, property);
22
+
return
typeof
value ===
"function"
? value.
bind
(target.
events
) : value;
23
+
},
24
+
}),
25
+
}));
26
+
27
+
import
*
as
ElectronUpdater
from
"./ElectronUpdater.ts"
;
28
+
29
+
describe
(
"ElectronUpdater.quitAndInstall"
, () => {
30
+
beforeEach
(() => {
Home
Search
Explore
Menu