Files
bruno/packages/bruno-converters/tests/wsdl/wsdl-to-bruno.spec.js
Anton a538b27f24 Import WSDL to collection (#5015)
* Import WSDL to bruno collection

* feat(wsdl-import): remove unused code and minor refactor

---------

Co-authored-by: Bijin Bruno <bijin@usebruno.com>
2025-10-25 15:20:18 +05:30

17 lines
629 B
JavaScript

import { describe, it, expect } from '@jest/globals';
import wsdlToBruno from '../../src/wsdl/wsdl-to-bruno.js';
describe('wsdl-to-bruno', () => {
it('should throw error for non-string input', async () => {
await expect(wsdlToBruno({})).rejects.toThrow('WSDL content must be a string');
});
it('should throw error for empty string input', async () => {
await expect(wsdlToBruno('')).rejects.toThrow('Import WSDL collection failed');
});
it('should throw error for invalid XML', async () => {
await expect(wsdlToBruno('<invalid>xml</invalid>')).rejects.toThrow('Import WSDL collection failed');
});
});