Skip to content

Commit

Permalink
chore: Use default Jest snapshot format
Browse files Browse the repository at this point in the history
In #1530 we upgraded to Jest v29.
We retained the v28 snapshot format to decrease the diff.

In this change, we adopt the (simpler) snapshot format from v29.
See https://jestjs.io/blog/2022/08/25/jest-29.
  • Loading branch information
akash1810 committed Oct 3, 2022
1 parent 85bad73 commit 2e14933
Show file tree
Hide file tree
Showing 22 changed files with 3,160 additions and 3,166 deletions.
6 changes: 0 additions & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,4 @@ module.exports = {
- #448
*/
modulePathIgnorePatterns: ["<rootDir>/lib"],

// (temporary) Retain snapshot format from Jest 28. See https://jestjs.io/docs/upgrading-to-jest29#snapshot-format.
snapshotFormat: {
escapeString: true,
printBasicPrototype: true,
},
};
52 changes: 26 additions & 26 deletions src/constructs/acm/__snapshots__/certificate.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`The GuCertificate class should create a new certificate (which requires manual DNS changes) if hosted zone ids are not provided 1`] = `
Object {
"Metadata": Object {
"gu:cdk:constructs": Array [
{
"Metadata": {
"gu:cdk:constructs": [
"GuStack",
"GuCertificate",
],
"gu:cdk:version": "TEST",
},
"Resources": Object {
"CertificateTesting28FCAC6D": Object {
"Resources": {
"CertificateTesting28FCAC6D": {
"DeletionPolicy": "Retain",
"Properties": Object {
"Properties": {
"DomainName": "code-guardian.com",
"Tags": Array [
Object {
"Tags": [
{
"Key": "App",
"Value": "testing",
},
Object {
{
"Key": "gu:cdk:version",
"Value": "TEST",
},
Object {
{
"Key": "gu:repo",
"Value": "guardian/cdk",
},
Object {
{
"Key": "Stack",
"Value": "test-stack",
},
Object {
{
"Key": "Stage",
"Value": "TEST",
},
Expand All @@ -46,43 +46,43 @@ Object {
`;

exports[`The GuCertificate class should create a new certificate when hosted zone ids are provided 1`] = `
Object {
"Metadata": Object {
"gu:cdk:constructs": Array [
{
"Metadata": {
"gu:cdk:constructs": [
"GuStack",
"GuCertificate",
],
"gu:cdk:version": "TEST",
},
"Resources": Object {
"CertificateTesting28FCAC6D": Object {
"Resources": {
"CertificateTesting28FCAC6D": {
"DeletionPolicy": "Retain",
"Properties": Object {
"Properties": {
"DomainName": "code-guardian.com",
"DomainValidationOptions": Array [
Object {
"DomainValidationOptions": [
{
"DomainName": "code-guardian.com",
"HostedZoneId": "id123",
},
],
"Tags": Array [
Object {
"Tags": [
{
"Key": "App",
"Value": "testing",
},
Object {
{
"Key": "gu:cdk:version",
"Value": "TEST",
},
Object {
{
"Key": "gu:repo",
"Value": "guardian/cdk",
},
Object {
{
"Key": "Stack",
"Value": "test-stack",
},
Object {
{
"Key": "Stage",
"Value": "TEST",
},
Expand Down
Loading

0 comments on commit 2e14933

Please sign in to comment.