test: adjust tests

This commit is contained in:
Karl-Philipp Wulfert
2019-05-28 15:36:50 +02:00
parent 15a61f6932
commit c30e83086a
6 changed files with 351 additions and 331 deletions

31
test/transport.spec.ts Normal file
View File

@@ -0,0 +1,31 @@
/*
* Copyright (C) 2019 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {expect} from 'chai';
import {slow, suite, test, timeout} from 'mocha-typescript';
import {isTransportWithVerification} from '../src/common';
import {DummyTransport, VerifiableDummyTransport} from './dummyTransport';
@suite(timeout(2000), slow(1000))
export class TransportSpec {
@test
isNotTransportWithVerification() {
return expect(isTransportWithVerification(new DummyTransport())).to.be.false;
}
@test
isTransportWithVerification() {
return expect(isTransportWithVerification(new VerifiableDummyTransport())).to.be.true;
}
}