Commit 340802d
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*
(cherry picked from commit d5c249f)1 parent b3bfd66 commit 340802d
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
0 commit comments