fix(core): update

This commit is contained in:
2022-07-16 18:15:23 +02:00
parent 4d14526858
commit 830a46ab30
13 changed files with 8468 additions and 10171 deletions

View File

@ -1,21 +1,21 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as detector from '../ts/index';
import * as detector from '../ts/index.js';
let testDetector: detector.Detector;
tap.test('first test', async () => {
testDetector = new detector.Detector();
expect(testDetector).to.be.instanceOf(detector.Detector);
expect(testDetector).toBeInstanceOf(detector.Detector);
});
tap.test('should detect an closed port on a local domain', async () => {
const result = await testDetector.isActive('http://localhost:3008');
expect(result).to.be.false;
expect(result).toBeFalse();
});
tap.test('should detect an open port on a remote domain', async () => {
const result = await testDetector.isActive('https://lossless.com');
expect(result).to.be.true;
expect(result).toBeTrue();
});
tap.start();