webrequest/test/test.browser.ts

17 lines
418 B
TypeScript
Raw Normal View History

2020-07-08 02:15:14 +00:00
import { expect, tap } from '@pushrocks/tapbundle';
2022-03-16 15:23:32 +00:00
import * as webrequest from '../ts/index.js';
2020-07-08 02:15:14 +00:00
2022-05-29 18:22:42 +00:00
tap.test('should run multiendpoint request', async (tools) => {
2020-07-08 02:15:14 +00:00
const done = tools.defer();
2020-10-09 10:14:45 +00:00
const response = await new webrequest.WebRequest()
2022-05-29 18:22:42 +00:00
.requestMultiEndpoint(['https://lossless.com'], {
2020-10-09 10:14:45 +00:00
method: 'GET',
})
.catch((e) => {
done.resolve();
});
2020-07-08 02:15:14 +00:00
await done.promise;
});
tap.start();