mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-10 03:32:52 +00:00
fix: make facets work again
This commit is contained in:
committed by
Rainer Killinger
parent
5d6d4b53f0
commit
d917627d58
@@ -13,26 +13,31 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// tslint:disable
|
||||
import * as supertest from 'supertest';
|
||||
import * as chaiAsPromised from 'chai-as-promised';
|
||||
import {timeout, slow} from 'mocha-typescript';
|
||||
import {timeout, slow, test, suite} from 'mocha-typescript';
|
||||
import {should, use} from 'chai';
|
||||
import {configureApp, app} from '../src/app';
|
||||
import {configureApp} from '../src/app';
|
||||
import {registerAddRequest, registerRemoveRequest} from './routes/plugin-register-route.spec';
|
||||
import {plugins} from '../src/common';
|
||||
import {SCPluginRemove} from '@openstapps/core';
|
||||
import * as nock from 'nock';
|
||||
import * as got from 'got';
|
||||
import * as sinon from 'sinon';
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import * as express from 'express';
|
||||
|
||||
should();
|
||||
use(chaiAsPromised);
|
||||
let appTest: supertest.SuperTest<supertest.Test>;
|
||||
// configures the backend and creates supertest
|
||||
const prepareTestApp = async () => {
|
||||
await configureApp();
|
||||
async function prepareTestApp() {
|
||||
const app = express();
|
||||
await configureApp(app);
|
||||
Logger.ok('App Configured');
|
||||
appTest = supertest(app);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests plugin registration routes
|
||||
@@ -47,6 +52,7 @@ export class AppPluginRegisterSpec {
|
||||
async after() {
|
||||
// remove plugins
|
||||
plugins.clear();
|
||||
|
||||
}
|
||||
|
||||
@test
|
||||
@@ -119,7 +125,7 @@ export class AppPluginRegisterSpec {
|
||||
/**
|
||||
* Tests functioning of already registered plugins
|
||||
*/
|
||||
@suite(timeout(10000), slow(5000))
|
||||
@suite(timeout(50000), slow(5000))
|
||||
export class AppPluginSpec {
|
||||
static async before() {
|
||||
if (typeof appTest === 'undefined') {
|
||||
@@ -13,6 +13,7 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// tslint:disable
|
||||
import {
|
||||
SCPluginAdd,
|
||||
SCPluginAlreadyRegisteredErrorResponse,
|
||||
@@ -20,7 +21,7 @@ import {
|
||||
SCNotFoundErrorResponse,
|
||||
} from '@openstapps/core';
|
||||
import {should, use} from 'chai';
|
||||
import {slow, timeout} from 'mocha-typescript';
|
||||
import {slow, timeout, test, suite} from 'mocha-typescript';
|
||||
import * as chaiAsPromised from 'chai-as-promised';
|
||||
import {plugins} from '../../src/common';
|
||||
import {pluginRegisterHandler} from '../../src/routes/plugin-register-route';
|
||||
|
||||
@@ -13,9 +13,10 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// tslint:disable
|
||||
import {should, use, expect} from 'chai';
|
||||
import * as chaiAsPromised from 'chai-as-promised';
|
||||
import {slow, timeout} from 'mocha-typescript';
|
||||
import {slow, timeout, test, suite} from 'mocha-typescript';
|
||||
import {SCPluginMetaData, SCInternalServerErrorResponse, SCValidationErrorResponse} from '@openstapps/core';
|
||||
import {virtualPluginRoute} from '../../src/routes/virtual-plugin-route';
|
||||
import {mockReq} from 'sinon-express-mock'
|
||||
|
||||
Reference in New Issue
Block a user