Skip to content

Commit 3c2daca

Browse files
committed
start adding win32 support
1 parent 3ab80d5 commit 3c2daca

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class Updates {
8383
const assetPlatform = fileName => {
8484
if (/.*(mac|darwin).*\.zip/.test(fileName)) return 'darwin'
8585
if (/\.AppImage$/.test(fileName)) return 'appimage'
86+
if (/\.exe$/.test(fileName)) return 'win32'
8687
return false
8788
}
8889

test/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ test('Updates', async t => {
7474
let body = await res.json()
7575
t.match(body.url, /\.AppImage$/)
7676
})
77+
78+
await t.test('Win32', async t => {
79+
let res = await fetch(`${address}/zeit/hyper/win32/0.0.0`)
80+
t.equal(res.status, 200)
81+
let body = await res.json()
82+
t.match(body.url, /\.exe$/)
83+
})
7784
})
7885

7986
server.close()

0 commit comments

Comments
 (0)