2019-08-20 17:50:17 +02:00
|
|
|
import { expect, tap } from '@pushrocks/tapbundle';
|
2019-08-20 18:42:52 +02:00
|
|
|
import * as smartproxy from '../ts/index';
|
2019-08-20 17:50:17 +02:00
|
|
|
|
2019-08-21 23:41:06 +02:00
|
|
|
let testProxy: smartproxy.SmartProxy;
|
|
|
|
|
2019-08-22 15:09:48 +02:00
|
|
|
if (process.env.CI) {
|
|
|
|
process.exit(0);
|
|
|
|
}
|
|
|
|
|
2019-08-20 17:50:17 +02:00
|
|
|
tap.test('first test', async () => {
|
2019-08-21 23:41:06 +02:00
|
|
|
testProxy = new smartproxy.SmartProxy();
|
|
|
|
});
|
|
|
|
|
|
|
|
tap.test('should start the testproxy', async () => {
|
|
|
|
await testProxy.start();
|
|
|
|
});
|
|
|
|
|
2019-08-22 13:20:41 +02:00
|
|
|
tap.test('should wait for 5 seconds', async (tools) => {
|
2019-08-22 15:09:48 +02:00
|
|
|
await tools.delayFor(1000);
|
2019-08-22 13:20:41 +02:00
|
|
|
});
|
|
|
|
|
2019-08-21 23:41:06 +02:00
|
|
|
tap.test('should close the testproxy', async () => {
|
|
|
|
await testProxy.stop();
|
2019-08-20 18:42:52 +02:00
|
|
|
});
|
2019-08-20 17:50:17 +02:00
|
|
|
|
2019-08-20 18:42:52 +02:00
|
|
|
tap.start();
|