Skip to content

Commit

Permalink
Remove /download-binary/ tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyn-Price committed Nov 19, 2023
1 parent 2cc346d commit c2b50b6
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions tests/download.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,6 @@ describe('Normal Download URL', () => {
expect(res.headers['location']).toStrictEqual("https://edge.forgecdn.net/files/2724/420/jei_1.12.2-4.15.0.281.jar")
})

test('Normal Jar w/ problamatic chars should be correct', async () => {
//curse.maven:better-foliage-228529:3335093
const res = await requestWithSupertest.get(downloadUrl('better-foliage', '228529', '3335093', '.jar'))
expect(res.status).toStrictEqual(302)
expect(res.headers['location']).toStrictEqual("/download-binary/3335/93/BetterFoliage-2.6.5%252B368b50a-Fabric-1.16.5.jar")
})

test('Normal Jar w/ encoded problamatic chars should be correct', async () => {
//curse.maven:embeddium-908741:4862491
const res = await requestWithSupertest.get(downloadUrl('embeddium', '908741', '4862491', '.jar'))
expect(res.status).toStrictEqual(302)
expect(res.headers['location']).toStrictEqual("/download-binary/4862/491/embeddium-0.2.9%252bmc1.20.1.jar")
})

test("Normal Jar that doesn't exist should return 404", async () => {
//curse.maven:invalid-12345:12345
const res = await requestWithSupertest.get(downloadUrl('invalid', '12345', '54321', '.jar'))
Expand Down Expand Up @@ -74,13 +60,6 @@ describe('Classifier Download URL', () => {
expect(res.headers['location']).toStrictEqual("https://edge.forgecdn.net/files/2452/538/JustEnoughResources-1.12-0.8.2.20-api.jar")
})

test('Classifier Jar w/ problamatic chars should be correct', async () => {
//curse.maven:pehkui-319596:3577084-sources-dev-3577085:sources-dev
const res = await requestWithSupertest.get(downloadUrl('pehkui', '319596', '3577084-sources-dev-3577085', '-sources-dev.jar'))
expect(res.status).toStrictEqual(302)
expect(res.headers['location']).toStrictEqual("/download-binary/3577/85/Pehkui-3.1.0%252B1.18.1-forge-sources-dev.jar")
})

test("Classifier Jar where original jar doesn't exist should return 404", async () => {
//curse.maven:invalid-12345:54321-sources-54322:sources
const res = await requestWithSupertest.get(downloadUrl('invalid', '12345', '54321', '-sources.jar'))
Expand Down

0 comments on commit c2b50b6

Please sign in to comment.