unpkg/modules/__tests__/_publicKey-test.js

22 lines
462 B
JavaScript
Raw Normal View History

2018-09-01 16:36:48 +00:00
const request = require("supertest");
const createServer = require("../createServer");
describe("The /_publicKey endpoint", () => {
let server;
beforeEach(() => {
server = createServer();
});
describe("GET /_publicKey", () => {
it("echoes the public key", done => {
request(server)
.get("/_publicKey")
.end((err, res) => {
expect(res.text).toMatch(/PUBLIC KEY/);
done();
});
});
});
});