knex/test/tape/pool.js

29 lines
587 B
JavaScript
Raw Normal View History

'use strict';
var test = require('tape')
2015-05-14 00:43:04 -04:00
var Client = require('../../lib/dialects/sqlite3');
var Pool2 = require('pool2')
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}})
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()
})