Manually require init

This commit is contained in:
Anatoliy Chakkaev 2013-04-06 14:57:12 +04:00
parent 2fd2157d28
commit 43f395d653
14 changed files with 40 additions and 23 deletions

View File

@ -1,7 +1,7 @@
## TESTS
TESTER = ./node_modules/.bin/mocha
OPTS = --require ./test/init.js --growl
OPTS = --growl
TESTS = test/*.test.js
test:

View File

@ -1,10 +0,0 @@
var jdb = require('../'),
Schema = jdb.Schema,
test = jdb.test;
var schema = new Schema('memory');
test(module.exports, schema);
test.skip('hasMany should be cached');

View File

@ -1,4 +1,6 @@
var db, User, should = require('should');
// This test written in mocha+should.js
var should = require('./init.js');
var db, User;
describe('basic-querying', function() {

View File

@ -1,7 +1,9 @@
var db, Model;
var should = require('should');
// This test written in mocha+should.js
var should = require('./init.js');
describe.only('datatypes', function() {
var db, Model;
describe('datatypes', function() {
before(function(done){
db = getSchema();

View File

@ -1,3 +1,6 @@
// This test written in mocha+should.js
var should = require('./init.js');
var db = getSchema();
describe('defaults', function() {

View File

@ -1,5 +1,7 @@
// This test written in mocha+should.js
var should = require('./init.js');
var j = require('../'),
should = require('should'),
Schema = j.Schema,
AbstractClass = j.AbstractClass,
Hookable = j.Hookable,

View File

@ -1,4 +1,7 @@
var db, User, Post, Passport, City, Street, Building, should = require('should');
// This test written in mocha+should.js
var should = require('./init.js');
var db, User, Post, Passport, City, Street, Building;
var nbSchemaRequests = 0;
describe('include', function() {

View File

@ -1,4 +1,4 @@
require('should');
module.exports = require('should');
if (!process.env.TRAVIS) {
if (typeof __cov === 'undefined') {

View File

@ -1,5 +1,7 @@
// This test written in mocha+should.js
var should = require('./init.js');
var Schema = require('../').Schema;
var should = require('should');
describe('JSON property', function() {
var schema, Model;

View File

@ -1,3 +1,6 @@
// This test written in mocha+should.js
var should = require('./init.js');
var jugglingdb = require('../');
describe('jugglingdb', function() {

View File

@ -1,4 +1,7 @@
var db, Person, should = require('should');
// This test written in mocha+should.js
var should = require('./init.js');
var db, Person;
describe('manipulation', function() {

View File

@ -1,4 +1,7 @@
var db, Book, Chapter, Author, Reader, should = require('should');
// This test written in mocha+should.js
var should = require('./init.js');
var db, Book, Chapter, Author, Reader;
describe('relations', function() {
before(function(done) {

View File

@ -1,5 +1,7 @@
// This test written in mocha+should.js
var should = require('./init.js');
var db = getSchema(), slave = getSchema(), Model, SlaveModel;
var should = require('should');
describe('schema', function() {

View File

@ -1,6 +1,8 @@
// This test written in mocha+should.js
var should = require('./init.js');
var j = require('../'), db, User;
var ValidationError = require('../lib/validations.js').ValidationError;
var should = require('should');
function getValidAttributes() {
return {