knex/test/unit/common.js

62 lines
1.1 KiB
JavaScript
Raw Normal View History

var Common = require('../../lib/common').Common;
2013-09-05 16:36:49 -04:00
var CommonStub = function(knex) {
this.knex = knex;
this.client = client;
this.grammar = client.grammar;
};
CommonStub.prototype = Common;
2013-09-05 16:36:49 -04:00
describe('Common', function () {
2013-09-05 16:36:49 -04:00
var common;
2013-09-05 16:36:49 -04:00
beforeEach(function() {
common = new CommonStub();
});
2013-09-05 16:36:49 -04:00
describe('debug', function () {
2013-09-05 16:36:49 -04:00
it('should set the flag for the isDebugging property of the object');
2013-09-05 16:36:49 -04:00
});
2013-09-05 16:36:49 -04:00
describe('exec', function() {
2013-09-05 16:36:49 -04:00
it('should accept a callback, which provides an err / success');
2013-09-05 16:36:49 -04:00
it('should rethrow any error in the handler');
2013-09-05 16:36:49 -04:00
});
2013-09-05 16:36:49 -04:00
describe('then', function() {
2013-09-05 16:36:49 -04:00
it('should accept two functions, which are passed along to the promise handler');
2013-09-05 16:36:49 -04:00
});
2013-09-05 16:36:49 -04:00
describe('tap', function () {
2013-09-05 16:36:49 -04:00
it('is essentially a passthrough to the `tap` method of when.js');
2013-09-05 16:36:49 -04:00
});
2013-09-05 16:36:49 -04:00
describe('toString', function() {
2013-09-05 16:36:49 -04:00
it('turns the current query into a string value, based on the current client');
2013-09-05 16:36:49 -04:00
});
2013-09-05 16:36:49 -04:00
describe('connection', function() {
2013-09-05 16:36:49 -04:00
it('should set the usingConnection property of the current object');
2013-09-05 16:36:49 -04:00
});
2013-09-05 16:36:49 -04:00
describe('transacting', function () {
2013-09-05 16:36:49 -04:00
it('should set the transaction object');
2013-09-05 16:36:49 -04:00
});
});