mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-23 01:53:00 +00:00
Resolve "Transition to ESLint"
This commit is contained in:
committed by
Rainer Killinger
parent
ca1d2444e0
commit
418ba67d15
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user