diff --git a/cli/__test__/build/configRedoc/index.test.ts b/cli/__test__/build/configRedoc/index.test.ts index 382700b5..91296f35 100644 --- a/cli/__test__/build/configRedoc/index.test.ts +++ b/cli/__test__/build/configRedoc/index.test.ts @@ -5,7 +5,7 @@ describe('build', () => { it('should use .redocly.yaml', () => { const r = spawnSync( 'ts-node', - ['../../../index.ts', 'build', ' ../../../../demo/openapi.yaml', '--output=redocTest.html'], + ['../../../index.ts', 'build', ' ../../../../demo/openapi.yaml', '--output=redoc-test.html'], { cwd: __dirname, shell: true, @@ -17,7 +17,7 @@ describe('build', () => { const result = `${out}\n${err}`; try { - const redocStaticFile = readFileSync(`${__dirname}/redocTest.html`, 'utf8'); + const redocStaticFile = readFileSync(`${__dirname}/redoc-test.html`, 'utf8'); expect(redocStaticFile).toContain('"options":{"disableSearch":true}'); expect(redocStaticFile).not.toContain('role="search"'); } catch (err) { diff --git a/cli/__test__/build/configRedoc/inlineOptions.test.ts b/cli/__test__/build/configRedoc/inline-options.test.ts similarity index 100% rename from cli/__test__/build/configRedoc/inlineOptions.test.ts rename to cli/__test__/build/configRedoc/inline-options.test.ts diff --git a/cli/__test__/build/configRedoc/url.test.ts b/cli/__test__/build/configRedoc/url.test.ts new file mode 100644 index 00000000..a10e9332 --- /dev/null +++ b/cli/__test__/build/configRedoc/url.test.ts @@ -0,0 +1,25 @@ +import { spawnSync } from 'child_process'; + +describe('build with url', () => { + // FIXME: remove skip after release + it.skip('should not fail on resolving url', () => { + const r = spawnSync( + 'ts-node', + [ + '../../../index.js', + 'build', + 'http://petstore.swagger.io/v2/swagger.json', + '--output=url-test.html', + ], + { + cwd: __dirname, + shell: true, + }, + ); + + const out = r.stdout.toString('utf-8'); + const err = r.stderr.toString('utf-8'); + const result = `${out}\n${err}`; + expect(result).toContain('bundled successfully'); + }); +});