UNPKG

datapumps

Version:

Node.js ETL (Extract, Transform, Load) toolkit for easy data import, export or transfer between systems.

29 lines (23 loc) 731 B
(function() { var MysqlMixin, sinon; require('should'); sinon = require('sinon'); MysqlMixin = require('../MysqlMixin'); describe('MysqlMixin(connection)', function() { it('should store connection in target object', function() { var connection, mixin, target; target = {}; connection = { query: function() {} }; mixin = MysqlMixin(connection); mixin(target); return target._mysql.connection.should.equal = connection; }); return it('should throw error when connection is not given', function() { return (function() { return MysqlMixin(); }).should["throw"]('Mysql mixin requires connection to be given'); }); }); }).call(this);