不要怂,就是干,撸起袖子干!

Commit a6c19754 by Matt Broadstone

add dialect support checking to tests

this allows us to test for dialect features in tests, see
test/transaction.test.js for an example of checking for row locking
support before running a test
1 parent 5f0c5054
Showing with 5 additions and 4 deletions
......@@ -187,7 +187,8 @@ var Support = {
}
};
var sequelize = Support.createSequelizeInstance();
var sequelize = Support.sequelize = Support.createSequelizeInstance();
//
// For Postgres' HSTORE functionality and to properly execute it's commands we'll need this...
before(function() {
......
......@@ -4,8 +4,8 @@ var chai = require('chai')
, dialect = Support.getTestDialect()
, Promise = require(__dirname + '/../lib/promise')
, Transaction = require(__dirname + '/../lib/transaction')
, sinon = require('sinon');
, sinon = require('sinon')
, current = Support.sequelize;
describe(Support.getTestDialectTeaser("Transaction"), function () {
this.timeout(4000);
......@@ -55,7 +55,7 @@ describe(Support.getTestDialectTeaser("Transaction"), function () {
});
});
if (dialect !== 'sqlite') {
if (current.dialect.supports.lock) {
describe('row locking', function () {
this.timeout(10000);
it('supports for update', function (done) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!