mirror of
https://github.com/directus/directus.git
synced 2026-01-13 18:18:17 -05:00
30 lines
772 B
TypeScript
30 lines
772 B
TypeScript
import jestOpenAPI from 'jest-openapi';
|
|
import axios from 'axios';
|
|
import path from 'path';
|
|
import { api } from './api';
|
|
|
|
jestOpenAPI(path.join(__dirname, 'openapi.json'));
|
|
|
|
describe('Extensions', function () {
|
|
it('GET /interfaces', async function () {
|
|
const res = await axios.get(`${api}/interfaces?access_token=admin`);
|
|
|
|
expect(res.status).toEqual(200);
|
|
expect(res).toSatisfyApiSpec();
|
|
});
|
|
|
|
it('GET /layouts', async function () {
|
|
const res = await axios.get(`${api}/layouts?access_token=admin`);
|
|
|
|
expect(res.status).toEqual(200);
|
|
expect(res).toSatisfyApiSpec();
|
|
});
|
|
|
|
it('GET /modules', async function () {
|
|
const res = await axios.get(`${api}/modules?access_token=admin`);
|
|
|
|
expect(res.status).toEqual(200);
|
|
expect(res).toSatisfyApiSpec();
|
|
});
|
|
});
|