From 729c7fa12cf271c2c5a575bc4682916a4dee83c0 Mon Sep 17 00:00:00 2001 From: gc <30398469+gc@users.noreply.github.com> Date: Wed, 3 Jul 2024 00:33:47 +1000 Subject: [PATCH] fixes --- package.json | 2 +- tests/unit/http/http.test.ts | 23 ----------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/package.json b/package.json index ed5f1984d8..1abae257a1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "scripts": { "gen": "concurrently \"prisma generate --no-hints\" \"prisma generate --no-hints --schema prisma/robochimp.prisma\" && echo \"Generated Prisma Client\"", - "lint": "concurrently \"prettier --use-tabs ./**/*.{js,md,json,yml} --write\" \"eslint *.{ts,mts} \"{src,tests}/**/*.ts\" --fix\"", + "lint": "concurrently \"prettier --use-tabs ./**/*.{js,md,json,yml} --write\" \"eslint --quiet *.{ts,mts} \"{src,tests}/**/*.ts\" --fix\"", "build:tsc": "tsc -p src", "build": "concurrently \"yarn wipedist\" \"yarn gen\" && concurrently \"yarn prebuild:scripts\" && yarn build:tsc && yarn postbuild && echo \"Finished Building\"", "wipedist": "rimraf \"dist/\"", diff --git a/tests/unit/http/http.test.ts b/tests/unit/http/http.test.ts index 3055296996..1dfde56617 100644 --- a/tests/unit/http/http.test.ts +++ b/tests/unit/http/http.test.ts @@ -9,16 +9,6 @@ beforeAll(async () => { await app.ready(); }); -test('Commands route', async () => { - const response = await app.inject({ - method: 'GET', - url: '/commands' - }); - - expect(response.statusCode).toBe(200); - expect(response.payload).toEqual('[{"name":"test","desc":"test description","subOptions":[]}]'); -}); - test('github route', async () => { const response = await app.inject({ method: 'POST', @@ -41,19 +31,6 @@ test('github route', async () => { expect(response2.payload).toEqual('{"statusCode":400,"error":"Bad Request","message":"Bad Request"}'); }); -test('root route ratelimiting', async () => { - await app.inject({ - method: 'GET', - url: '/' - }); - const response = await app.inject({ - method: 'GET', - url: '/' - }); - - expect(response.statusCode).toBe(429); -}); - afterAll(async () => { await app.close(); });