Skip to content

Commit 1491782

Browse files
committed
add passing main route test (cov 83%)
1 parent 0d4f523 commit 1491782

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ const createServer = () =>
1717

1818
test('Updates', async t => {
1919
const { server, address } = await createServer()
20-
const res = await fetch(`${address}/`)
20+
21+
let res = await fetch(`${address}/`)
2122
t.equal(res.status, 404)
23+
24+
res = await fetch(`${address}/dat-land/dat-desktop/darwin/1.0.0`)
25+
t.equal(res.status, 200)
26+
const body = await res.json()
27+
t.ok(body.name)
28+
t.match(body.url, /-mac\.zip$/)
29+
2230
server.close()
2331
})

0 commit comments

Comments
 (0)