Skip to content
Snippets Groups Projects
index.test.js 589 B
Newer Older
  • Learn to ignore specific revisions
  • Hossam Fares's avatar
    Hossam Fares committed
    'use strict';
    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;
      });
    });