Replies: 2 comments
-
Solve by adding server object to the mock_env and passing it as third argument in const MOCK_ENV = {
server: {
requestIP: () => {
return {
address: '127.0.0.1',
family: 'foo',
port: '123'
}
}
}
} Reference: #3460 |
Beta Was this translation helpful? Give feedback.
0 replies
-
No, the error is solved but to test by setting mock ip address to test |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, thank you for the amazing works.
I just wondering how can I set an IP Address in the
app.request()
in unit test usingbun:test
.Because I've got an error stating that:
My test is fairly simple one:
Beta Was this translation helpful? Give feedback.
All reactions