mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	test(etapi): port search
This commit is contained in:
		| @@ -14,3 +14,20 @@ export async function login(app: Application) { | ||||
|     expect(token).toBeTruthy(); | ||||
|     return token; | ||||
| } | ||||
|  | ||||
| export async function createNote(app: Application, token: string, content?: string) { | ||||
|     const response = await supertest(app) | ||||
|         .post("/etapi/create-note") | ||||
|         .auth("etapi", token, { "type": "basic"}) | ||||
|         .send({ | ||||
|             "parentNoteId": "root", | ||||
|             "title": "Hello", | ||||
|             "type": "text", | ||||
|             "content": content ?? "Hi there!", | ||||
|         }) | ||||
|         .expect(201); | ||||
|  | ||||
|     const noteId = response.body.note.noteId; | ||||
|     expect(noteId).toStrictEqual(noteId); | ||||
|     return noteId; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user