smartproxy/test/test.ts

23 lines
492 B
TypeScript
Raw Normal View History

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