-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continue support for creating a pg.Pool from another instance’s optio…
…ns (#2076) * Add failing test for creating a `BoundPool` from another instance’s settings * Continue support for creating a pg.Pool from another instance’s options by dropping the requirement for the `password` property to be enumerable.
- Loading branch information
1 parent
224703f
commit 05c7665
Showing
2 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/pg/test/unit/connection-pool/configuration-tests.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict' | ||
|
||
const assert = require('assert') | ||
const helper = require('../test-helper') | ||
|
||
test('pool with copied settings includes password', () => { | ||
const original = new helper.pg.Pool({ | ||
password: 'original', | ||
}) | ||
|
||
const copy = new helper.pg.Pool(original.options) | ||
|
||
assert.equal(copy.options.password, 'original') | ||
}) |