UNPKG

@hey-api/json-schema-ref-parser

Version:

Parse, Resolve, and Dereference JSON Schema $ref pointers

15 lines (11 loc) 472 B
import path from 'node:path'; import { describe, expect, it } from 'vitest'; import { $RefParser } from '..'; describe('bundle', () => { it('handles circular reference with description', async () => { const refParser = new $RefParser(); const pathOrUrlOrSchema = path.resolve('lib', '__tests__', 'spec', 'circular-ref-with-description.json'); const schema = await refParser.bundle({ pathOrUrlOrSchema }); expect(schema).not.toBeUndefined(); }); });