Skip to content

Commit

Permalink
chore: switch cfn only modules to assertions (aws#15869)
Browse files Browse the repository at this point in the history
Switch all current cfn-only packages to depend on
`assertions` instead of `assert`.

Update `example-construct-library` to showcase using
the `assertions` module.

Update `cfnspec` so that new packages are created with
the `assertions` module.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
Niranjan Jayakar authored Aug 3, 2021
1 parent 45b484c commit 4d91960
Show file tree
Hide file tree
Showing 201 changed files with 217 additions and 220 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/alexa-ask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/alexa-ask/test/ask.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-accessanalyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-amazonmq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-amazonmq/test/amazonmq.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-appconfig/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-appconfig/test/appconfig.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-appflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-appflow/test/appflow.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-appintegrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/jest": "^26.0.24",
"@aws-cdk/assert-internal": "0.0.0",
"@aws-cdk/assertions": "0.0.0",
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-applicationinsights/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apprunner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/jest": "^26.0.24",
"@aws-cdk/assert-internal": "0.0.0",
"@aws-cdk/assertions": "0.0.0",
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apprunner/test/apprunner.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-appstream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-appstream/test/appstream.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-athena/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"nodeunit-shim": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
Expand Down
11 changes: 5 additions & 6 deletions packages/@aws-cdk/aws-athena/test/athena.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import { expect, haveResource } from '@aws-cdk/assert-internal';
import { Template } from '@aws-cdk/assertions';
import * as cdk from '@aws-cdk/core';
import { CfnWorkGroup } from '../lib';

Expand Down Expand Up @@ -28,7 +27,7 @@ describe('Athena Workgroup Tags', () => {
},
},
});
expect(stack).to(haveResource('AWS::Athena::WorkGroup', {
Template.fromStack(stack).hasResourceProperties('AWS::Athena::WorkGroup', {
Tags: [
{
Key: 'key1',
Expand All @@ -39,7 +38,7 @@ describe('Athena Workgroup Tags', () => {
Value: 'value2',
},
],
}));
});
});
test('test tag aspect spec correction', () => {
const stack = new cdk.Stack();
Expand All @@ -57,7 +56,7 @@ describe('Athena Workgroup Tags', () => {
},
},
});
expect(stack).to(haveResource('AWS::Athena::WorkGroup', {
Template.fromStack(stack).hasResourceProperties('AWS::Athena::WorkGroup', {
Tags: [
{
Key: 'key1',
Expand All @@ -68,6 +67,6 @@ describe('Athena Workgroup Tags', () => {
Value: 'value2',
},
],
}));
});
});
});
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-auditmanager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-autoscalingplans/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-budgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-budgets/test/budgets.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cassandra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cassandra/test/cassandra.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ce/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ce/test/ce.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codeartifact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codegurureviewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codestarconnections/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/jest": "^26.0.24",
"@aws-cdk/assert-internal": "0.0.0",
"@aws-cdk/assertions": "0.0.0",
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-connect/test/connect.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cur/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/jest": "^26.0.24",
"@aws-cdk/assert-internal": "0.0.0",
"@aws-cdk/assertions": "0.0.0",
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cur/test/cur.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-customerprofiles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/assert-internal": "0.0.0",
"@aws-cdk/assertions": "0.0.0",
"@types/jest": "^26.0.24",
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-databrew/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-databrew/test/databrew.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-datapipeline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-datasync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-datasync/test/datasync.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import '@aws-cdk/assertions';
import {} from '../lib';

test('No tests are specified for this package', () => {
Expand Down
Loading

0 comments on commit 4d91960

Please sign in to comment.