Skip to content

Snapshot test always fails even when no changes are made #635

@kdnakt

Description

@kdnakt

Expected behavior

The npm test command successfully completes a snapshot test.

Actual behavior

I have a project with cdk-docker-image-deployment v0.0.577 and am trying to implement a snapshot test like this using a stack like the one below:

export class CdkTest1Stack extends cdk.Stack {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const repo = ecr.Repository.fromRepositoryName(this, 'MyRepository', 'myrepository');

    new imagedeploy.DockerImageDeployment(this, 'ExampleImageDeploymentWithTag', {
      source: imagedeploy.Source.directory('./docker'),
      destination: imagedeploy.Destination.ecr(repo, { 
        tag: 'myspecialtag',
      }),
    });
  }
}

However, when I execute npm test right after executing npm test -u, it always fails with the following output.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions