split into class files

This commit is contained in:
2016-09-11 18:01:46 +02:00
parent 50b5f84955
commit 295096de24
11 changed files with 151 additions and 86 deletions

View File

@@ -6,6 +6,7 @@ import * as smartdata from '../dist/index'
let mongoChildProcess
let testDbConnection: smartdata.DbConnection
let testDbCollection: smartdata.DbCollection<any>
describe('mongodb',function(){
@@ -21,7 +22,7 @@ describe('smartdata',function(){
testDbConnection.connect().then(() => { done() })
})
it('should create a collection',function(){
testDbCollection = new smartdata.DbCollection('something',testDbConnection)
})
it('should close the db Connection',function(){
testDbConnection.close()
@@ -30,6 +31,7 @@ describe('smartdata',function(){
describe('mongodb',function(){
it('should kill mongodb',function(){
this.timeout(10000)
shelljs.exec('mongod --dbpath=./test/data --shutdown')
mongoChildProcess.kill('SIGTERM')
})