mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01: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");
 | 
						|
    });
 | 
						|
});
 |