From 812ec09442008e7be591325a70df885460fad753 Mon Sep 17 00:00:00 2001 From: anastasiia-developer Date: Thu, 5 May 2022 16:43:13 +0300 Subject: [PATCH] test: read error --- cli/__test__/build/configRedoc/index.test.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cli/__test__/build/configRedoc/index.test.ts b/cli/__test__/build/configRedoc/index.test.ts index 1b0a40b8..f201d6a0 100644 --- a/cli/__test__/build/configRedoc/index.test.ts +++ b/cli/__test__/build/configRedoc/index.test.ts @@ -8,8 +8,10 @@ describe('build', () => { }); const out = r.stdout.toString('utf-8'); - expect(out).toContain('Found .redocly.yaml and use option from features.openapi'); - expect(out).toContain('bundled successfully'); + const err = r.stderr.toString('utf-8'); + const result = `${out}\n${err}`; + expect(result).toContain('Found .redocly.yaml and use option from features.openapi'); + expect(result).toContain('bundled successfully'); }); it('should use inline options and ignore .redocly.yaml', () => { @@ -28,7 +30,9 @@ describe('build', () => { ); const out = r.stdout.toString('utf-8'); - expect(out).not.toContain('Found .redocly.yaml and use option from features.openapi'); - expect(out).toContain('bundled successfully'); + const err = r.stderr.toString('utf-8'); + const result = `${out}\n${err}`; + expect(result).not.toContain('Found .redocly.yaml and use option from features.openapi'); + expect(result).toContain('bundled successfully'); }); });