test: migrate mashup tests to use enigma mocker (#725)

This commit is contained in:
Thomas Bengtsson
2021-12-03 09:49:03 +01:00
committed by GitHub
parent a48f583ed2
commit 6fe584cff8
11 changed files with 529 additions and 499 deletions

View File

@@ -3,7 +3,6 @@
const yargs = require('yargs');
const mashupServer = require('../test/mashup/server');
const sseServer = require('../test/fixtures/sse');
const useEngine = require('../commands/serve/lib/engine');
const args = yargs
@@ -12,18 +11,13 @@ const args = yargs
type: 'boolean',
describe: 'Start the mashup server',
})
.option('sse', {
default: true,
type: 'boolean',
describe: 'Start the SSE plugin',
})
.option('engine', {
default: false,
type: 'boolean',
describe: 'Start the engine',
}).argv;
const { start, sse, engine } = args;
const { start, engine } = args;
let hasCleanedUp = false;
const services = [];
@@ -42,17 +36,6 @@ if (start) {
});
}
if (sse) {
const s = sseServer;
services.push({
name: 'SSE plugin server',
start: () => {
s.start();
},
stop: () => s.close(),
});
}
if (engine) {
let e;
services.push({