Skip to content

Commit

Permalink
Merge pull request #2329 from zowe/fix-test-utils
Browse files Browse the repository at this point in the history
fix: updated regex that itentifies deprecated profiles warning
  • Loading branch information
zFernand0 authored Oct 30, 2024
2 parents b0155a3 + 9bea084 commit c35358a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions __tests__/__packages__/cli-test-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Zowe CLI test utils package will be documented in this file.

## Recent Changes

- BugFix: Updated deprecated-profile warning to include spaces. [zowe-cli-sample-plugin#113](https://github.com/zowe/zowe-cli-sample-plugin/pull/113)

## `7.28.3`

- BugFix: Refactored code to reduce the use of deprecated functions to prepare for upcoming Node.js 22 support. [#2191](https://github.com/zowe/zowe-cli/issues/2191)
Expand Down
4 changes: 2 additions & 2 deletions __tests__/__packages__/cli-test-utils/src/TestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ export function isStderrEmptyForProfilesCommand(output: Buffer): boolean {
*/
export function stripProfileDeprecationMessages(stderr: Buffer | string): string {
return stderr.toString()
.replace(/Warning: The command 'profiles [a-z]+' is deprecated\./g, "")
.replace(/Recommended replacement: The 'config [a-z]+' command/g, "")
.replace(/Warning: The command 'profiles [\w\s]+' is deprecated\./g, "")
.replace(/Recommended replacement: The 'config [\w\s]+' command/g, "")
.replace(/Recommended replacement: Edit your Zowe V2 configuration\s+zowe\.config\.json/g, "")
.trim();
}
Expand Down

0 comments on commit c35358a

Please sign in to comment.