@geoblink/pg-spice
Version:
Monkey patch providing sugar and spice atop the node.js PostgreSQL client library
16 lines (12 loc) • 430 B
JavaScript
module.exports = function(options) {
// Delete from cache as the monkey patch will not apply itself twice:
delete require.cache[require.resolve('pg')]
delete require.cache[require.resolve('../../index.js')]
// Require pg and pg-spice:
var pg = require('pg');
var spice = require('../../index.js');
// Patch with the specified options:
spice.patch(pg, options);
// Run the tests:
require('./parse-tests')(spice);
}