Added tests for the api docs
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/pr Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/pr Build is passing
				
			ref #52
This commit is contained in:
		
							
								
								
									
										34
									
								
								src/tests/api_docs.spec.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								src/tests/api_docs.spec.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,34 @@ | ||||
| import axios from 'axios'; | ||||
| import { config } from '../config'; | ||||
| const base = "http://localhost:" + config.internal_port | ||||
|  | ||||
| describe('GET /api/docs/openapi.json', () => { | ||||
| 	it('OpenAPI Spec is availdable 200', async () => { | ||||
| 		const res = await axios.get(base + '/api/docs/openapi.json'); | ||||
| 		expect(res.status).toEqual(200); | ||||
| 	}); | ||||
| }); | ||||
| describe('GET /api/docs/swagger.json', () => { | ||||
| 	it('OpenAPI Spec is availdable 200', async () => { | ||||
| 		const res = await axios.get(base + '/api/docs/swagger.json'); | ||||
| 		expect(res.status).toEqual(200); | ||||
| 	}); | ||||
| }); | ||||
| describe('GET /api/docs/swaggerui', () => { | ||||
| 	it('swaggerui is availdable 200', async () => { | ||||
| 		const res = await axios.get(base + '/api/docs/swaggerui'); | ||||
| 		expect(res.status).toEqual(200); | ||||
| 	}); | ||||
| }); | ||||
| describe('GET /api/docs/redoc', () => { | ||||
| 	it('redoc is availdable 200', async () => { | ||||
| 		const res = await axios.get(base + '/api/docs/redoc'); | ||||
| 		expect(res.status).toEqual(200); | ||||
| 	}); | ||||
| }); | ||||
| describe('GET /api/docs/rapidoc', () => { | ||||
| 	it('rapidoc is availdable 200', async () => { | ||||
| 		const res = await axios.get(base + '/api/docs/rapidoc'); | ||||
| 		expect(res.status).toEqual(200); | ||||
| 	}); | ||||
| }); | ||||
		Reference in New Issue
	
	Block a user