forked from thaibault/reverse-proxy-middleware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.ts
executable file
·58 lines (52 loc) · 1.59 KB
/
test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// #!/usr/bin/env babel-node
// -*- coding: utf-8 -*-
'use strict'
/* !
region header
Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
License
-------
This library written by Torben Sickert stand under a creative commons
naming 3.0 unported license.
See https://creativecommons.org/licenses/by/3.0/deed.de
endregion
*/
// region imports
import {describe} from '@jest/globals'
import {testEach} from 'clientnode/testHelper'
import {resolveForwarders} from './helper'
import packageConfiguration from './package.json'
// endregion
const {configuration: BASE_CONFIGURATION} = packageConfiguration
const positiveUseExpression = ():true => true
describe('helper', ():void => {
testEach<typeof resolveForwarders>(
'resolveForwarders',
resolveForwarders,
[{}, BASE_CONFIGURATION.forwarders],
[
{
test: {
headerTransformations: {
retrieve: [],
send: []
},
host: 'host',
name: 'test',
port: 443,
stateAPIs: [],
tls: true,
useExpression: positiveUseExpression
}
},
{
base: BASE_CONFIGURATION.forwarders.base,
test: {host: 'host', useExpression: positiveUseExpression}
}
]
)
})
// region vim modline
// vim: set tabstop=4 shiftwidth=4 expandtab:
// vim: foldmethod=marker foldmarker=region,endregion:
// endregion