Skip to content

Commit

Permalink
[Min-max] Adding Debug section to min-max readme (Azure#21390)
Browse files Browse the repository at this point in the history
  • Loading branch information
KarishmaGhiya authored Jun 1, 2022
1 parent 81ba9f2 commit 9067ea6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions eng/tools/dependency-testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,20 @@ rush rebuild
```

Note : If the above step fails, you can reset the repo: `git clean -f -x -d` (Warning: this will delete all unversioned files including those ignored by gitignore. Backup any .env files and push any commits you wanted to etc)

### Troubleshooting guide for min-max test failures

#### This is not a module
When you see an error message as shown below, it implies that there has been an internal source reference in a file inside the test/public folder that has been replaced by an empty file to avoid multiple versions of a dependency being pulled in.

```
communicationIdentityClient.mocked.spec.ts(8,68): error TS2306: File '/mnt/vss/_work/1/s/sdk/communication/communication-identity/test/public/utils/mockHttpClients.ts' is not a module.
utils/testCommunicationIdentityClient.ts(17,8): error TS2306: File '/mnt/vss/_work/1/s/sdk/communication/communication-identity/test/public/utils/mockHttpClients.ts' is not a module.
```
To fix the error, first locate where in the above file are you using the internal source reference. For example, from the above error, you notice that `/mnt/vss/_work/1/s/sdk/communication/communication-identity/test/public/utils/mockHttpClients.ts` probably has an internal source reference, which is why it's not accessible anymore since it's replaced by an empty file by the dependency-testing tool. This is the internal source reference detected in the `test/public/utils/mockHttpClients.ts` file.
```
import { CommunicationIdentityAccessTokenResult } from "../../../src/generated/src/models";
```
After locating the internal source reference, you have one of the following options:
- Either expose the above interface/ constant through the public API in the src/index.ts file of the Azure-SDK and change the import to accessing it from the src in this format - `../../../src` so that it becomes a public reference
- Or move the tests and references to test/internal folder if there's something you are accessing that cannot be exposed publicly.

0 comments on commit 9067ea6

Please sign in to comment.