Something went wrong. Try again.
fork of hey-api/openapi-ts because I need some additional things
Something went wrong. Try again.
3.9 kB · 154 lines
TypeScript
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155// import { createClient } from './index';
// type Config = Parameters<typeof createClient>[0];
describe('createClient', () => { it('works', () => { expect(true).toBe(true); }); // it('1 config, 1 input, 1 output', async () => { // const config: Config = { // dryRun: true, // input: { // info: { title: 'foo', version: '1.0.0' }, // openapi: '3.0.0', // }, // logs: { // level: 'silent', // }, // output: 'output', // plugins: ['@hey-api/sdk'], // };
// const results = await createClient(config); // expect(results).toHaveLength(1); // });
// it('1 config, 2 inputs, 1 output', async () => { // const config: Config = { // dryRun: true, // input: [ // { // info: { title: 'foo', version: '1.0.0' }, // openapi: '3.0.0', // }, // { // info: { title: 'bar', version: '1.0.0' }, // openapi: '3.0.0', // paths: {}, // }, // ], // logs: { // level: 'silent', // }, // output: 'output', // plugins: ['@hey-api/sdk'], // };
// const results = await createClient(config); // expect(results).toHaveLength(1); // });
// it('1 config, 2 inputs, 2 outputs', async () => { // const config: Config = { // dryRun: true, // input: [ // { // info: { title: 'foo', version: '1.0.0' }, // openapi: '3.0.0', // }, // { // info: { title: 'bar', version: '1.0.0' }, // openapi: '3.0.0', // paths: {}, // }, // ], // logs: { // level: 'silent', // }, // output: ['output', 'output2'], // plugins: ['@hey-api/sdk'], // };
// const results = await createClient(config); // expect(results).toHaveLength(2); // });
// it('2 configs, 1 input, 1 output', async () => { // const config: Config = [ // { // dryRun: true, // input: { // info: { title: 'foo', version: '1.0.0' }, // openapi: '3.0.0', // }, // logs: { // level: 'silent', // }, // output: 'output', // plugins: ['@hey-api/sdk'], // }, // { // dryRun: true, // input: { // info: { title: 'bar', version: '1.0.0' }, // openapi: '3.0.0', // }, // logs: { // level: 'silent', // }, // output: 'output2', // plugins: ['@hey-api/sdk'], // }, // ];
// const results = await createClient(config); // expect(results).toHaveLength(2); // });
// it('2 configs, 2 inputs, 2 outputs', async () => { // const config: Config = [ // { // dryRun: true, // input: [ // { // info: { title: 'foo', version: '1.0.0' }, // openapi: '3.0.0', // }, // { // info: { title: 'bar', version: '1.0.0' }, // openapi: '3.0.0', // paths: {}, // }, // ], // logs: { // level: 'silent', // }, // output: ['output', 'output2'], // plugins: ['@hey-api/sdk'], // }, // { // dryRun: true, // input: [ // { // info: { title: 'baz', version: '1.0.0' }, // openapi: '3.0.0', // }, // { // info: { title: 'qux', version: '1.0.0' }, // openapi: '3.0.0', // paths: {}, // }, // ], // logs: { // level: 'silent', // }, // output: ['output3', 'output4'], // plugins: ['@hey-api/sdk'], // }, // ];
// const results = await createClient(config); // expect(results).toHaveLength(4); // });});