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

Commit d51d6736 by Daniel Durante

Improved the Makefile a little bit more, you can now specify the reporter, also …

…removed support.test.js in favor of just including support.js in all of the tests.
1 parent 59cbf6ae
Showing with 20 additions and 17 deletions
REPORTER ?= dot
test: test:
@./node_modules/mocha/bin/mocha -c $(shell find ./test/* -name "*.test.js") @./node_modules/mocha/bin/mocha \
--colors \
--reporter $(REPORTER) \
$(shell find ./test/* -name "*.test.js")
.PHONY: test .PHONY: test
...@@ -2,10 +2,8 @@ var fs = require('fs') ...@@ -2,10 +2,8 @@ var fs = require('fs')
, Sequelize = require(__dirname + "/../index") , Sequelize = require(__dirname + "/../index")
, DataTypes = require(__dirname + "/../lib/data-types") , DataTypes = require(__dirname + "/../lib/data-types")
, config = require(__dirname + "/config/config") , config = require(__dirname + "/config/config")
, chai = require('chai')
, expect = chai.expect
module.exports = { var Support = {
Sequelize: Sequelize, Sequelize: Sequelize,
initTests: function(options) { initTests: function(options) {
...@@ -113,3 +111,16 @@ module.exports = { ...@@ -113,3 +111,16 @@ module.exports = {
return "[" + dialect.toUpperCase() + "] " + moduleName return "[" + dialect.toUpperCase() + "] " + moduleName
} }
} }
var sequelize = Support.createSequelizeInstance({ dialect: Support.getTestDialect() })
before(function(done) {
this.sequelize = sequelize
done()
})
afterEach(function(done) {
Support.clearDatabase(this.sequelize, done)
})
module.exports = Support
var Support = require(__dirname + '/support')
, dialect = Support.getTestDialect()
var sequelize = Support.createSequelizeInstance({ dialect: dialect })
before(function(done) {
this.sequelize = sequelize
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!