Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Jul 2, 2024
1 parent 7a5c000 commit 729c7fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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/\"",
Expand Down
23 changes: 0 additions & 23 deletions tests/unit/http/http.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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();
});

0 comments on commit 729c7fa

Please sign in to comment.