brianc / node-postgres

PostgreSQL client for node.js.
https://node-postgres.com
MIT License
12.21k stars 1.22k forks source link

Remove test globals #3264

Closed brianc closed 3 months ago

brianc commented 3 months ago

Some of the older (very old) code in the test files was relying on global variables defined in other files. A bad decision from many years ago I have been meaning to rectify. Removed the global assert function (it is still monkey patched in ./test-helper but that's not as bad) and also removed the global test function, global instances of Client and the few places global MemoryStream was used. Now everything is imported/required within the file(s) its used.

cloudflare-workers-and-pages[bot] commented 3 months ago

Deploying node-postgres with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1b4e9b9
Status: ✅  Deploy successful!
Preview URL: https://5915b92c.node-postgres.pages.dev
Branch Preview URL: https://bmc-remove-test-globals.node-postgres.pages.dev

View logs