From b6f0c2cfc88f03a5cf923780afd18551b9443d62 Mon Sep 17 00:00:00 2001 From: Anatoliy Chakkaev Date: Mon, 8 Apr 2013 01:53:55 +0400 Subject: [PATCH] Split test cases --- Makefile | 2 +- test/init.js | 2 ++ test/mysql.test.js | 25 +++++-------------------- 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 1bbe15b..a457665 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ ## TESTS TESTER = ./node_modules/.bin/mocha -OPTS = --require ./test/init.js +OPTS = --growl TESTS = test/*.test.js test: diff --git a/test/init.js b/test/init.js index fc2cd47..41de0dc 100644 --- a/test/init.js +++ b/test/init.js @@ -1,3 +1,5 @@ +module.exports = require('should'); + var Schema = require('jugglingdb').Schema; global.getSchema = function() { diff --git a/test/mysql.test.js b/test/mysql.test.js index 780be48..63d7af7 100644 --- a/test/mysql.test.js +++ b/test/mysql.test.js @@ -1,23 +1,8 @@ -var db, Model, should = require('should'); +require('./init.js'); -require('jugglingdb/test/common.batch.js'); -require('jugglingdb/test/include.test.js'); +describe('mysql imported features', function() { -var Post, User; - -// test.it('hasMany should support additional conditions', function (test) { -// -// Post = schema.models.Post; -// User = schema.models.User; -// -// User.create(function (e, u) { -// u.posts.create({}, function (e, p) { -// u.posts({where: {id: p.id}}, function (e, posts) { -// test.equal(posts.length, 1, 'There should be only 1 post.'); -// test.done(); -// }); -// }); -// }); -// -// }); + require('jugglingdb/test/common.batch.js'); + require('jugglingdb/test/include.test.js'); +});