fix(core): update

This commit is contained in:
2023-07-09 17:24:52 +02:00
parent 4a57f7070a
commit 14bda0bfa3
4 changed files with 101 additions and 263 deletions

View File

@ -2,12 +2,12 @@ import { expect, tap } from '@pushrocks/tapbundle';
import * as webrequest from '../ts/index.js';
// test dependencies
import * as smartexpress from '@pushrocks/smartexpress';
import * as typedserver from '@apiglobal/typedserver';
let testServer: smartexpress.Server;
let testServer: typedserver.servertools.Server;
tap.test('setup test server', async () => {
testServer = new smartexpress.Server({
testServer = new typedserver.servertools.Server({
cors: false,
forceSsl: false,
port: 2345,
@ -15,7 +15,7 @@ tap.test('setup test server', async () => {
testServer.addRoute(
'/apiroute1',
new smartexpress.Handler('GET', (req, res) => {
new typedserver.servertools.Handler('GET', (req, res) => {
res.status(429);
res.end();
})
@ -23,7 +23,7 @@ tap.test('setup test server', async () => {
testServer.addRoute(
'/apiroute2',
new smartexpress.Handler('GET', (req, res) => {
new typedserver.servertools.Handler('GET', (req, res) => {
res.status(500);
res.end();
})
@ -31,7 +31,7 @@ tap.test('setup test server', async () => {
testServer.addRoute(
'/apiroute3',
new smartexpress.Handler('GET', (req, res) => {
new typedserver.servertools.Handler('GET', (req, res) => {
res.status(200);
res.send({
hithere: 'hi',