detector/test/test.ts

17 lines
446 B
TypeScript
Raw Normal View History

2021-04-12 19:00:08 +00:00
import { expect, tap } from '@pushrocks/tapbundle';
import * as detector from '../ts/index';
2021-04-13 08:30:33 +00:00
let testDetector: detector.Detector;
2021-04-12 19:00:08 +00:00
tap.test('first test', async () => {
2021-04-13 08:30:33 +00:00
testDetector = new detector.Detector();
expect(testDetector).to.be.instanceOf(detector.Detector);
});
tap.test('should detect an open port', async () => {
const result = await testDetector.isActive('https://lossless.com');
expect(result).to.be.true;
2021-04-12 19:00:08 +00:00
});
tap.start();