mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	test(etapi): port app-info
This commit is contained in:
		
							
								
								
									
										15
									
								
								apps/server/spec/etapi/utils.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								apps/server/spec/etapi/utils.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| import type { Application } from "express"; | ||||
| import supertest from "supertest"; | ||||
| import { expect } from "vitest"; | ||||
|  | ||||
| export async function login(app: Application) { | ||||
|     // Obtain auth token. | ||||
|     const response = await supertest(app) | ||||
|         .post("/etapi/auth/login") | ||||
|         .send({ | ||||
|             "password": "demo1234" | ||||
|         }) | ||||
|         .expect(201); | ||||
|     const token = response.body.authToken; | ||||
|     expect(token).toBeTruthy(); | ||||
| } | ||||
		Reference in New Issue
	
	Block a user