Sehrope Sarkuni
2dc5c6864b
Change network partition test to wait for client socket creation prior to destroy
2018-06-17 11:58:37 -04:00
Sehrope Sarkuni
860928e2d5
Change test to use Buffer.from(...)
2018-05-04 12:18:31 -05:00
Sehrope Sarkuni
272e9a5998
Change network partition test to use socket.destroy()
2018-05-04 12:18:31 -05:00
Charmander
9870c86fde
Make tests compatible with PostgreSQL 10
...
PostgreSQL 10 reports its version as only `major.minor`, so it can’t be parsed with semver. The `server_version_num` setting is a major version followed by a four-digit minor version since version 10, and was a three-digit major version followed by a two-digit minor version before that.
2017-11-17 14:16:03 -06:00
Charmander
0b80abacaf
Specify collation when relied on in tests
...
Fixes #189 .
2017-11-17 14:12:16 -06:00
Josh
64eb77e94c
new test for actual statement timeout
2017-09-03 14:14:28 -05:00
Josh
689bb25e86
fixes
2017-09-03 14:14:28 -05:00
Josh
ad36063ca5
support statement_timeout
2017-09-03 14:14:28 -05:00
Arnaud Benhamdine
4936033adf
Check more default properties in configuration teset
2017-09-03 14:01:34 -05:00
Arnaud Benhamdine
d6e7dfee83
Replace poolSize by max in configuration test
2017-09-03 14:01:34 -05:00
Sehrope Sarkuni
6e2c1e9b98
Removes extra 'use strict'
2017-08-15 13:00:15 -07:00
Brian M. Carlson
48543bfad0
Fix vulnerability
2017-08-12 16:34:22 -05:00
Brian M. Carlson
111e08d0d7
Cleanup
2017-07-16 16:25:35 -05:00
Brian M. Carlson
ac3102eea2
Add support for pg-native multi-row result
2017-07-16 16:25:35 -05:00
Brian M. Carlson
28b330c88e
Add JS driver support for multiple results
2017-07-16 16:25:35 -05:00
Brian C
8798e50ad3
Re-enable eslint with standard format ( #1367 )
...
* Work on converting lib to standard
* Finish updating lib
* Finish linting lib
* Format test files
* Add .eslintrc with standard format
* Supply full path to eslint bin
* Move lint command to package.json
* Add eslint as dev dependency
2017-07-15 12:05:58 -05:00
Brian M. Carlson
f7de9ce820
Non-array query values cause query to end with an error.
...
This is a small change and is _kinda_ backwards compatible since the old behavior was to throw an error, but if someone was relying on anything with `.map` working as values it would break them, so it's in a major semver bump.
2017-07-15 11:19:37 -05:00
Brian Carlson
27450d07e6
Throw on reconnect attempt
...
Clients are not reusable. This changes the client to raise errors whenever you try to reconnect a client that's already been used. They're cheap to create: just instantiate a new one (or use the pool) 😉 .
Closes #1352
2017-07-15 11:02:09 -05:00
Brian M. Carlson
a83655a396
Remove console.log statement
2017-06-18 17:23:58 -05:00
Brian M. Carlson
da71ea58f6
Add query validity check
...
Passing nothing for both the query.text and query.name is unsupported but previously crashed with an impossible to catch error.
2017-06-18 17:15:46 -05:00
Brian M. Carlson
bd87cddc72
Fix connection / disconnection issues
2017-06-18 16:48:14 -05:00
Brian M. Carlson
0f1f8626cf
Add use strict to every file
2017-06-18 16:48:14 -05:00
Brian M. Carlson
ed9a33d3d1
Fix test for older version of postgres
2017-06-18 16:48:14 -05:00
Brian M. Carlson
1bc1758579
Remove deprecated methods
2017-06-18 16:48:14 -05:00
Brian M. Carlson
313c41a39f
Cleanup
2017-06-18 16:48:14 -05:00
Brian Carlson
5f5e40f03c
Add tests to support deprecated event listeners
2017-06-16 21:43:45 -05:00
Brian M. Carlson
e100152fb0
Remove failing travis test
2017-06-15 10:32:38 -05:00
Brian M. Carlson
132861f43f
Test cleanup
2017-06-15 10:32:38 -05:00
Brian M. Carlson
f12eb0a6fd
Format more tests
2017-06-15 10:32:38 -05:00
Brian M. Carlson
d615ebee17
Start cleaning up tests
2017-06-15 10:32:38 -05:00
Brian M. Carlson
3074436236
Tidy up a bit of testing
2017-06-15 10:32:38 -05:00
Brian M. Carlson
2c3f55e5bd
Make all tests pass
2017-06-15 10:32:38 -05:00
Brian M. Carlson
c961c900d6
Almost all tests passing
2017-06-15 10:32:38 -05:00
Brian M. Carlson
3219db993a
All tests passing
2017-06-15 10:32:38 -05:00
Brian M. Carlson
f41839b83a
Work on test
2017-06-15 10:32:38 -05:00
Brian M. Carlson
3a7b226fe3
WIP
2017-06-15 10:32:38 -05:00
Brian M. Carlson
02bcc9d97a
Start working on promsie tests
2017-06-15 10:32:38 -05:00
Brian M. Carlson
d3ec938b82
Fix remainder of error tests
2017-06-15 10:32:38 -05:00
Brian M. Carlson
2add7e3407
Make almost all tests pass
2017-06-15 10:32:38 -05:00
Brian M. Carlson
b8c2bebcac
Fix more tests to use query instance
2017-06-15 10:32:38 -05:00
Brian M. Carlson
2f3d72a28c
Start fixing integration tests
2017-06-15 10:32:38 -05:00
Brian M. Carlson
a829eee334
Merge origin/master
2017-06-09 16:24:39 -05:00
Brian Carlson
76c59a01f2
Emit error when backend unexpectedly disconnects
2017-06-09 12:27:47 -05:00
Charmander
934ca3af16
Remove fallbacks for unsupported Node versions ( #1304 )
...
* Remove unsupported Node versions 0.10 and 0.12 from CI
* Replace deprecated Buffer constructor with .from/.alloc
* Remove Promise polyfill
* Make use of Object.assign
* Remove checks for versions of Node earlier than 4
* Remove Buffer#indexOf fallback for Node 0.10
2017-06-07 22:45:32 -05:00
Charmander
5b6d883723
Remove broken tests with external dependency ( #1209 )
...
Yikes.
2017-02-12 22:23:09 -06:00
Alexander Mochalin
f6c40b9331
parse int8[] ( #1152 )
...
* parse int8[]
* missing semicolon
* test
* test fixed
* test fixed
* test fixed. again.
2016-12-16 09:44:19 -06:00
Brian Carlson
5feacd66d0
Remove redundant test
...
This functionality is already tested in the node-pg-types repo.
2016-12-10 18:17:09 -06:00
Charmander
5d821c3acb
Use more correct escaping for array elements ( #1177 )
...
It’s not JSON.
2016-12-10 17:28:48 -06:00
Brian C
a536afb1a8
Add callback to client#end ( #1106 )
...
A long standing bug was the pure JS client didn't accept or call a callback on `client.end`. This is inconsistent with both the documentation & general node patterns.
This fixes the issue & adds a test. The issue did not exist in the native version of the client.
2016-08-11 10:17:03 -05:00
Brian C
812277f99f
Fix native constructor and pool exports ( #1061 )
2016-06-24 00:52:28 -05:00