Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hyperledger/cactus-common

Package Overview
Dependencies
Maintainers
3
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hyperledger/cactus-common - npm Package Compare versions

Comparing version 1.0.1-jwt-supply-chain.9df3fe79.16 to 1.1.2

2

dist/lib/test/typescript/unit/servers.test.d.ts

@@ -1,1 +0,1 @@

export {};
import "jest-extended";
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const http_1 = require("http");
const tape_1 = __importDefault(require("tape-promise/tape"));
require("jest-extended");
const index_1 = require("../../../main/typescript/index");
tape_1.default("Servers", async (tParent) => {
tape_1.default("Servers#listen()", async (t) => {
const testCase = "Servers";
describe(testCase, () => {
const server = http_1.createServer();
const portBlocker = http_1.createServer();
afterAll(async () => {
await index_1.Servers.shutdown(server);
await portBlocker.close();
});
test("Servers#listen()", async () => {
{
const server = http_1.createServer();
await t.rejects(index_1.Servers.listen({
await expect(index_1.Servers.listen({
hostname: "x",
port: "",
server,
}), /options\.port/, "Rejects when port specified as empty string OK");
})).toReject();
}
{
const server = http_1.createServer();
await t.rejects(index_1.Servers.listen({
await expect(index_1.Servers.listen({
hostname: "localhost",
port: false,
server,
}), /options\.port/, "Rejects when port specified as literal false boolean OK");
// await Servers.shutdown(server);
})).toReject();
}
{
const server = http_1.createServer();
await t.doesNotReject(index_1.Servers.listen({ hostname: "localhost", port: 0, server }), "Does not rejects when port specified as zero OK");
await index_1.Servers.shutdown(server);
await expect(index_1.Servers.listen({ hostname: "localhost", port: 0, server })).toResolve();
}
t.end();
});
tape_1.default("Servers#startOnPreferredPort()", async (t) => {
const prefPort = 4123;
const host = "localhost";
const portBlocker = http_1.createServer();
tape_1.default.onFinish(() => portBlocker.close());
const listenOptionsBlocker = {

@@ -46,15 +40,12 @@ server: portBlocker,

await index_1.Servers.listen(listenOptionsBlocker);
await t.doesNotReject(async () => {
await expect(async () => {
const server = await index_1.Servers.startOnPreferredPort(prefPort, host);
tape_1.default.onFinish(() => server.close());
t.ok(server, "Server returned truthy OK");
expect(server).toBeTruthy();
const addressInfo = server.address();
t.ok(addressInfo, "AddressInfo returned truthy OK");
t.ok(addressInfo.port, "AddressInfo.port returned truthy OK");
t.doesNotEqual(addressInfo.port, prefPort, "Preferred and actually allocated ports are different, therefore fallback is considered successful OK");
}, "Servers.startOnPreferredPort falls back without throwing OK");
t.end();
expect(addressInfo).toBeTruthy();
expect(addressInfo).toBeTruthy();
expect(addressInfo.port).not.toBe(prefPort);
});
});
tParent.end();
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmVycy50ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL3Rlc3QvdHlwZXNjcmlwdC91bml0L3NlcnZlcnMudGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLCtCQUFvQztBQUdwQyw2REFBK0M7QUFFL0MsMERBQXlEO0FBRXpELGNBQUksQ0FBQyxTQUFTLEVBQUUsS0FBSyxFQUFFLE9BQWEsRUFBRSxFQUFFO0lBQ3RDLGNBQUksQ0FBQyxrQkFBa0IsRUFBRSxLQUFLLEVBQUUsQ0FBTyxFQUFFLEVBQUU7UUFDekM7WUFDRSxNQUFNLE1BQU0sR0FBRyxtQkFBWSxFQUFFLENBQUM7WUFDOUIsTUFBTSxDQUFDLENBQUMsT0FBTyxDQUNiLGVBQU8sQ0FBQyxNQUFNLENBQUM7Z0JBQ2IsUUFBUSxFQUFFLEdBQUc7Z0JBQ2IsSUFBSSxFQUFHLEVBQXdCO2dCQUMvQixNQUFNO2FBQ1AsQ0FBQyxFQUNGLGVBQWUsRUFDZixnREFBZ0QsQ0FDakQsQ0FB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ElBQUksRUFBRSxDQUFDLEVBQUUsTUFBTSxFQUFFLENBQUMsQ0FDM0QsQ0FBQyxTQUFTLEVBQUUsQ0FBQztTQUNmO1FBRUQsTUFBTSxRQUFRLEdBQUcsSUFBSSxDQUFDO1FBQ3RCLE1BQU0sSUFBSSxHQUFHLFdBQVcsQ0FBQztRQUV6QixNQUFNLG9CQUFvQixHQUFHO1lBQzNCLE1BQU0sRUFBRSxXQUFXO1lBQ25CLFFBQVEsRUFBRSxJQUFJO1lBQ2QsSUFBSSxFQUFFLFFBQVE7U0FDZixDQUFDO1FBQ0YsTUFBTSxlQUFPLENBQUMsTUFBTSxDQUFDLG9CQUFvQixDQUFDLENBQUM7UUFFM0MsTUFBTSxNQUFNLENBQUMsS0FBSyxJQUFJLEVBQUU7WUFDdEIsTUFBTSxNQUFNLEdBQUcsTUFBTSxlQUFPLENBQUMsb0JBQW9CLENBQUMsUUFBUSxFQUFFLElBQUksQ0FBQyxDQUFDO1lBQ2xFLE1BQU0sQ0FBQyxNQUFNLENBQUMsQ0FBQyxVQUFVLEVBQUUsQ0FBQztZQUM1QixNQUFNLFdBQVcsR0FBRyxNQUFNLENBQUMsT0FBTyxFQUFpQixDQUFDO1lBQ3BELE1BQU0sQ0FBQyxXQUFXLENBQUMsQ0FBQyxVQUFVLEVBQUUsQ0FBQztZQUNqQyxNQUFNLENBQUMsV0FBVyxDQUFDLENBQUMsVUFBVSxFQUFFLENBQUM7WUFDakMsTUFBTSxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDO1FBQzlDLENBQUMsQ0FBQyxDQUFDO0lBQ0wsQ0FBQyxDQUFDLENBQUM7QUFDTCxDQUFDLENBQUMsQ0FBQyJ9
{
"name": "@hyperledger/cactus-common",
"version": "1.0.1-jwt-supply-chain.9df3fe79.16+9df3fe79",
"version": "1.1.2",
"description": "Universal library used by both front end and back end components of Cactus. Aims to be a developer swiss army knife.",

@@ -76,3 +76,3 @@ "keywords": [

"watch": {},
"gitHead": "9df3fe79252a78893e746a303e4f30d3a725a559"
"gitHead": "c339075fbcda8a26521c0414c9334d49d569dfe4"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc