fix(core): update
This commit is contained in:
13
test/test.ts
13
test/test.ts
@ -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-----
|
||||
|
Reference in New Issue
Block a user