autorest.typescript
autorest.typescript copied to clipboard
Update generated code to use assert from @azure/test-utils
Once https://github.com/Azure/azure-sdk-for-js/pull/20195 is merged @azure/test-utils will re-export a version of chai preloaded with useful plugins.
This issue tracks updating the generator to use @azure/test-utils instead of chai
- generated package.json should not have dependencies on chai
- generated package.json should have a dependency on @azure/test-utils
- generated test code should
import { assert } from "@azure/test-utils"instead of from "chai"
Anything else I might have missed? There's no urgency to this, just the updated PR template reminded me to file an issue here (thanks @sarangan12 !)
I had on offline chat with @maorleger. The gist of our conversation is:
- The generator has 2 flavors:
- Regular Generator
- Rest Generator
- The Regular generator does not have any chai dependency. Only the Rest generator has chai dependency.
- We could introduce
@azure/test-utilsdependency to the Rest Generator. (It is Ok to introduce it in the Regular Generator also) - We should remove the
chaidependency from the Rest flavor. - But, all of this could be done only when
@azure/test-utilspackage is released to npm. (Or, we could create an internal stream and release it there) @maorleger will work on releasing the package and then update this Issue. After that, we could work on this issue. Until then, we could put this issue in the backlog.