fix(core): update

This commit is contained in:
2019-05-28 23:27:55 +02:00
parent b8a7f02b97
commit cfcba1aa01
15 changed files with 2116 additions and 3060 deletions

View File

@ -1,29 +1,32 @@
import { tap, expect } from 'tapbundle'
import * as smartdelay from 'smartdelay'
import { tap, expect } from 'tapbundle';
import * as smartdelay from 'smartdelay';
import * as smartbrowser from '../dist/index'
let testSmartBrowser: smartbrowser.Smartbrowser
import * as smartbrowser from '../dist/index';
let testSmartBrowser: smartbrowser.Smartbrowser;
tap.test('should instanstiate a new browser ', async () => {
testSmartBrowser = new smartbrowser.Smartbrowser({
webroot: './test/assets/',
watchFiles: [ './test/assets/' ]
tap
.test('should instanstiate a new browser ', async () => {
testSmartBrowser = new smartbrowser.Smartbrowser({
webroot: './test/assets/',
watchFiles: ['./test/assets/']
});
return expect(testSmartBrowser).to.be.instanceof(smartbrowser.Smartbrowser);
})
return expect(testSmartBrowser).to.be.instanceof(smartbrowser.Smartbrowser)
}).catch(tap.threw)
.catch(tap.threw);
tap.test('should start the browser ', async () => {
return await expect(testSmartBrowser.start()).to.eventually.be.fulfilled
}).catch(tap.threw)
tap
.test('should start the browser ', async () => {
return await expect(testSmartBrowser.start()).to.eventually.be.fulfilled;
})
.catch(tap.threw);
tap.test('should stop the browser ', async () => {
return await smartdelay.delayFor(2000).then(() => {
return expect(testSmartBrowser.stop()).to.eventually.be.fulfilled
})
})
return expect(testSmartBrowser.stop()).to.eventually.be.fulfilled;
});
});
tap.test('should exit correctly', async () => {
smartdelay.delayFor(2000).then(() => {
process.exit(0)
})
})
process.exit(0);
});
});