Skip to content

Commit

Permalink
chore(diff): fomatter unit test fails locally (#31396)
Browse files Browse the repository at this point in the history
### Issue # (if applicable)

N/A

### Reason for this change

`format value can handle partial json strings` fails the repo build on my machine. This doesn't happen at the package level, for some reason.

### Description of changes

Made it pass the repo build. 

### Description of how you validated changes

N/A

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
comcalvi authored Sep 10, 2024
1 parent af9e6ba commit 1794dc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/cloudformation-diff/test/format.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ const formatter = new Formatter(process.stdout, {});

test('format value can handle partial json strings', () => {
const output = formatter.formatValue({ nice: 'great', partialJson: '{"wow": "great' }, chalk.red);
expect(output).toEqual('{\"nice\":\"great\",\"partialJson\":\"{\\\"wow\\\": \\\"great\"}');
});
expect(output).toEqual(chalk.red('{\"nice\":\"great\",\"partialJson\":\"{\\\"wow\\\": \\\"great\"}'));
});

0 comments on commit 1794dc4

Please sign in to comment.