UNPKG

node-ssl-certificates

Version:

a node.js library for fetching, parsing and validating ssl-certificates

24 lines (19 loc) 701 B
/* eslint-env mocha */ const chai = require("chai"); const expect = chai.expect; const chaiAsPromised = require("chai-as-promised"); const CONFIG = require("./config"); const helper = require("./helper"); // Load chai-as-promised support chai.use(chaiAsPromised); chai.should(); describe("print functions", () => { describe("print raw certificate", () => { it("should print the certificate's info", async () => { const certificates = require("../index"); const path = `${__dirname}/${CONFIG.PATHS.test_certificate}` const data = await certificates.print(path , { verbose: CONFIG.VERBOSE }); expect(helper.getHash(data)).to.equal(CONFIG.CERT_HASH4); }); }); });