webrequest/test/test.ts

29 lines
587 B
TypeScript
Raw Normal View History

2018-11-30 16:12:48 +00:00
import { expect, tap } from '@pushrocks/tapbundle';
2018-12-03 17:35:30 +00:00
import * as webrequest from '../ts/index';
2018-11-30 16:12:48 +00:00
2018-12-03 17:35:30 +00:00
// test dependencies
import * as smartexpress from '@pushrocks/smartexpress';
let testServer: smartexpress.Server;
tap.test('setup test server', async () => {
testServer = new smartexpress.Server({
cors: false,
forceSsl: false,
port: 1234
});
testServer.addRoute('/apiroute1', new smartexpress.Handler("GET", (req, res) => {
res.status(429);
res.end();
}));
testServer
})
tap.test('first test', async (tools) => {
console.log(webrequest)
2018-11-30 16:12:48 +00:00
})
tap.start()