Skip to content

Commit

Permalink
Add failing test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
chriszarate committed Dec 28, 2023
1 parent c522bf6 commit 35df397
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions __tests__/lib/cli/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ describe( 'utils/cli/format', () => {
input: [ '{"json":broken json with spaces}' ],
expected: [ '"{"json":broken json with spaces}"' ],
},
{
input: [ '--foo=\'bar1 "bar2" "bar3"\'' ],
expected: [ '--foo=\'bar1 "bar2" "bar3"\'' ],
},
{
input: [ '--foo', '\'bar1 "bar2" "bar3"\'' ],
expected: [ '--foo', '\'bar1 "bar2" "bar3"\'' ],
},
] )( 'should requote args when needed - %o', ( { input, expected } ) => {
const result = requoteArgs( input );
expect( result ).toStrictEqual( expected );
Expand Down

0 comments on commit 35df397

Please sign in to comment.