chore: migrate all remaining modules from NodeUnit to Jest#16585
chore: migrate all remaining modules from NodeUnit to Jest#16585mergify[bot] merged 6 commits intoaws:masterfrom kaizencc:jest-migrate-3
Conversation
| }); | ||
|
|
||
| // eslint-disable-next-line jest/valid-describe | ||
| describe('resource in nested stack depends on a resource in the parent stack', matrixForResourceDependencyTest((addDep) => { |
There was a problem hiding this comment.
jest/valid-describe. It appears that the describe callback function should not contain any return statement or parameters. I am not actually sure which is the error here as matrixForResourceDependencyTest does return () => {}. However, the actual function does have both a return statement and parameters, which may be what is causing the error.
At any rate, I think that this is a valid way to utilize describe with as much fidelity as possible, and the underlying tests work as expected. Just want a second pair of eyes here.
There was a problem hiding this comment.
Yes, I think this is fine. As long as the test and the assertions are run, this doesn't matter so much!
| global: { | ||
| statements: 70, | ||
| branches: 50, | ||
| } |
There was a problem hiding this comment.
These thresholds are very low, so I investigated. The original nodeunit tests claim to cover 84% statements and 62% branches. However, for some reason nodeunit was ignoring code under the build-tools folder, of which there is only 1 test (under build.test.ts). For the rest of the module, the coverage data shows that the original nodeunit tests cover the same lines as the migrated jest tests.
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Migrates
aws-cloudformation,cfnspec, andaws-codebuildto jest.In
aws-cloudformation, jest does not like the idea of nested tests; however, as the scope of this PR is to migrate, I have addedeslint-ignoreto the relevant lines. The linter error in question is valid-describe.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license