UNPKG

parse-openapi

Version:

OpenAPI v3 parser

18 lines (17 loc) 880 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const uvu_1 = require("uvu"); const strict_1 = __importDefault(require("assert/strict")); const unique_1 = require("./unique"); (0, uvu_1.test)('unique should return correct index', () => { strict_1.default.ok((0, unique_1.unique)('a', 0, ['a', 'b', 'c'])); strict_1.default.equal((0, unique_1.unique)('a', 1, ['a', 'b', 'c']), false); strict_1.default.equal((0, unique_1.unique)('a', 2, ['a', 'b', 'c']), false); strict_1.default.ok((0, unique_1.unique)('a', 0, ['a', 'b', 'c'])); strict_1.default.ok((0, unique_1.unique)('a', 1, ['z', 'a', 'b'])); strict_1.default.ok((0, unique_1.unique)('a', 2, ['y', 'z', 'a'])); }); uvu_1.test.run();