mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	
		
			
	
	
		
			21 lines
		
	
	
		
			557 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
		
		
			
		
	
	
			21 lines
		
	
	
		
			557 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
|   | import { Application } from "express"; | ||
|  | import { beforeAll, describe, expect, it } from "vitest"; | ||
|  | import buildApp from "../../src/app.js"; | ||
|  | import supertest from "supertest"; | ||
|  | 
 | ||
|  | let app: Application; | ||
|  | let token: string; | ||
|  | 
 | ||
|  | describe("etapi/app-info", () => { | ||
|  |     beforeAll(async () => { | ||
|  |         app = await buildApp(); | ||
|  |     }); | ||
|  | 
 | ||
|  |     it("retrieves correct app info", async () => { | ||
|  |         const response = await supertest(app) | ||
|  |             .get("/etapi/app-info") | ||
|  |             .expect(200); | ||
|  |         expect(response.body.clipperProtocolVersion).toBe("1.0"); | ||
|  |     }); | ||
|  | }); |