Add coverage for core utility behavior
This commit is contained in:
1 parent
ba741eb617
commit
65e810ec79
24 files changed
+1882
-22
No files matched your search
@@ -27,9 +27,7 @@ test('getIpAddress: Custom header', () => {
|
||||
test('getIpAddress: Custom header set to x-forwarded-for uses leftmost IP in chain', () => {
|
||||
process.env.CLIENT_IP_HEADER = 'x-forwarded-for';
|
||||
|
||||
expect(
|
||||
getIpAddress(new Headers({ 'x-forwarded-for': `${IP}, 10.0.0.1, 10.0.0.2` })),
|
||||
).toEqual(IP);
|
||||
expect(getIpAddress(new Headers({ 'x-forwarded-for': `${IP}, 10.0.0.1, 10.0.0.2` }))).toEqual(IP);
|
||||
});
|
||||
|
||||
test('getIpAddress: CloudFlare header', () => {
|
||||
|
||||
Reference in new issue
Block a user