fix(core): update

This commit is contained in:
2023-06-10 13:46:58 +02:00
parent 340a5c3fb7
commit 9552cb9de6
17 changed files with 4719 additions and 8429 deletions

26
test/test.both.ts Normal file
View File

@@ -0,0 +1,26 @@
import { tap, expect } from '@pushrocks/tapbundle';
import * as webdetector from '../ts/index';
let testWebDetector: webdetector.WebDetector;
tap.test('first test', async () => {
const testWebDetector = new webdetector.WebDetector({
checkOnlineUrl: 'https://pubapi.lossless.one',
});
expect(testWebDetector).toBeInstanceOf(webdetector.WebDetector);
});
tap.test('should be online', async () => {
const onlineResultBoolean = await testWebDetector.isOnline();
console.log('browser is online:');
console.log(onlineResultBoolean);
testWebDetector.startPeriodicChecks();
testWebDetector.onlineObservable.subscribe((state) => {
console.log(state);
});
});
console.log('hi');
tap.start();