From ce8e24d9dfd2ab41b39712c29c469844f2d9ef4d Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Fri, 31 May 2019 22:20:01 +0200 Subject: [PATCH] Ensure to test non colored output --- tests/integration-basic/tests.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration-basic/tests.js b/tests/integration-basic/tests.js index 8462c064f..5bfb551d7 100644 --- a/tests/integration-basic/tests.js +++ b/tests/integration-basic/tests.js @@ -5,6 +5,7 @@ const fs = require('fs'); const fse = require('fs-extra'); const BbPromise = require('bluebird'); const AWS = require('aws-sdk'); +const stripAnsi = require('strip-ansi'); const { expect } = require('chai'); const { execSync } = require('../utils/child-process'); const { getTmpDirPath, replaceTextInFile } = require('../utils/fs'); @@ -78,7 +79,7 @@ describe('Service Lifecyle Integration Test', () => { it('should list existing deployments and roll back to first deployment', () => { let timestamp; const listDeploys = execSync(`${serverlessExec} deploy list`); - const output = listDeploys.toString(); + const output = stripAnsi(listDeploys.toString()); const match = output.match(new RegExp('Datetime: (.+)')); if (match) { timestamp = match[1];