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

Commit 600d8830 by Sascha Depold

Merge branch 'mocha' of github.com:sequelize/sequelize into mocha

2 parents da24f8f3 840d4f87
test:
@mocha -c $(find ./test -name "*.test.js")
@./node_modules/mocha/bin/mocha -c $(find ./test -name "*.test.js")
.PHONY: test
......@@ -2,6 +2,8 @@ var fs = require('fs')
, Sequelize = require(__dirname + "/../index")
, DataTypes = require(__dirname + "/../lib/data-types")
, config = require(__dirname + "/config/config")
, chai = require('chai')
, expect = chai.expect
module.exports = {
Sequelize: Sequelize,
......@@ -79,6 +81,14 @@ module.exports = {
})
},
checkMatchForDialects: function(dialect, value, expectations) {
if (!!expectations[dialect]) {
expect(value).to.match(expectations[dialect])
} else {
throw new Error('Undefined expectation for "' + dialect + '"!')
}
},
getTestDialect: function() {
var envDialect = process.env.DIALECT || 'mysql'
......
var Support = require(__dirname + '/support')
, dialect = Support.getTestDialect()
var sequelize = Support.createSequelizeInstance({ dialect: dialect })
before(function(done) {
var sequelize = Support.createSequelizeInstance({ dialect: dialect })
this.sequelize = sequelize
done()
})
beforeEach(function(done) {
afterEach(function(done) {
Support.clearDatabase(this.sequelize, done)
})
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!