1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/lib/routes/admin-api/applications.test.js
ivaosthu f5e9ca3bbe Implement support for logger provider.
This allows the users of 'unleash-server' to programatically
change the logger implemnentation. #175
2020-02-20 08:33:33 +01:00

35 lines
786 B
JavaScript

'use strict';
const { test } = require('ava');
const store = require('./../../../test/fixtures/store');
const supertest = require('supertest');
const getApp = require('../../app');
const { EventEmitter } = require('events');
const eventBus = new EventEmitter();
function getSetup() {
const stores = store.createStores();
const app = getApp({
baseUriPath: '',
stores,
eventBus,
});
return {
request: supertest(app),
stores,
};
}
test('should return list of client applications', t => {
t.plan(1);
const { request } = getSetup();
return request
.get('/api/admin/metrics/applications')
.expect(200)
.expect(res => {
t.true(res.body.applications.length === 0);
});
});