mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
* feat: Add dynamic retrieval for client password Adds option to specify a function for a client password. When the client is connected, if the value of password is a function then it is invoked to get the password to use for that connection. The function must return either a string or a Promise that resolves to a string. If the function throws or rejects with an error then it will be bubbled up to the client. * test: Add testAsync() helper to Suite Add testAsync() helper function to Suite to simplify running tests that return a Promise. The test action is executed and if a syncronous error is thrown then it is immediately considered failed. If the Promise resolves successfully then the test is considered successful. If the Promise rejects with an Error then the test is considered failed. * test: Add tests for dynamic password * test: Simplify testAsync error handling * fix: Clean up dynamic password error handling and misc style * test: Remove extra semicolons * test: Change testAsync(...) calls to use arrow functions * fix: Wrap self.password() invocation in an arrow function * test: Add a comment to testAsync(...)