fix(core): update
This commit is contained in:
43
test/test.ts
43
test/test.ts
@ -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);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user