File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,23 @@ test('Updates', async t => {
21
21
let res = await fetch ( `${ address } /` )
22
22
t . equal ( res . status , 404 )
23
23
24
+ // exists and has update
24
25
res = await fetch ( `${ address } /dat-land/dat-desktop/darwin/1.0.0` )
25
26
t . equal ( res . status , 200 )
26
27
const body = await res . json ( )
27
28
t . ok ( body . name )
28
29
t . match ( body . url , / - m a c \. z i p $ / )
29
30
31
+ // exists but no updates
32
+ res = await fetch (
33
+ `https://api.github.com/repos/dat-land/dat-desktop/releases?per_page=1`
34
+ )
35
+ const releases = await res . json ( )
36
+ res = await fetch (
37
+ `${ address } /dat-land/dat-desktop/darwin/${ releases [ 0 ] . name } `
38
+ )
39
+ t . equal ( res . status , 204 )
40
+
30
41
// exists but has no releases
31
42
res = await fetch ( `${ address } /juliangruber/brace-expansion/darwin/0.0.0` )
32
43
t . equal ( res . status , 404 )
You can’t perform that action at this time.
0 commit comments