Resolve "Transition to ESLint"

This commit is contained in:
Thea Schöbl
2022-06-27 14:40:09 +00:00
committed by Rainer Killinger
parent ca1d2444e0
commit 418ba67d15
47 changed files with 1854 additions and 1634 deletions

View File

@@ -22,7 +22,6 @@ import sinon from 'sinon';
describe('Backend transport', function () {
describe('isTransportWithVerification', function () {
it('should return false if transport is not verifiable', function () {
expect(isTransportWithVerification({} as Transport)).to.be.false;
expect(isTransportWithVerification({verify: 'foo'} as unknown as Transport)).to.be.false;
@@ -30,6 +29,7 @@ describe('Backend transport', function () {
it('should return true if transport is verifiable', function () {
// a transport which has verify function should be verifiable
// eslint-disable-next-line @typescript-eslint/no-empty-function
expect(isTransportWithVerification({verify: () => {}} as unknown as Transport)).to.be.true;
});
});
@@ -43,7 +43,7 @@ describe('Backend transport', function () {
});
it('should provide only one instance of the transport', function () {
// @ts-ignore
// @ts-expect-error not assignable
sandbox.stub(SMTP, 'getInstance').callsFake(() => {
return {};
});
@@ -77,8 +77,10 @@ describe('Backend transport', function () {
});
it('should provide information that the transport if waiting for its verification', function () {
// @ts-ignore
sandbox.stub(SMTP, 'getInstance').callsFake(() => {return {verify: () => Promise.resolve(true)}});
// @ts-expect-error not assignable
sandbox.stub(SMTP, 'getInstance').callsFake(() => {
return {verify: () => Promise.resolve(true)};
});
expect(BackendTransport.getInstance().isWaitingForVerification()).to.be.true;
});