-
Notifications
You must be signed in to change notification settings - Fork 615
Description
To Reproduce
Step by step instructions to reproduce the behavior:
- Clone this repo
npm install- Start local mongodb daemon
npx mocha test/i18n.js- See error
Expected behavior
All tests pass
Describe the bug
Test output:
17 passing (7s)
2 failing
redirection to first locale
should redirect to the first prefixed locale that matches the requested hostname:
FetchError: request to http://ca.localhost:37957/ failed, reason: getaddrinfo ENOTFOUND ca.localhost
at ClientRequest. (node_modules/node-fetch/lib/index.js:1501:11)
at ClientRequest.emit (node:events:517:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:517:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)no redirection to first locale
should not redirect to the first prefixed locale that matches the requested hostname when at least one locale has no prefix:
FetchError: request to http://ca.localhost:36819/ failed, reason: getaddrinfo ENOTFOUND ca.localhost
at ClientRequest. (node_modules/node-fetch/lib/index.js:1501:11)
at ClientRequest.emit (node:events:517:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:517:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Details
Version of Node.js:
v18.20.6
Server Operating System:
Ubuntu 24.04.1 LTS on Windows wsl v2
Additional Context:
Mongo v8.0.4