GitLab wurde aktualisiert. Dank regelmäßiger Updates bleibt das THM GitLab sicher und Sie profitieren von den neuesten Funktionen. Vielen Dank für Ihre Geduld.

Commit 8b1605e1 authored by Christopher Mark Fullarton's avatar Christopher Mark Fullarton
Browse files

Fixes linting errors

parent 1d3a9683
......@@ -15,7 +15,7 @@ export abstract class AbstractDAO {
return this._updateEmitter;
}
public abstract async getStatistics(): Promise<{ [key: string]: number }>;
public abstract getStatistics(): Promise<{ [key: string]: number }>;
protected isEmptyVars(...variables): boolean {
return variables.length > 0 && variables.filter(variable => this.isEmptyVar(variable)).length > 0;
......
......@@ -100,6 +100,6 @@ export class ExcelWorkbook implements IExcelWorkbook {
}
this._worksheets.push(new ArchivedQuizWorksheet(worksheetOptions));
return await Promise.all(this._worksheets.map(val => new Promise(resolve => val.renderingFinished.on('done', () => resolve()))));
return await Promise.all(this._worksheets.map(val => new Promise<void>(resolve => val.renderingFinished.on('done', () => resolve()))));
}
}
......@@ -817,7 +817,7 @@ export class QuizRouter extends AbstractRouter {
quiz: parsedQuiz,
mf: res.__mf,
});
await new Promise(resolve => wb.renderingFinished.on('done', () => resolve()));
await new Promise<void>(resolve => wb.renderingFinished.on('done', () => resolve()));
const buffer = await wb.writeToBuffer();
res.header('Content-Length', buffer.length.toString());
......
......@@ -172,7 +172,7 @@ class ExcelExportTestSuite {
mf: (i18n.__mf as unknown as MessageFormat),
});
await new Promise(resolve => wb.renderingFinished.once('done', () => {
await new Promise<void>(resolve => wb.renderingFinished.once('done', () => {
resolve();
}));
const buffer = await wb.writeToBuffer();
......
......@@ -9,10 +9,10 @@ const MongoMemoryServer = require('mongodb-memory-server').MongoMemoryServer;
prepare(async (done) => {
process.send = () => true;
const sandbox = sinon.createSandbox();
sandbox.stub(AMQPConnector, 'initConnection').value(() => new Promise(resolve => resolve()));
sandbox.stub(AMQPConnector, 'initConnection').value(() => new Promise<void>(resolve => resolve()));
sandbox.stub(AMQPConnector, 'channel').value({
deleteExchange: () => new Promise(resolve => resolve()),
assertExchange: () => new Promise(resolve => resolve()),
deleteExchange: () => new Promise<void>(resolve => resolve()),
assertExchange: () => new Promise<void>(resolve => resolve()),
publish: () => {},
});
......
......@@ -35,12 +35,12 @@ class LibRouterTestSuite {
const sandbox = sinon.createSandbox();
sandbox.stub(puppeteer, 'launch').value(() => new Promise(resolve => resolve({
newPage: () => new Promise(resolve2 => resolve2({
setViewport: () => new Promise(resolve1 => resolve1()),
setContent: () => new Promise(resolve1 => resolve1()),
addStyleTag: () => new Promise(resolve1 => resolve1()),
setViewport: () => new Promise<void>(resolve1 => resolve1()),
setContent: () => new Promise<void>(resolve1 => resolve1()),
addStyleTag: () => new Promise<void>(resolve1 => resolve1()),
screenshot: () => new Promise(resolve1 => resolve1(Buffer.from([1]))),
})),
close: () => new Promise(resolve1 => resolve1()),
close: () => new Promise<void>(resolve1 => resolve1()),
})));
const res = await chai.request(router).post(`${this._baseApiRoute}/image/quiz`).send({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment