mysql2-promise
Version:
Small promises wrapper for mysql2.
17 lines (16 loc) • 589 B
JavaScript
var db = require('../');
require('should');
describe('mysql2-promise', function () {
it('should return correct instance', function () {
var defaultDb = db();
var namedDb = db('foo');
namedDb.should.equal(db('foo'));
namedDb.should.have.property('query').which.is.a.Function;
namedDb.should.have.property('execute').which.is.a.Function;
defaultDb.should.equal(db());
defaultDb.should.not.equal(namedDb);
defaultDb.should.have.property('query').which.is.a.Function;
defaultDb.should.have.property('execute').which.is.a.Function;
});
});
;