Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(lambda-nodejs): fix test broken in CodeBuild (#17884)
This test fails in our CodeBuild environment with the following error: ``` FAIL test/util.test.js ● extractDependencies › with file dependency expect(received).toEqual(expected) // deep equality - Expected - 1 + Received + 1 Object { - "my-module": StringMatching /aws-cdk\/packages\/@aws-cdk\/core/, + "my-module": "file:/codebuild/output/src777018412/src/packages/@aws-cdk/core", } 130 | })); 131 | > 132 | expect(extractDependencies(pkgPath, ['my-module'])).toEqual({ | ^ 133 | 'my-module': expect.stringMatching(/aws-cdk\/packages\/@aws-cdk\/core/), 134 | }); 135 | at Object.<anonymous> (test/util.test.ts:132:57) ``` This is due to the source being located in .../src instead of .../aws-cdk. Fix the test by stopping the check at the 'packages' directory. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information