mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
Replaces __dirname concatentation in pg test scripts so that editors like VS Code can automatically generate typings and support code navigation (F12).
26 lines
516 B
JavaScript
26 lines
516 B
JavaScript
'use strict'
|
|
var ConnectionParameters = require('../lib/connection-parameters')
|
|
var config = new ConnectionParameters(process.argv[2])
|
|
|
|
for (var i = 0; i < process.argv.length; i++) {
|
|
switch (process.argv[i].toLowerCase()) {
|
|
case 'native':
|
|
config.native = true
|
|
break
|
|
case 'binary':
|
|
config.binary = true
|
|
break
|
|
case 'down':
|
|
config.down = true
|
|
break
|
|
default:
|
|
break
|
|
}
|
|
}
|
|
|
|
if (process.env['PG_TEST_NATIVE']) {
|
|
config.native = true
|
|
}
|
|
|
|
module.exports = config
|