"use strict"; require("typings-test"); var path = require("path"); require("should"); var qenv_1 = require("qenv"); var smartnginx = require("../dist/index"); // setup environment var testQenv = new qenv_1.Qenv(process.cwd(), path.join(process.cwd(), ".nogit")); console.log(process.env.CF_EMAIL); console.log(process.env.CF_KEY); describe("smartnginx", function () { var testNginxConfig; var testNginxZone01; var 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, destination: "192.192.192.192" }); testNginxZone01.should.be.instanceof(smartnginx.NginxZone); console.log(testNginxZone01.configString); }); }); describe("NginxConfig", function () { it("\"new NginxConfig()\" should produce an instance of NginxConfig", function () { testNginxConfig = new smartnginx.NginxConfig({ cfEmail: process.env.CF_EMAIL, cfKey: process.env.CF_KEY, testMode: true }); testNginxConfig.should.be.instanceof(smartnginx.NginxConfig); }); describe(".addZone()", function () { it("should add a zone to NginxConfig Object", function () { testNginxConfig.addZone(testNginxZone01); }); }); describe(".deploy()", function () { this.timeout(240000); it("should deploy a config from an instance", function (done) { testNginxConfig.deploy() .then(function () { done(); }); }); }); }); }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFDdEIsSUFBTyxJQUFJLFdBQVcsTUFBTSxDQUFDLENBQUM7QUFDOUIsUUFBTyxRQUFRLENBQUMsQ0FBQTtBQUNoQixxQkFBbUIsTUFBTSxDQUFDLENBQUE7QUFDMUIsSUFBWSxVQUFVLFdBQU0sZUFBZSxDQUFDLENBQUE7QUFFNUMsb0JBQW9CO0FBQ3BCLElBQUksUUFBUSxHQUFHLElBQUksV0FBSSxDQUFDLE9BQU8sQ0FBQyxHQUFH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