webrequest/test/test.browser.ts

17 lines
383 B
TypeScript
Raw Permalink 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
2020-10-09 10:14:45 +00:00
tap.test('first test', 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()
.request(['https://lossless.com'], {
method: 'GET',
})
.catch((e) => {
done.resolve();
});
2020-07-08 02:15:14 +00:00
await done.promise;
});
tap.start();