fix(core): initial

This commit is contained in:
2020-02-07 20:00:01 +00:00
parent 029daf272f
commit 9abd746384
9 changed files with 136 additions and 33 deletions

View File

@ -1,8 +1,33 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartvhost from '../ts/index';
import { SmartVHost } from '../ts/index';
tap.test('first test', async () => {
console.log(smartvhost.standardExport);
import * as path from 'path';
let testSmartVHost: smartvhost.SmartVHost;
tap.test('should create a valid instance of smartvhost', async () => {
testSmartVHost = new smartvhost.SmartVHost();
expect(testSmartVHost).to.be.instanceOf(smartvhost.SmartVHost);
});
tap.test('should start smartvhost', async () => {
await testSmartVHost.start();
});
tap.test('should accept a config array', async () => {
testSmartVHost.setVHostConfigs([{
hostName: 'example.com',
privateKey: '',
publicKey: '',
type: 'folder',
target: path.join(__dirname, 'testservedir')
}]);
});
tap.test('should stop smartvhost', async () => {
await testSmartVHost.stop();
});
tap.start();

View File

@ -0,0 +1 @@
# Hello