style: cleanup tests and tsup configs

This commit is contained in:
iCrawl
2022-06-04 15:21:57 +02:00
parent a45bef4cad
commit 6b8ef20cb3
26 changed files with 310 additions and 306 deletions

View File

@@ -2,7 +2,8 @@
"root": true,
"extends": "marine/prettier/node",
"parserOptions": {
"project": "./tsconfig.eslint.json"
"project": "./tsconfig.eslint.json",
"extraFileExtensions": [".mjs"]
},
"ignorePatterns": ["**/dist/*"],
"env": {

View File

@@ -58,7 +58,7 @@ test('simple GET', async () => {
expect(headers['content-type']).toEqual(expect.stringMatching(/^application\/json/));
// Ratelimit headers should be dropped
expect(headers).not.toHaveProperty('x-ratelimit-limit');
expect(res.statusCode).toBe(200);
expect(res.statusCode).toEqual(200);
expect(res.body).toStrictEqual({ test: true });
});
@@ -78,6 +78,6 @@ test('failed request', async () => {
const headers = res.headers as Record<string, string>;
expect(headers['content-type']).toEqual(expect.stringMatching(/^application\/json/));
expect(res.statusCode).toBe(404);
expect(res.statusCode).toEqual(404);
expect(res.body).toStrictEqual({ code: 404, message: 'Not Found' });
});