feat: Introduce renderer helper

This commit is contained in:
Faruk AYDIN
2024-02-12 23:25:09 +01:00
parent c81531cb7a
commit 4f03f2ab51
3 changed files with 35 additions and 4 deletions

View File

@@ -1,7 +1,6 @@
import { describe, it, expect } from 'vitest';
import request from 'supertest';
import app from '../../../../app.js';
import appConfig from '../../../../config/app.js';
describe('GET /api/v1/automatisch/version', () => {
it('should return Automatisch version', async () => {
@@ -9,6 +8,19 @@ describe('GET /api/v1/automatisch/version', () => {
.get('/api/v1/automatisch/version')
.expect(200);
expect(response.body).toEqual({ version: appConfig.version });
const expectedPayload = {
data: {
version: '0.10.0',
},
meta: {
count: 1,
currentPage: null,
isArray: false,
totalPages: null,
type: 'Object',
},
};
expect(response.body).toEqual(expectedPayload);
});
});