consolidate naming and start exporting interfaces
This commit is contained in:
18
test/test.js
18
test/test.js
@ -12,17 +12,17 @@ describe("smartnginx", function () {
|
||||
let testNginxZone02;
|
||||
describe("NginxZone", function () {
|
||||
it(`"new NginxZone()" should produce an instance of NginxConfig`, function () {
|
||||
testNginxZone01 = new smartnginx.NginxZone({
|
||||
zoneName: "test100.bleu.de",
|
||||
type: smartnginx.zoneTypes.reverseProxy,
|
||||
testNginxZone01 = new smartnginx.NginxHost({
|
||||
hostName: "test100.bleu.de",
|
||||
type: smartnginx.hostTypes.reverseProxy,
|
||||
destination: "192.192.192.191"
|
||||
});
|
||||
testNginxZone02 = new smartnginx.NginxZone({
|
||||
zoneName: "test102.bleu.de",
|
||||
type: smartnginx.zoneTypes.reverseProxy,
|
||||
testNginxZone02 = new smartnginx.NginxHost({
|
||||
hostName: "test102.bleu.de",
|
||||
type: smartnginx.hostTypes.reverseProxy,
|
||||
destination: "192.192.192.192"
|
||||
});
|
||||
testNginxZone01.should.be.instanceof(smartnginx.NginxZone);
|
||||
testNginxZone01.should.be.instanceof(smartnginx.NginxHost);
|
||||
console.log(testNginxZone01.configString);
|
||||
});
|
||||
});
|
||||
@ -38,8 +38,8 @@ describe("smartnginx", function () {
|
||||
});
|
||||
describe(".addZone()", function () {
|
||||
it("should add a zone to NginxConfig Object", function () {
|
||||
testNginxConfig.addZone(testNginxZone01);
|
||||
testNginxConfig.addZone(testNginxZone02);
|
||||
testNginxConfig.addHost(testNginxZone01);
|
||||
testNginxConfig.addHost(testNginxZone02);
|
||||
});
|
||||
});
|
||||
describe(".deploy()", function () {
|
||||
|
22
test/test.ts
22
test/test.ts
@ -8,21 +8,21 @@ import * as smartnginx from "../dist/index";
|
||||
let testQenv = new Qenv(process.cwd(),path.join(process.cwd(),".nogit"));
|
||||
describe("smartnginx",function(){
|
||||
let testNginxConfig:smartnginx.NginxConfig;
|
||||
let testNginxZone01:smartnginx.NginxZone;
|
||||
let testNginxZone02:smartnginx.NginxZone;
|
||||
let testNginxZone01:smartnginx.NginxHost;
|
||||
let testNginxZone02:smartnginx.NginxHost;
|
||||
describe("NginxZone",function(){
|
||||
it(`"new NginxZone()" should produce an instance of NginxConfig`,function(){
|
||||
testNginxZone01 = new smartnginx.NginxZone({
|
||||
zoneName:"test100.bleu.de",
|
||||
type:smartnginx.zoneTypes.reverseProxy,
|
||||
testNginxZone01 = new smartnginx.NginxHost({
|
||||
hostName:"test100.bleu.de",
|
||||
type:smartnginx.hostTypes.reverseProxy,
|
||||
destination:"192.192.192.191"
|
||||
});
|
||||
testNginxZone02 = new smartnginx.NginxZone({
|
||||
zoneName:"test102.bleu.de",
|
||||
type:smartnginx.zoneTypes.reverseProxy,
|
||||
testNginxZone02 = new smartnginx.NginxHost({
|
||||
hostName:"test102.bleu.de",
|
||||
type:smartnginx.hostTypes.reverseProxy,
|
||||
destination:"192.192.192.192"
|
||||
});
|
||||
testNginxZone01.should.be.instanceof(smartnginx.NginxZone);
|
||||
testNginxZone01.should.be.instanceof(smartnginx.NginxHost);
|
||||
console.log(testNginxZone01.configString);
|
||||
});
|
||||
});
|
||||
@ -38,8 +38,8 @@ describe("smartnginx",function(){
|
||||
});
|
||||
describe(".addZone()",function(){
|
||||
it("should add a zone to NginxConfig Object",function(){
|
||||
testNginxConfig.addZone(testNginxZone01);
|
||||
testNginxConfig.addZone(testNginxZone02);
|
||||
testNginxConfig.addHost(testNginxZone01);
|
||||
testNginxConfig.addHost(testNginxZone02);
|
||||
})
|
||||
});
|
||||
describe(".deploy()",function(){
|
||||
|
Reference in New Issue
Block a user