UNPKG

posix-node

Version:

Missing Posix Functions for Node.js (via a native module written in Zig)

17 lines 691 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const index_1 = __importDefault(require("./index")); test("create a socket", () => { if (index_1.default.socket == null) { throw Error("socket must be defined"); } if (index_1.default.constants == null) { throw Error("constants must be defined"); } const fd = index_1.default.socket(index_1.default.constants.AF_UNIX, index_1.default.constants.SOCK_STREAM, 0); expect(fd).toBeGreaterThan(0); }); //# sourceMappingURL=socket.test.js.map