Skip to content

Commit

Permalink
Fix test by stripping ansi
Browse files Browse the repository at this point in the history
  • Loading branch information
eablack committed Mar 27, 2024
1 parent 3c3b426 commit f8ea4fa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import heredoc from 'tsheredoc'
import {expect} from 'chai'
import expectOutput from '../../../../helpers/utils/expectOutput'
import * as fixtures from '../../../../fixtures/addons/fixtures'
import stripAnsi = require('strip-ansi')

const shouldUnschedule = function (cmdRun: (args: string[]) => Promise<any>) {
const addon = fixtures.addons['www-db']
Expand Down Expand Up @@ -82,6 +83,6 @@ describe('pg:backups:unschedule error state', () => {

it('errors when multiple schedules are returned from API', async () => {
await runCommand(Cmd, ['--app', appName])
.catch(error => expect(error.message).to.equal(`Specify schedule on ${appName}. Existing schedules: DATABASE_URL, DATABASE_URL2`))
.catch(error => expect(stripAnsi(error.message)).to.equal(`Specify schedule on ${appName}. Existing schedules: DATABASE_URL, DATABASE_URL2`))
})
})

0 comments on commit f8ea4fa

Please sign in to comment.