Explorar o código

ref: change test commands

Sv443 hai 4 meses
pai
achega
bcbe5872f4
Modificáronse 3 ficheiros con 24 adicións e 9 borrados
  1. 3 1
      package.json
  2. 16 0
      pnpm-lock.yaml
  3. 5 8
      src/types.ts

+ 3 - 1
package.json

@@ -11,7 +11,8 @@
     "build-www": "cd www && pnpm run build",
     "dev-all": "concurrently \"pnpm dev\" \"pnpm dev-www\"",
     "lint": "eslint . && tsc --noEmit",
-    "test": "start-server-and-test start http://127.0.0.1:8074/v2/health jest"
+    "test": "start-server-and-test start http://127.0.0.1:8074/v2/health run-tests",
+    "run-tests": "jest --testLocationInResults --verbose"
   },
   "repository": {
     "type": "git",
@@ -70,6 +71,7 @@
     "concurrently": "^9.1.0",
     "dotenv": "^16.4.5",
     "eslint": "^9.15.0",
+    "fast-xml-parser": "^4.5.0",
     "globals": "^15.12.0",
     "jest": "^29.7.0",
     "nodemon": "^3.1.7",

+ 16 - 0
pnpm-lock.yaml

@@ -99,6 +99,9 @@ importers:
       eslint:
         specifier: ^9.15.0
         version: 9.15.0
+      fast-xml-parser:
+        specifier: ^4.5.0
+        version: 4.5.0
       globals:
         specifier: ^15.12.0
         version: 15.12.0
@@ -1624,6 +1627,10 @@ packages:
   [email protected]:
     resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}
 
+  [email protected]:
+    resolution: {integrity: sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==}
+    hasBin: true
+
   [email protected]:
     resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==}
 
@@ -2726,6 +2733,9 @@ packages:
     resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
     engines: {node: '>=8'}
 
+  [email protected]:
+    resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==}
+
   [email protected]:
     resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
     engines: {node: '>=4'}
@@ -4756,6 +4766,10 @@ snapshots:
 
   [email protected]: {}
 
+  [email protected]:
+    dependencies:
+      strnum: 1.0.5
+
   [email protected]:
     dependencies:
       reusify: 1.0.4
@@ -5996,6 +6010,8 @@ snapshots:
 
   [email protected]: {}
 
+  [email protected]: {}
+
   [email protected]:
     dependencies:
       has-flag: 3.0.0

+ 5 - 8
src/types.ts

@@ -1,4 +1,4 @@
-//#SECTION server
+//#region server
 
 export type ServerResponse<T> = SuccessResponse<T> | ErrorResponse;
 
@@ -13,7 +13,7 @@ export type ErrorResponse = {
   message: string;
 }
 
-//#SECTION meta
+//#region meta
 
 interface Artist {
   name: string | null;
@@ -66,7 +66,7 @@ export interface GetMetaResult {
   all: SongMeta[];
 }
 
-//#SECTION translations
+//#region translations
 
 export interface SongTranslation {
   language: string;
@@ -76,13 +76,13 @@ export interface SongTranslation {
   url: string;
 }
 
-//#SECTION server
+//#region server
 
 export type ResponseType = "serverError" | "clientError" | "success";
 
 export type ResponseFormat = "json" | "xml";
 
-//#SECTION API
+//#region API
 
 /** The entire object returned by the search endpoint of the genius API */
 export type ApiSearchResult = {
@@ -171,6 +171,3 @@ export interface Album {
   id: number;
   artist: Artist;
 }
-
-//#SECTION internal
-export type SupportedMethods = "GET";