mirror of
https://github.com/knex/knex.git
synced 2025-10-04 20:46:04 +00:00
29 lines
587 B
JavaScript
29 lines
587 B
JavaScript
'use strict';
|
|
|
|
var test = require('tape')
|
|
var Client = require('../../lib/dialects/sqlite3');
|
|
var Pool2 = require('pool2')
|
|
|
|
test('#822, pool config, max: 0 should skip pool construction', function(t) {
|
|
|
|
var client = new Client({connection: {filename: ':memory:'}, pool: {max: 0}})
|
|
|
|
t.equal(client.pool, undefined)
|
|
|
|
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()
|
|
|
|
}) |