@hey-api/json-schema-ref-parser
Version:
Parse, Resolve, and Dereference JSON Schema $ref pointers
17 lines (16 loc) • 778 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const node_path_1 = __importDefault(require("node:path"));
const vitest_1 = require("vitest");
const __1 = require("..");
(0, vitest_1.describe)('bundle', () => {
(0, vitest_1.it)('handles circular reference with description', async () => {
const refParser = new __1.$RefParser();
const pathOrUrlOrSchema = node_path_1.default.resolve('lib', '__tests__', 'spec', 'circular-ref-with-description.json');
const schema = await refParser.bundle({ pathOrUrlOrSchema });
(0, vitest_1.expect)(schema).not.toBeUndefined();
});
});