0.5.20 • Published 9 months ago

@gammarers/jest-aws-cdk-asset-filename-renamer v0.5.20

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

Jest aws cdk asset filename renamer

GitHub npm (scoped) GitHub Workflow Status (branch) GitHub release (latest SemVer)

this package is aws cdk construct asset filename renaming(RandomString.zip to HASH.zip)

Installation

npm install --save-dev @gammarers/jest-aws-cdk-asset-filename-renamer

Usage

You need to tell Jest to use the serializer. Add this to your Jest config:

"snapshotSerializers": [
  "<rootDir>/node_modules/@gammarers/jest-aws-cdk-asset-filename-renamer"
]

or add this projenrc.ts

  jestOptions: {
    jestConfig: {
      snapshotSerializers: ['<rootDir>/node_modules/@gammarers/jest-aws-cdk-asset-filename-renamer']
    }
  }

And your test.

const stack = new Stack(app, 'TestStack');
new lambda.Function(stack, 'Function', {
    runtime: lambda.Runtime.NODEJS_22_X,
    code: lambda.Code.fromAsset(path.join(__dirname, '../asset/sample-func')),
    handler: 'index.lambda_handler',
});
const template = Template.fromStack(stack);
expect(template.toJSON()).toMatchSnapshot();
0.5.20

9 months ago

0.5.19

9 months ago

0.5.18

9 months ago

0.5.16

10 months ago

0.5.17

10 months ago

0.5.15

10 months ago

0.5.14

10 months ago

0.5.13

10 months ago

0.5.12

11 months ago

0.5.11

11 months ago

0.5.10

11 months ago

0.5.9

11 months ago

0.5.8

12 months ago

0.5.7

12 months ago

0.5.6

12 months ago

0.5.5

1 year ago

0.5.4

1 year ago

0.5.3

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago