@gammarers/jest-aws-cdk-asset-filename-renamer v0.5.51
Jest aws cdk asset filename renamer
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-renamerUsage
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();6 months ago
6 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
10 months ago
10 months ago
11 months ago
11 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
1 year ago
1 year ago
11 months ago
12 months ago
11 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago