2021-08-04 22:23:57 +02:00
|
|
|
import assert from 'assert';
|
2024-11-11 18:29:45 -04:00
|
|
|
import { isGroundControlUriValid } from '../../blue_modules/notifications';
|
2021-08-04 22:23:57 +02:00
|
|
|
|
2022-06-03 17:54:05 +01:00
|
|
|
// Notifications.default = new Notifications();
|
2021-08-04 22:23:57 +02:00
|
|
|
|
2020-07-31 14:43:55 +01:00
|
|
|
describe('notifications', () => {
|
2022-03-31 12:17:43 +01:00
|
|
|
// yeah, lets rely less on external services...
|
2023-07-25 14:50:04 +01:00
|
|
|
// eslint-disable-next-line jest/no-disabled-tests
|
2022-03-31 12:17:43 +01:00
|
|
|
it.skip('can check groundcontrol server uri validity', async () => {
|
2024-11-11 18:29:45 -04:00
|
|
|
assert.ok(await isGroundControlUriValid('https://groundcontrol-bluewallet.herokuapp.com'));
|
|
|
|
assert.ok(!(await isGroundControlUriValid('https://www.google.com')));
|
2021-03-26 12:54:19 +00:00
|
|
|
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
|
|
});
|
|
|
|
|
|
|
|
// muted because it causes jest to hang waiting indefinitely
|
2023-07-25 14:50:04 +01:00
|
|
|
// eslint-disable-next-line jest/no-disabled-tests
|
2021-03-26 12:54:19 +00:00
|
|
|
it.skip('can check non-responding url', async () => {
|
2024-11-11 18:29:45 -04:00
|
|
|
assert.ok(!(await isGroundControlUriValid('https://localhost.com')));
|
2020-07-31 14:43:55 +01:00
|
|
|
});
|
|
|
|
});
|