fix(core): update

This commit is contained in:
2022-07-29 00:49:46 +02:00
parent ca73849541
commit 101470dcd4
12 changed files with 11832 additions and 8967 deletions

View File

@ -1,10 +1,13 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartproxy from '../ts/index';
import * as smartproxy from '../ts/index.js';
let testProxy: smartproxy.SmartProxy;
let testProxy: smartproxy.NetworkProxy;
tap.test('first test', async () => {
testProxy = new smartproxy.SmartProxy({});
testProxy = new smartproxy.NetworkProxy({
port: 3001
});
expect(testProxy).toBeInstanceOf(smartproxy.NetworkProxy);
});
tap.test('should start the testproxy', async () => {
@ -12,9 +15,9 @@ tap.test('should start the testproxy', async () => {
});
tap.test('should supply reverse proxy config', async () => {
testProxy.updateReverseConfigs([
testProxy.updateProxyConfigs([
{
destinationIp: 'localhost',
destinationIp: '127.0.0.1',
destinationPort: '3000',
hostName: 'push.rocks',
privateKey: `-----BEGIN PRIVATE KEY-----