diff --git a/package.json b/package.json
index ddbd9fc..b623bd8 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
"check:astro": "astro check",
"check:typescript": "tsc --noEmit",
"test": "npm run test:unit && npm run test:integ",
- "test:unit": "vitest --coverage",
+ "test:unit": "vitest --coverage --run",
"test:integ": "cypress run"
},
"dependencies": {
diff --git a/src/env.d.ts b/src/env.d.ts
index d745612..29062a2 100644
--- a/src/env.d.ts
+++ b/src/env.d.ts
@@ -1,5 +1,6 @@
///
///
+///
interface ImportMetaEnv {
PRUSASLICER_PATH?: string
@@ -20,14 +21,6 @@ declare namespace App {
* authentification key is the api key or the session token
*/
authKey?: string
- responseBuilder: {
- body(body: string | Buffer | object | null | undefined): this
- headers(headers: Record): this
- addHeader(key: string, value: string): this
- addHeaders(headers: Record): this
- removeHeader(key: string): this
- status(status: number): this
- build(): Response
- } // ./libs/ResponseBuilder object
+ responseBuilder: ResponseBuilder
}
}
diff --git a/src/models/Client.ts b/src/models/Client.ts
index 19d1ac6..799002e 100644
--- a/src/models/Client.ts
+++ b/src/models/Client.ts
@@ -1,4 +1,3 @@
-import { MongoClient } from 'mongodb'
import mongoose from 'mongoose'
export default class Client {
diff --git a/src/models/Session/SessionDao.ts b/src/models/Session/SessionDao.ts
index c7554a6..fecbf6e 100644
--- a/src/models/Session/SessionDao.ts
+++ b/src/models/Session/SessionDao.ts
@@ -47,7 +47,6 @@ export default class SessionDao {
})
}
- public removeSession(res: ResponseInit & { readonly headers: Headers; }) {
-
+ public removeSession(_res: ResponseInit & { readonly headers: Headers; }) {
}
}
diff --git a/src/pages/account/login.astro b/src/pages/account/login.astro
index 974d999..54ae1fe 100644
--- a/src/pages/account/login.astro
+++ b/src/pages/account/login.astro
@@ -60,7 +60,7 @@ if (!connected && Astro.request.method === 'POST') {
} = load<{connected: boolean}>()
if (connected) {
- window.location = '/'
+ window.location.pathname = '/'
}
diff --git a/src/pages/account/logout.astro b/src/pages/account/logout.astro
deleted file mode 100644
index 10107f4..0000000
--- a/src/pages/account/logout.astro
+++ /dev/null
@@ -1,4 +0,0 @@
----
-return Astro.redirect('/account/login?logout')
-
----
diff --git a/tests/libs/gcodeUtilts.test.ts b/tests/libs/gcodeUtilts.test.ts
index 3f90bf6..1453f35 100644
--- a/tests/libs/gcodeUtilts.test.ts
+++ b/tests/libs/gcodeUtilts.test.ts
@@ -1,4 +1,4 @@
-import { afterEach, assert, beforeEach, describe, expect, it, test, vi } from 'vitest'
+import { describe, expect, it } from 'vitest'
import { getParams } from '../../src/libs/gcodeUtils'
diff --git a/tests/libs/rateLimit.test.ts b/tests/libs/rateLimit.test.ts
index eb6456e..3eed7d4 100644
--- a/tests/libs/rateLimit.test.ts
+++ b/tests/libs/rateLimit.test.ts
@@ -1,4 +1,4 @@
-import { afterEach, assert, beforeEach, describe, expect, it, test, vi } from 'vitest'
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import RateLimiter from '../../src/libs/RateLimiter'
diff --git a/tsconfig.json b/tsconfig.json
index ff1a0be..af28dc9 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,3 +1,4 @@
{
- "extends": "./node_modules/astro/tsconfigs/strictest.json"
+ "extends": "./node_modules/astro/tsconfigs/strictest.json",
+ "exclude": ["cypress"]
}
diff --git a/vitest.config.ts b/vitest.config.ts
index 9ef2ab4..b4b3250 100644
--- a/vitest.config.ts
+++ b/vitest.config.ts
@@ -1,6 +1,6 @@
///
import { getViteConfig } from 'astro/config'
-import { configDefaults } from 'vitest/config'
+// import { configDefaults } from 'vitest/config'
export default getViteConfig({
test: {