mirror of
https://github.com/LukeHagar/prettier-plugin-openapi.git
synced 2025-12-06 04:21:03 +00:00
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import { describe, expect, it } from 'bun:test';
|
|
import { getVendorExtensions } from '../src/extensions/vendor-loader';
|
|
|
|
describe('Vendor Extension System', () => {
|
|
it('should load vendor extensions from TS files', () => {
|
|
const vendorExtensions = getVendorExtensions();
|
|
|
|
// Should have loaded Speakeasy and Redoc extensions
|
|
expect(vendorExtensions).toBeDefined();
|
|
expect(typeof vendorExtensions).toBe('object');
|
|
|
|
// Check if extensions were loaded
|
|
expect(vendorExtensions['top-level']).toBeDefined();
|
|
expect(vendorExtensions['top-level']['x-tagGroups']).toBe(13);
|
|
});
|
|
|
|
|
|
it('should handle vendor extensions gracefully', () => {
|
|
// This test ensures the system doesn't crash when loading extensions
|
|
const vendorExtensions = getVendorExtensions();
|
|
expect(vendorExtensions).toBeDefined();
|
|
expect(typeof vendorExtensions).toBe('object');
|
|
});
|
|
|
|
it('should have proper extension structure', () => {
|
|
const vendorExtensions = getVendorExtensions();
|
|
|
|
// Check that extensions have the right structure
|
|
expect(vendorExtensions['top-level']).toBeDefined();
|
|
expect(vendorExtensions.operation).toBeDefined();
|
|
});
|
|
});
|