update ci

This commit is contained in:
2018-03-01 00:08:08 +01:00
parent 9e06369139
commit cb6c8f3c8e
19 changed files with 1017 additions and 670 deletions

View File

@ -1,5 +1,5 @@
import { tap, expect } from 'tapbundle'
import * as smartchok from '../dist/index'
import * as smartchok from '../ts/index'
import * as smartfile from 'smartfile'
import * as smartq from 'smartq'
import * as rx from 'rxjs/Rx'
@ -11,23 +11,23 @@ let testAddObservable: rx.Observable<any>
let testSubscription: rx.Subscription
tap.test('should create a new instance', async () => {
testSmartchok = new smartchok.Smartchok([])
return expect(testSmartchok).to.be.instanceof(smartchok.Smartchok)
}).catch(tap.threw)
expect(testSmartchok).to.be.instanceof(smartchok.Smartchok)
})
tap.test('should add some files to watch and start', async () => {
testSmartchok.add([ './test/assets/**/*.txt' ])
let localPromise = testSmartchok.start().then(async () => {
testSmartchok.add([ './test/assets/**/*.md' ])
})
return await expect(localPromise).to.eventually.be.fulfilled
}).catch(tap.threw)
await expect(localPromise).to.eventually.be.fulfilled
})
tap.test('should get an observable for a certain event', async () => {
let localPromise = testSmartchok.getObservableFor('add').then(async (observableArg) => {
testAddObservable = observableArg
})
return await expect(localPromise).to.eventually.be.fulfilled
}).catch(tap.threw)
await expect(localPromise).to.eventually.be.fulfilled
})
tap.test('should register an add operation', async () => {
let testDeferred = smartq.defer()
@ -35,11 +35,11 @@ tap.test('should register an add operation', async () => {
testDeferred.resolve()
})
smartfile.memory.toFs('HI', './test/assets/hi.txt')
return await expect(testDeferred.promise).to.eventually.be.fulfilled
}).catch(tap.threw)
await expect(testDeferred.promise).to.eventually.be.fulfilled
})
tap.test('should stop the watch process', async () => {
testSmartchok.stop()
}).catch(tap.threw)
})
tap.start()