mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
* 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
22 lines
549 B
JavaScript
22 lines
549 B
JavaScript
'use strict'
|
|
var assert = require('assert')
|
|
var Client = require('../../lib/client')
|
|
var NativeClient = require('../../lib/native')
|
|
|
|
var client = new Client()
|
|
var nativeClient = new NativeClient()
|
|
|
|
client.connect()
|
|
nativeClient.connect((err) => {
|
|
client.query('SELECT alsdkfj', (err) => {
|
|
client.end()
|
|
|
|
nativeClient.query('SELECT lkdasjfasd', (nativeErr) => {
|
|
for (var key in nativeErr) {
|
|
assert.equal(err[key], nativeErr[key], `Expected err.${key} to equal nativeErr.${key}`)
|
|
}
|
|
nativeClient.end()
|
|
})
|
|
})
|
|
})
|