|
| 1 | +import assert from "assert"; |
| 2 | +import Config from "../src/config"; |
| 3 | + |
| 4 | +describe("Boolean parameters", function () { |
| 5 | + describe("javascript", function () { |
| 6 | + it("Passing a boolean", function () { |
| 7 | + const config = new Config({ javascript: true }); |
| 8 | + assert.equal(config.javascript, true); |
| 9 | + }); |
| 10 | + it("Passing a string", function () { |
| 11 | + const config = new Config({ javascript: "true" }); |
| 12 | + assert.equal(config.javascript, true); |
| 13 | + }); |
| 14 | + }); |
| 15 | + |
| 16 | + describe("landscape", function () { |
| 17 | + it("Passing a boolean", function () { |
| 18 | + const config = new Config({ landscape: true }); |
| 19 | + assert.equal(config.landscape, true); |
| 20 | + }); |
| 21 | + it("Passing a string", function () { |
| 22 | + const config = new Config({ landscape: "true" }); |
| 23 | + assert.equal(config.landscape, true); |
| 24 | + }); |
| 25 | + }); |
| 26 | + |
| 27 | + describe("base64", function () { |
| 28 | + it("Passing a boolean", function () { |
| 29 | + const config = new Config({ base64: true }); |
| 30 | + assert.equal(config.base64, true); |
| 31 | + }); |
| 32 | + it("Passing a string", function () { |
| 33 | + const config = new Config({ base64: "true" }); |
| 34 | + assert.equal(config.base64, true); |
| 35 | + }); |
| 36 | + }); |
| 37 | +}); |
0 commit comments