2015-05-13 15:20:01 -04:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var test = require('tape')
|
2015-05-14 00:43:04 -04:00
|
|
|
var Client = require('../../lib/dialects/sqlite3');
|
|
|
|
var Pool2 = require('pool2')
|
2015-05-13 15:20:01 -04:00
|
|
|
|
|
|
|
test('#822, pool config, max: 0 should skip pool construction', function(t) {
|
2015-05-14 00:43:04 -04:00
|
|
|
|
|
|
|
var client = new Client({connection: {filename: ':memory:'}, pool: {max: 0}})
|
2015-05-13 15:20:01 -04:00
|
|
|
|
|
|
|
t.equal(client.pool, undefined)
|
|
|
|
|
2015-05-14 00:43:04 -04:00
|
|
|
client.destroy()
|
|
|
|
|
|
|
|
t.end()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
test('#823, should not skip pool construction pool config is not defined', function(t) {
|
|
|
|
|
|
|
|
var client = new Client({connection: {filename: ':memory:'}})
|
|
|
|
|
|
|
|
t.ok(client.pool instanceof Pool2)
|
|
|
|
|
|
|
|
client.destroy()
|
|
|
|
|
|
|
|
t.end()
|
|
|
|
|
2015-05-13 15:20:01 -04:00
|
|
|
})
|