From a851db2ee4871daf3350f01665980f9837a81ed2 Mon Sep 17 00:00:00 2001 From: Santiago Bosio Date: Tue, 11 Jun 2024 16:46:26 -0300 Subject: [PATCH] Hopefully, last fix for tests expected output --- test/api-client.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/api-client.test.ts b/test/api-client.test.ts index c0ea484..40fc6c5 100644 --- a/test/api-client.test.ts +++ b/test/api-client.test.ts @@ -192,7 +192,7 @@ describe('api_client', () => { const cmd = new Command([], ctx.config) await cmd.heroku.get('/account') - const stderrOutput = stderr.output.replace('› ', '').replace('\n', ' ') + const stderrOutput = stderr.output.replace(/ *› */g, '').replace(/ *\n */g, ' ') expect(stderrOutput).to.include(`This account is delinquent with payment and we‘ll suspend it on ${suspensionTime}`) expect(stderrOutput).to.include(`This account is delinquent with payment and we‘ll delete it on ${deletionTime}`) stderr.stop() @@ -222,7 +222,7 @@ describe('api_client', () => { const cmd = new Command([], ctx.config) await cmd.heroku.get('/account') - const stderrOutput = stderr.output.replace('› ', '').replace('\n', ' ') + const stderrOutput = stderr.output.replace(/ *› */g, '').replace(/ *\n */g, ' ') expect(stderrOutput).to.include(`This account is delinquent with payment and we‘ll suspend it on ${suspensionTime}`) expect(stderrOutput).to.include(`This account is delinquent with payment and we‘ll delete it on ${deletionTime}`) stderr.stop() @@ -319,7 +319,7 @@ describe('api_client', () => { const cmd = new Command([], ctx.config) await cmd.heroku.get('/teams/my_team/members') - const stderrOutput = stderr.output.replace('› ', '').replace('\n', ' ') + const stderrOutput = stderr.output.replace(/ *› */g, '').replace(/ *\n */g, ' ') expect(stderrOutput).to.include(`This team is delinquent with payment and we‘ll suspend it on ${suspensionTime}`) expect(stderrOutput).to.include(`This team is delinquent with payment and we‘ll delete it on ${deletionTime}`) stderr.stop() @@ -349,7 +349,7 @@ describe('api_client', () => { const cmd = new Command([], ctx.config) await cmd.heroku.get('/teams/my_team/members') - const stderrOutput = stderr.output.replace('› ', '').replace('\n', ' ') + const stderrOutput = stderr.output.replace(/ *› */g, '').replace(/ *\n */g, ' ') expect(stderrOutput).to.include(`This team is delinquent with payment and we‘ll suspend it on ${suspensionTime}`) expect(stderrOutput).to.include(`This team is delinquent with payment and we‘ll delete it on ${deletionTime}`) stderr.stop()