-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Lambda
-
Empty show more show less
-
Not Needed
What problem are you facing?
After updating to latest version, our test suite stopped working:
FAIL lambda-entity libs/lambda-entity/__tests__/entity/entity.spec.ts ● Test suite failed to run ReferenceError: TextEncoder is not defined > 1 | import { Db, MongoClient as NativeMongoClient } from 'mongodb'; | ^ 2 | import { Service } from 'typedi'; 3 | 4 | import { getEnvString } from '../setting'; at Object.<anonymous> (../../node_modules/mongodb-connection-string-url/node_modules/whatwg-url/dist/encoding.js:2:21) at Object.<anonymous> (../../node_modules/mongodb-connection-string-url/node_modules/whatwg-url/dist/url-state-machine.js:5:34) at Object.<anonymous> (../../node_modules/mongodb-connection-string-url/node_modules/whatwg-url/dist/URL-impl.js:2:13) at Object.<anonymous> (../../node_modules/mongodb-connection-string-url/node_modules/whatwg-url/dist/URL.js:417:14) at Object.<anonymous> (../../node_modules/mongodb-connection-string-url/node_modules/whatwg-url/webidl2js-wrapper.js:3:13) at Object.<anonymous> (../../node_modules/mongodb-connection-string-url/node_modules/whatwg-url/index.js:3:34) at Object.<anonymous> (../../node_modules/mongodb-connection-string-url/src/index.ts:1:1) at Object.<anonymous> (../../node_modules/mongodb/src/connection_string.ts:3:1) at Object.<anonymous> (../../node_modules/mongodb/src/sdam/topology.ts:59:1) at Object.<anonymous> (../../node_modules/mongodb/src/operations/connect.ts:2:1) at Object.<anonymous> (../../node_modules/mongodb/src/mongo_client.ts:20:1) at Object.<anonymous> (../../node_modules/mongodb/src/index.ts:8:1) at Object.<anonymous> (../lambda-common/src/mongo/mongo.client.ts:1:1) at Object.<anonymous> (src/manager/mongo-entity-manager.ts:1:1) at Object.<anonymous> (src/index.ts:11:1) at Object.<anonymous> (__tests__/entity/entity.spec.ts:1:1)
What driver and relevant dependency versions are you using?
v4.1.1
Steps to reproduce?
Just by using the driver in node/jest it seems
- is related to
-
NODE-4203 Optionally import whatwg-url if global URL has buggy behavior
- Backlog
- links to